You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the wonderful auto-population of key fields for flags/segments that was added in #155, I noticed that any extra spaces before/after/between words in the name field correspond to extra -'s in the key field.
It would be great if we could strip these extra -s from the key field.
This will allow us to add stricter validation around the key field on the backend
Version Info
0.10.0
To Reproduce
See gif below ⬇️
Expected behavior
Extra whitespace in the name field should be trimmed before/after the name which means the key field will not contain extra -s
Ex: name: foo should become name: foo, key: --foo-- will become key: foo
Extra spaces in the name field between words should ideally only result in a single - in the key:
Ex: name: foo bar should result in key: foo-bar, not foo---bar
Nice catch! I can certainly fix this up since my PR introduces this. I am thinking that I can also begin to add some UI tests to catch these sorts of things.
JS unit tests were def something on my radar for the future, so any help there would be greatly appreciated! But don't feel like you have to write them either, you've already helped so much as it is!
Describe the bug
Using the wonderful auto-population of key fields for flags/segments that was added in #155, I noticed that any extra spaces before/after/between words in the
name
field correspond to extra-
's in the key field.It would be great if we could strip these extra
-
s from the key field.This will allow us to add stricter validation around the
key
field on the backendVersion Info
0.10.0
To Reproduce
See gif below ⬇️
Expected behavior
name
field should be trimmed before/after the name which means the key field will not contain extra-
sfoo
should become name:foo
, key:--foo--
will become key:foo
-
in the key:foo bar
should result in key:foo-bar
, notfoo---bar
Screenshots
/cc @aaronraff
The text was updated successfully, but these errors were encountered: