Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added combo box guidance #3775

Merged
merged 14 commits into from
Feb 11, 2025
Merged

Added combo box guidance #3775

merged 14 commits into from
Feb 11, 2025

Conversation

babsdenney
Copy link
Contributor

  • Added combo box documentation page under the forms sub-menu
  • Documentation under search input and select that needs to be updated once we finalize the combo box guidance

- Added a combo box documentation page under the forms sub menu
- Found some documentation under search input and select that needs updating once we finalize the combo box guidance
@babsdenney babsdenney self-assigned this Feb 3, 2025
- Added figma link to combo box guidance page
- Fixed some links
- Added some related components
@babsdenney babsdenney marked this pull request as ready for review February 5, 2025 22:19
@babsdenney babsdenney requested a review from a team as a code owner February 5, 2025 22:19
Copy link
Contributor

@LWWright7 LWWright7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great Barb!! There is only one small thing I see that is different than Storybook: on the error state, it looks like there is a red rule line on the left hand side that is not present in this documentation:
Screen Shot 2025-02-06 at 7 10 55 AM

@@ -7,6 +7,7 @@ intro-text: "Form controls allow users to enter information."
status: use-deployed
sub-pages:
- sub-page: Autosave
- sub-page: Combo box
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep these alphabetical and move Combo Box after Checkbox?

@@ -51,6 +51,7 @@ web-component: va-search-input
### When to consider something else

* When free text input is allowed, do not use type-ahead in form fields where the user might assume they are limited to selecting a suggested term. Alternatively, provide a clear way for the user to add an entry if you do use type-ahead in a form field.
* If you have less or around a 100 options, consider using a different approach, such as using the [combo box]({{ site.baseurl }}/components/form/combo-box) component to help users find what they need.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have less or around a 100 options...

This reads a tad bit odd to me. Do we mean "If there are approximately 100 options or less..."?

Copy link
Contributor

@rsmithadhoc rsmithadhoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs look good to me, thanks!

@humancompanion-usds
Copy link
Collaborator

I think we may want to make a shared piece of content that we can include on the Form > Select, Form > Radio button, and Form > Combo box pages with a title like "Choosing the right component for the task"

The content of that is something like the following:

Options

  • 2 - 5: Radio Buttons. Use radio buttons when there are few options that can all be exposed at once.
  • 6 - 15: Select. Use a select for a limited number of options.
  • 16 - 100: Combo Box. Over 15 items, use a combo box which combines a select with typeahead.
  • 101 - ∞: Search input typeahead. Over 100 items, use the search input component with typeahead.

We can discuss the ranges and numbers here, but this is my best effort at the moment (which is no doubt clouded by cold medicine).

- Added shared select option guidance to radio button, select, combo-box, and search input components
- Updated order of menu for combo box
@babsdenney
Copy link
Contributor Author

This looks great Barb!! There is only one small thing I see that is different than Storybook: on the error state, it looks like there is a red rule line on the left hand side that is not present in this documentation: Screen Shot 2025-02-06 at 7 10 55 AM

@LWWright7 Thank you! I'm not sure if maybe I'm seeing something different. I see the red line on the left in the documentation. Is that what you are referring to?
image

@babsdenney
Copy link
Contributor Author

I think we may want to make a shared piece of content that we can include on the Form > Select, Form > Radio button, and Form > Combo box pages with a title like "Choosing the right component for the task"

The content of that is something like the following:

Options

  • 2 - 5: Radio Buttons. Use radio buttons when there are few options that can all be exposed at once.
  • 6 - 15: Select. Use a select for a limited number of options.
  • 16 - 100: Combo Box. Over 15 items, use a combo box which combines a select with typeahead.
  • 101 - ∞: Search input typeahead. Over 100 items, use the search input component with typeahead.

We can discuss the ranges and numbers here, but this is my best effort at the moment (which is no doubt clouded by cold medicine).

@danbrady @humancompanion-usds This is ready for re-review.

@danbrady danbrady self-requested a review February 10, 2025 14:04
@LWWright7
Copy link
Contributor

@babsdenney The deployment link for your PR looks like this to me, without the red line... 🤔 (screenshot below). The screen shot I included in my previous comment is from this Storybook link.
Screen Shot 2025-02-10 at 9 54 51 AM

@danbrady
Copy link
Contributor

FYI - Added #3787 for the missing red, vertical line issue.

@humancompanion-usds humancompanion-usds removed the request for review from LWWright7 February 11, 2025 15:30
Copy link
Contributor

@LWWright7 LWWright7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@babsdenney babsdenney merged commit ca3c4b2 into main Feb 11, 2025
4 checks passed
@babsdenney babsdenney deleted the 3567-Add-Combo-box-documentation branch February 11, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants