blackmann/mangobase

UX improvement for enums

Closed this issue · 0 comments

The current collection form shows the enum field for strings all the time; even if no value is passed. I think this litters the form.

To improve this we can have a button to toggle the enum chips input.

Requirement

  1. We should show a toggle button next to "Unique"
    1. The toggle button is has grey background when the chips input is not showing
    2. When the chips input is showing, the toggle button should have a blue background
    3. We should not be able to un-toggle the enum button when there are values in the chips input. We can only toggle it on/off if the enum input is empty1.
  2. This UI/code change should mostly happen here:
    case 'string': {
    1. Add the toggle button here, but use absolute positioning to move it next to the "Unique" button.

The screenshot below should give you an idea of how this will look like.

Group 1

Footnotes

  1. Empty enum input means, there's no chip item in it. When it only text in it, you should be able to toggle it on/off.