Dashboard: KeyValueList component unintuitive design

Created on 11 Nov 2019  路  3Comments  路  Source: tektoncd/dashboard

Expected Behavior

It should be intuitive to use all of the UI components in the Dashboard.

Actual Behavior

The KeyValueList component, introduced in the Secrets modal, has some unintuitive behavior that should be addressed. Per @AlanGreene's comment:

I'd like to get some design input on the controls for adding/removing items from the list, in particular for removal... IMO having the remove button at the top of the list remove an item from the bottom of the list seems odd. Since this is a pattern we're starting to reuse in multiple places in the UI we should make sure we're not causing confusion.

Screen Shot 2019-11-11 at 10 52 07 AM

Additional Info

@kimholmes @mii-w do you have any input? 馃檪

Most helpful comment

@ncskier
Here is the design for "add annotation" in Secret creation:
SecretAnnotation

  1. The user can click on "Add Annotation to add another row below the current row:
    image

2.image

  • They can delete rows by clicking the (X) at the end of the row.
  • For the hint text. Please see the specs here on the Carbon site:
    https://www.carbondesignsystem.com/components/form/code
  • The user can click in the field to type. If they delete their text, the hint text reappears.

All 3 comments

@ncskier
Here is the design for "add annotation" in Secret creation:
SecretAnnotation

  1. The user can click on "Add Annotation to add another row below the current row:
    image

2.image

  • They can delete rows by clicking the (X) at the end of the row.
  • For the hint text. Please see the specs here on the Carbon site:
    https://www.carbondesignsystem.com/components/form/code
  • The user can click in the field to type. If they delete their text, the hint text reappears.

Thanks @kimholmes!

@AlanGreene, looking at figure 2 there, I think we'll need to modify the KeyValueList shared component. There is a Dropdown in this instance, but the CreatePipelineRun modal will have a Text Input Field where the Dropdown is (https://github.com/tektoncd/dashboard/pull/699). What would be the best way to structure this shared component?

I think we could have the shared component handle the "add" and "remove" behavior, and it could use a prop to know what to render in the list (in figure 2, the prop would be the Access to Dropdown & Server URL Text Input Field). However, I don't know if there would be a problem tracking the data & error handling through the component. What do you think?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sm43 picture sm43  路  4Comments

Fabian-K picture Fabian-K  路  3Comments

Megan-Wright picture Megan-Wright  路  4Comments

eddycharly picture eddycharly  路  6Comments

a-roberts picture a-roberts  路  4Comments