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

Sectioned Select #791

Closed
TJ-G opened this issue Oct 19, 2022 · 16 comments
Closed

Sectioned Select #791

TJ-G opened this issue Oct 19, 2022 · 16 comments
Assignees
Labels
client request Client team would immediately benefit from this change enhancement New feature or request

Comments

@TJ-G
Copy link

TJ-G commented Oct 19, 2022

😯 Problem to Solve

I don't see anything tagged as 'client-request' or 'enhancement' that matches this, but please feel free to close if I missed an existing request similar to this.

When a user selects a notebook (say from the analyze slide-out in the files grid), they see all notebooks published to workspaces they have access to. One key thing here is that notebooks are published to workspaces for access control. Notebooks with the same name may be published to different workspaces and, currently, will show up in the dropdown without any way to differentiate which one is in what workspace.

💁 Proposed Solution

I'd like the ability to section/segment/group the items in a combo-box and give each section a header. This would let me group the notebooks by what workspace they're in, and let the user know the name of that workspace by using that as the header for each section.

It looks like we can sort of get this behavior by inserting disabled items as the header, but that means we can't actually have disabled items in the list, and they don't really stand out as a 'header' and are hard to read.

image

@TJ-G TJ-G added enhancement New feature or request triage New issue that needs to be reviewed labels Oct 19, 2022
@m-akinc
Copy link
Contributor

m-akinc commented Oct 19, 2022

You can actually include elements other than nimble-list-option in the combobox's content, e.g. <h3>Workspace 1</h3>. Does that fully address your use case?

@TJ-G
Copy link
Author

TJ-G commented Oct 19, 2022

Oh, interesting... yes, I think it would, especially if we can stylize them a bit.

Thanks for letting me know that's already possible!

@TJ-G TJ-G closed this as completed Oct 19, 2022
@rajsite
Copy link
Member

rajsite commented Oct 19, 2022

You can actually include elements other than nimble-list-option in the combobox's content, e.g. <h3>Workspace 1</h3>. Does that fully address your use case?

@m-akinc @atmgrifter00

I don't see any stories or tests describing that use case. Is it tested (maybe I'm missing it)? Do we know how things like tab order and keyboard interactions, etc behave? What kind of content are we supporting, just decorative or interactive (can you dump a textbox, or a nimble-button in there)?

If we say it's supported we need testing and user guidance of what is supported. In addition we need documentation and examples in storybook.

Generally speaking we do not support placing arbitrary content in slots. Only certain use-cases are supported and we should add tests if we want to say we support additional use cases.

@atmgrifter00
Copy link
Contributor

@rajsite @m-akinc @TJ-G, yeah I'm not sure how this will behave with things like filtering. We should explore this use-case a bit, and as @rajsite mentioned update tests and docs as needed.

@atmgrifter00 atmgrifter00 reopened this Oct 19, 2022
@TJ-G
Copy link
Author

TJ-G commented Oct 20, 2022

okay, sounds good. Thanks for the input! I guess the right thing to do for now is to click this re-open button and when there's time to prioritize some research and testing we can evaluate if inserting html elements meets our needs.

@jattasNI
Copy link
Contributor

One other workaround available today would be to append additional information to each item's text. e.g. "Notebook 1 (Default Workspace)"

@jattasNI jattasNI added client request Client team would immediately benefit from this change and removed triage New issue that needs to be reviewed labels Oct 25, 2022
@jattasNI
Copy link
Contributor

This request came up again in this SLE PR. It was the same use case: notebooks in different workspaces not being easily distinguished.

image

@jattasNI
Copy link
Contributor

jattasNI commented May 9, 2023

Here's another SLE PR implementing the approach described above of adding <div> elements to delineate sections. As suggested above, we should add test coverage and documentation for this case.

@jattasNI
Copy link
Contributor

@NIbokeefe in this SLE PR we're adding section headers to separate groups of combobox items. Do you have any visual design feedback about the styling of the headers? Personally I think the padding looks a bit cramped but I defer to your recommendations.

image

@NIbokeefe
Copy link

@NIbokeefe in this SLE PR we're adding section headers to separate groups of combobox items. Do you have any visual design feedback about the styling of the headers? Personally I think the padding looks a bit cramped but I defer to your recommendations.

image

@jattasNI

I have a design for headers/group-labels for menus. In this design you've shown here it looks like we are using the controlLabel_1 token as the menu header. Instead if you can use the GroupLabel_1 token documented in both XD and Figma. It's an 11px Source Sans Pro Semi-bold font. The color token is Black91 @ 100% Opacity.

You should be able to extract the correct spacing from either of those spec documents. Please let me know if you run into any issues.

https://www.figma.com/file/PO9mFOu5BCl8aJvFchEeuN/Nimble_Components?type=design&node-id=1295%3A93863&t=JljnGeOi5lXwzyQf-1
Screen Shot 2023-05-15 at 2 44 39 PM

https://xd.adobe.com/view/33ffad4a-eb2c-4241-b8c5-ebfff1faf6f6-66ac/
Screen Shot 2023-05-15 at 2 46 39 PM

