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

Add support for DropdownV2 to have categories #2595

Open
meganwalker-ibm opened this issue Oct 1, 2018 · 24 comments
Open

Add support for DropdownV2 to have categories #2595

meganwalker-ibm opened this issue Oct 1, 2018 · 24 comments
Labels
afrohacks See https://ibm.biz/afrohacks-hackathon hacktoberfest See https://hacktoberfest.com/ package: react carbon-components-react proposal: open This request has gone through triaging. We're determining whether we take this on or not. role: design ✏️ type: discussion 💬 type: enhancement 💡

Comments

@meganwalker-ibm
Copy link

Summary

In Dropdown we managed to get categories of items rendered like so, by using fake items in the data structure, and ignoring the click events etc.

screen shot 2018-10-01 at 10 16 22

(This example is from existing public functionality and shows a list of places a slack message could be sent. After the end of the list of channels, you see the category heading 'USERS' followed by a list of selectable user options).

In DropdownV2 we have to pass in just an array of plain objects that, as far as I can see, have no way of specifying categories. We need to be able to specify categories to migrate to DropdownV2. Ideally we don't want to have to hack them in either, but instead have first class support like the Select component does.

Justification

Dropdown is disappearing, and being replaced with DropdownV2. This would also provide feature parity with the Select carbon component.

Desired UX and success metrics

Items should be able to be grouped under unselectable categories. This provides structure to what could be a long list of otherwise indistinguishable options. Ideally it should look similar to what we have for our existing Dropdown usage.

"Must have" functionality

  • Ability to provide category information in some format.
  • Categories should not be selectable
  • Categories should be rendered differently to provide differentiation.

Specific timeline issues / requests

Before Dropdown disappears.

Available extra resources

It's unclear if we'll have the time or resource to implement such functionality ourselves - even if we can reach an agreement here for how categories should be injected and styling should look.

@joshblack
Copy link
Contributor

cc @IBM/carbon-designers to weigh in on if we're supporting this pattern in Dropdown, or if this should be a select use-case 👍

@lovemecomputer
Copy link
Contributor

lovemecomputer commented Oct 3, 2018

@meganwalker-ibm cool yeah, this functionality would be rad! like @joshblack said yeah design will weigh in on this, and determine if we would just do this implementation or if it could fit in the context of other patterns :) but if y'all end up with a new component/option to commit, we'll definitely look at that too!

@meganwalker-ibm
Copy link
Author

Thanks folks! I shall await some design input :)

@designertyler
Copy link
Contributor

@meganwalker-ibm This make sense as an improvement. Thanks for the suggestion! We will probably want to align the category label type to the other labels in the system (semi-bold, sentence case, and text-01 color) and see how spacing could help group the categories. Maybe a line between categories could help, too.

@aagonzales
Copy link
Member

aagonzales commented Oct 3, 2018

Yes, I agree with @designertyler it needs a little polish. Except I hesitate to use semi-bold for categories since it could be mistaken for a selected state because of its emphasis.

image

Or if they don't need labels maybe just dividers to show association, like on os menu. Just some ideas

image

@meganwalker-ibm
Copy link
Author

meganwalker-ibm commented Oct 4, 2018

Headers are essential for our use-cases

@aagonzales
Copy link
Member

Sure, I was merely showing other ways of addressing the situation and other enhancements we could make to the component. You may only need one solution but our job is the think of it from a holistic system approach.

@meganwalker-ibm
Copy link
Author

What's the possibility of getting this implemented before Dropdown is removed in the next major release? As it's a blocker for us moving we'd end up having to stay behind if Dropdown is removed before this is implemented.

@chrisconnors-ibm
Copy link
Contributor

@meganwalker-ibm the Open Source model we're operating under assumes teams out in the world who need specific deviations from existing components design, develop, and submit them back for consideration to include in our master branch. It's the only way we can scale our system to accomodate the breadth of needs in our organization. so if there are immediate needs by external teams, they are encouraged to create issues, design and build what they need, and submit them back to us in a pull request.

If teams don't have that capability at all (no designers or FEDs), an issue like this one is subject to our broader priorities, which right now are very oversubscribed, so it'd be hard to estimate a timeframe for turn around on something like this. cc @alisonjoseph

@aagonzales
Copy link
Member

Dropdown is NOT being removed in the next major release. Its being updated.

@joshblack
Copy link
Contributor

@aagonzales this is around our migration from the Dropdown to DropdownV2 component in Carbon X 👍

@stale
Copy link

stale bot commented May 1, 2019

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. Thanks for your contributions.

@carbon-bot carbon-bot transferred this issue from carbon-design-system/carbon-components-react May 9, 2019
@carbon-bot
Copy link
Contributor

Hi there! 👋 If you're wondering why this issue was moved, we're currently updating our repo structure so that every package is found in the same project.

