ayon-frontend icon indicating copy to clipboard operation
ayon-frontend copied to clipboard

Show enums as buttons instead of dropdown menu

Open MustafaJafar opened this issue 10 months ago • 5 comments

It'd be so cool to show enums as buttons like permission widget. This can be helpful to create a toggle with explicit labels. Nice to have: to be able to specify colors per button. Image

MustafaJafar avatar Feb 18 '25 20:02 MustafaJafar

Can you please give an example of where and how this would be used?

Innders avatar Feb 19 '25 07:02 Innders

Can you please give an example of where and how this would be used?

Use case: A variation for showing enums.

  • So, it'd look like this mockup. I wonder if the enum items can be like {"value": "some_value", "label": "Some Label", "button_color": "#ffb600"} Image
  • instead of looking like a list. Image

@BigRoy : I've used department layers orders as example. However, we may not need to a target in this setting.

MustafaJafar avatar Feb 19 '25 09:02 MustafaJafar

I've used department layers orders as example. However, we may not need to a target in this setting.

The target is for some decision level on how the resulting layer file is structured on first creation if I recall. If there's issues there or confusion about it - let's make a ticket on ayon-usd instead.

BigRoy avatar Feb 19 '25 09:02 BigRoy

The target is for some decision level on how the resulting layer file is structured on first creation if I recall. If there's issues there or confusion about it - let's make a ticket on ayon-usd instead.

Indeed, the need for the target in my example above should be discussed in a different place. However, I've just use it to show my frontend suggestion.

MustafaJafar avatar Feb 19 '25 09:02 MustafaJafar

This works well when you have 1-3 options but as soon as you have 10 options to pick from that the UI is completely unusable.

Innders avatar Feb 19 '25 10:02 Innders