flagr icon indicating copy to clipboard operation
flagr copied to clipboard

Create Flag by Key

Open silent1mezzo opened this issue 4 years ago • 4 comments

We use the key throughout our code to determine which flag to use. The normal process for creating a flag is to enter a description, go into the flag and then set the key. It'd be much more convenient to be able to set the key instead of the description when creating a new flag.

Expected Behavior

  1. Add Flag key in input
  2. Click Create New Flag
  3. Flag is created with the key set to the input and blank description.

Current Behavior

  1. Add description in input
  2. Click Create New Flag
  3. Click into the newly created flag
  4. Change Flag key
  5. Click Save Flag

Possible Solution

One solution would be to just change the description to key. This would be a big UI change and possibly not feasible. Alternatively we could split the input boxes into two, one for key and one for description.

Context

In general, descriptions are nice to have but not 100% necessary since our keys are human readable. Having to go into the flag to edit the key is an extra couple of steps each time.

silent1mezzo avatar Aug 19 '20 13:08 silent1mezzo

Yes, definitely doable to "split the input boxes into two". However, I also want to support the use case of generating the keys to be explicitly at random with unguessable strings, and there're tradeoffs to be made from the UI. Any idea to support both?

zhouzhuojie avatar Oct 06 '20 17:10 zhouzhuojie

@zhouzhuojie maybe it's an explicit action [add key] that toggles a new input box?

silent1mezzo avatar Oct 06 '20 18:10 silent1mezzo

Could this be done via server configuration instead? https://checkr.github.io/flagr/#/flagr_env

wmak avatar Oct 06 '20 18:10 wmak

Perhaps have a field for both key and description and if the key field is left blank it's automatically generated (and add pre-fill text to the field explaining that)

wildefires avatar Oct 06 '20 19:10 wildefires

Stale issue message

github-actions[bot] avatar Aug 26 '22 21:08 github-actions[bot]