@rajsite
Copy link
Member

rajsite commented May 15, 2023

@NIbokeefe would we expect to use the horizontal line between each of the headed groups like the menu? Notice that the screenshot of the select currently doesn't have those.
Are we concerned about forcing all caps on user provided strings? I'm not actually sure if workspace names are case-sensitive.

@NIbokeefe
Copy link

NIbokeefe commented May 16, 2023

@rajsite

Great questions Milan, thank you!

Horizontal line: My instinct is to keep the lines by default for the sake of simplifying the way we handle our patterns. If it's important to separate items by group it's ideal to visually reinforce it. This horizontal line brake concept derives from our general menu and serves multiple purposes. I always try to back a concept by 2-3 visual cues to account for accessibility and unknowns. I'll point out the added benefit to the line brake when regarding potential modification to the typography of the header.

All caps: I don't have the context to this specific situation to say one way or another about the all caps. By default, we should us all caps to drive consistency. If the headers are user inputs or the case styling is important; this is for sure a concern and we should consider deviating from the all caps. The header visual design is supported in multiple ways: Headers are at the top of grouped items, in semi bold font and are divided by the horizontal line brake. We're not entirely relying on all caps to determine what's a header, so if we need to make that change it should not be a huge concern. However, I can't guide whether that's necessary without learning more about the functionality and use case.

@m-akinc m-akinc moved this from Backlog to Current Iteration in Nimble Design System Priorities May 16, 2023
@rajsite
Copy link
Member

rajsite commented May 24, 2023

A related issue that came up in an SLE PR is for the following scenario:

  • The combobox has two options that have the same value under different header elements (a notebook with the same name in two different workspaces)
  • The Angular CVA for the combobox always picks the first model object that matches the selected option value
  • How can the app get the second model value instead?

This goes against the design of the combobox as-is which is modelled as a text input field that should not have knowledge of option selected but instead of text selected. Likely the desired behavior is to use a select control instead with the UX of being able to type ahead to filter options which can model a selected option correctly.

@m-akinc m-akinc added the interaction design Interaction design work item label May 31, 2023
@m-akinc m-akinc moved this from Current Iteration to Backlog in Nimble Design System Priorities May 31, 2023
@atmgrifter00
Copy link
Contributor

Early prototype for API demonstration (and Storybook]). This prototype was focused on the Select, but its API would be identical for the Combobox.

Some observations made while demoing the prototype (noting its use in combination with filtering):

  • Allow groups to be used to filter on, which would both find ListOption entities with that name, and show all of the ListOption entities under a group with that label.

@jattasNI jattasNI mentioned this issue Jul 14, 2023
14 tasks
@jattasNI
Copy link
Contributor

Interaction Design Questions

  1. how does filtering impact the section headers? Are the headers still visible after items are filtered (they likely should be)? Do section headers match the filter? If they do, should we show everything under the header that matches even if those items don't themselves match the filter?

We plan to have the dev team propose answers to these questions and run them by IxD.

@jattasNI jattasNI removed the interaction design Interaction design work item label Jul 28, 2023
atmgrifter00 added a commit that referenced this issue May 15, 2024
# Pull Request

## 🤨 Rationale

- #791
@atmgrifter00 atmgrifter00 self-assigned this May 20, 2024
@atmgrifter00 atmgrifter00 moved this from Backlog to In progress in Nimble Design System Priorities May 20, 2024
@atmgrifter00 atmgrifter00 linked a pull request Jun 3, 2024 that will close this issue
1 task
@atmgrifter00 atmgrifter00 removed a link to a pull request Jun 3, 2024
1 task
atmgrifter00 added a commit that referenced this issue Jun 4, 2024
# Pull Request

## 🤨 Rationale

- #791

This PR only introduces groups to the `Select`. Providing this feature
for the `Combobox` will be handled separately.
rajsite added a commit that referenced this issue Jun 6, 2024
# Pull Request

## 🤨 Rationale

- #791

## 👩‍💻 Implementation

Standard integration implementations for Angular/Blazor.

## 🧪 Testing

Standard unit tests for Angular/Blazor. Updated both example apps.

## ✅ Checklist

<!--- Review the list and put an x in the boxes that apply or ~~strike
through~~ around items that don't (along with an explanation). -->

- [ ] I have updated the project documentation to reflect my changes or
determined no changes are needed.

---------

Co-authored-by: Milan Raj <rajsite@users.noreply.github.com>
@m-akinc m-akinc changed the title Sectioned Combo-Box Sectioned Select Jun 10, 2024
@m-akinc
Copy link
Contributor

m-akinc commented Jun 10, 2024

The functionality is now part of the Nimble select. We'll use a separate AzDO feature to track integration into SLE.

@m-akinc m-akinc closed this as completed Jun 10, 2024
@m-akinc m-akinc moved this from In progress to Done in Nimble Design System Priorities Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client request Client team would immediately benefit from this change enhancement New feature or request
Projects
Development

No branches or pull requests

6 participants