This should not have any impact for you, but we wanted to give you a heads up in case you were wondering what is going on. If you have any questions, feel free to reach out to us on Slack or contact us at: [email protected]. Thanks!

@stale
Copy link

stale bot commented Jun 8, 2019

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@stale stale bot added the status: inactive Will close if there's no further activity within a given time label Jun 8, 2019
@stale
Copy link

stale bot commented Jun 11, 2019

As there's been no activity since this issue was marked as stale, we are auto-closing it.

@stale stale bot closed this as completed Jun 11, 2019
@ashharrison90
Copy link
Contributor

Hi, can someone reopen this issue? I'm about to start work on it.
In terms of implementation, my initial thought is something like passing a categoryKey to Dropdown

So say your items look something like:

const items = [
  {
    id: 'germany',
    text: 'Germany',
    continent: 'Europe',
  },
  {
    id: 'uk',
    text: 'United Kingdom',
    continent: 'Europe',
  },
  {
    id: 'china',
    text: 'China',
    continent: 'Asia',
  },
  {
    id: 'japan',
    text: 'Japan',
    continent: 'Asia',
  },
];

Then you'd have:

<Dropdown
  ...normalProps
  categoryKey='continent'
\>

And Dropdown would then group options under the category headers of Asia and Europe.

How does this sound?

@ashharrison90
Copy link
Contributor

which ends up looking something like this:
image

@asudoh
Copy link
Contributor

asudoh commented Oct 23, 2019

@carbon-design-system/design Are we still interested in this feature? Thanks!

@stale stale bot removed the status: inactive Will close if there's no further activity within a given time label Oct 24, 2019
@stale
Copy link

stale bot commented Nov 23, 2019

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@stale stale bot added the status: inactive Will close if there's no further activity within a given time label Nov 23, 2019
@laurenmrice laurenmrice removed the status: inactive Will close if there's no further activity within a given time label Nov 25, 2019
@tw15egan
Copy link
Member

tw15egan commented Feb 4, 2020

@joshblack this still something we plan on supporting? Looking at #4449 and trying to see what the next step is for this feature

@joshblack
Copy link
Contributor

@tw15egan I think we definitely want to, but IIRC there were some issues with a11y that @dakahn flagged. I think on our end we wanted to fix up the a11y issues in these components first and then move forward with category support emulating: https://dequelabs.github.io/combobo/demo/ but I'm not sure if there was a hiccup with that and screen readers, or not, so will defer to DA 🤔

@dakahn
Copy link
Contributor

dakahn commented Feb 7, 2020

We need to figure out which dropdown menu style components should have category support and which should not. Category support will be tricky to get right from an accessibility perspective (functioning cross browser, cross screen reader, cross platform).

Actually @joshblack last I remember us discussing this we did not want to move forward with categories in Dropdown and wanted to point interested users toward another component? @abbeyhrt pinging you in here since I remember you being part of this discussion

@dakahn dakahn self-assigned this Feb 7, 2020
@joshblack
Copy link
Contributor

@dakahn if I understand correctly, I think most variants could need category support, including:

  • Listbox (dropdown)
    • Single select
    • Multi select
  • Combobox
    • Single select
    • Multi select

Not sure about other components, I think we'd need to include them here unless we're unable to make them work accessibly 🤔

@joshblack joshblack added the proposal: open This request has gone through triaging. We're determining whether we take this on or not. label Mar 13, 2020
@designertyler designertyler added proposal: accepted This request has gone through triaging and we are accepting PR's against it. and removed proposal: open This request has gone through triaging. We're determining whether we take this on or not. labels Mar 13, 2020
@designertyler
Copy link
Contributor

Next steps for design is to define rules for usage and final spec. Maybe look at existing components with category labels.

@alisonjoseph alisonjoseph mentioned this issue May 21, 2020
67 tasks
@dakahn dakahn removed their assignment Sep 14, 2020
@tw15egan tw15egan added hacktoberfest See https://hacktoberfest.com/ and removed hacktoberfest See https://hacktoberfest.com/ labels Sep 29, 2020
@sstrubberg sstrubberg added role: design ✏️ proposal: open This request has gone through triaging. We're determining whether we take this on or not. and removed role: ux 🍿 proposal: accepted This request has gone through triaging and we are accepting PR's against it. labels Nov 30, 2022
@tay1orjones tay1orjones added the afrohacks See https://ibm.biz/afrohacks-hackathon label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
afrohacks See https://ibm.biz/afrohacks-hackathon hacktoberfest See https://hacktoberfest.com/ package: react carbon-components-react proposal: open This request has gone through triaging. We're determining whether we take this on or not. role: design ✏️ type: discussion 💬 type: enhancement 💡
Projects
Status: Later 🧊
Development

No branches or pull requests