components icon indicating copy to clipboard operation
components copied to clipboard

[Feature Request]: Deep nesting of options for ButtonDropdown

Open brianfoody opened this issue 2 years ago • 2 comments

Description

It appears the ButtonDropdown component only goes one level deep and then the nesting stops, would be great to go deeper.

https://cloudscape.design/components/button-dropdown/?tabId=playground&example=with-expandable-groups

Double nesting data attempt in playground

[
  { "id": "connect", "text": "Connect" },
  { "id": "password", "text": "Get password" },
  {
    "id": "states",
    "text": "Instance State",
    "items": [
      {
        "id": "states",
        "text": "Instance State",
        "items": [
          { "id": "start", "text": "Start" },
          { "id": "stop", "text": "Stop", "disabled": true },
          { "id": "hibernate", "text": "Hibernate", "disabled": true },
          { "id": "reboot", "text": "Reboot", "disabled": true },
          { "id": "terminate", "text": "Terminate" }
        ]
      },
      { "id": "stop", "text": "Stop", "disabled": true },
      { "id": "hibernate", "text": "Hibernate", "disabled": true },
      { "id": "reboot", "text": "Reboot", "disabled": true },
      { "id": "terminate", "text": "Terminate" }
    ]
  }
]

Code of Conduct

brianfoody avatar Aug 18 '22 02:08 brianfoody

Hi Brian, this is a deliberate design decision, as we found that multiple levels of nesting led to poor user experience, especially with regards to accessibility and responsiveness.

So that we can better understand this request, what would be your use-case for this, and why would other approaches not work?

gethinwebster avatar Aug 18 '22 08:08 gethinwebster

Thanks for the reply @gethinwebster . Yeah I can understand that design choice. I'd love just one more level 😆 .

For context I'm developing an AWS dev tool and one of the options goes into all the accounts the user has SSO access for and for each of those accounts I just want two options - launch browser or terminal.

As there can be a long list of accounts I'd just like to put the options one level lower to make it ironically more accessible for the user to scan the account they want.

Attached an image which gives some context. There is ~20 accounts there but some of them had sensitive names I couldn't show

Screen Shot 2022-08-18 at 4 43 21 pm

brianfoody avatar Aug 18 '22 08:08 brianfoody

Closing due to inactivity. The current behavior is the best we can offer and it is formally supported (relevant test).

However we are not planning any design improvements in this treatment because it does not scale well

just-boris avatar Mar 04 '24 14:03 just-boris