-
-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui: update design for feature naming pattern info #4656
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -147,47 +139,16 @@ const FeatureForm: React.FC<IFeatureToggleForm> = ({ | |||
|
|||
return ( | |||
<StyledForm onSubmit={handleSubmit}> | |||
<StyledContainer> | |||
<div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the purpose of this div? can we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately no. Well, at least not without changing something else. Due to the way the StyledForm is styled, it'll look wonky if we remove the div (I tried). That said, it's probably not hard to fix, so I'd be happy to have a look at it if you think it's a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, sorry, we can actually! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(adds a bunch more lines to the diff, but that's only due to indentation change)
This PR updates the UI to reflect the changes to the implicit ^ and $ that we now add. The changes are: 1. Show input adornments for ^ and $ when you create a pattern. 2. Mention that ^ and $ are added implicitly in description. 3. Checks the example you provide against the pattern with added ^ and $ + adds a test for that. Points 1 and 2: ![image](https://github.com/Unleash/unleash/assets/17786332/88c610b4-444b-4a83-a50a-4b7639614a86) ## Discussion point: I have not touched the information about the pattern yet as the PR that updates that is still in review (#4656), but it would be prudent to also update that info to make it clearer. I can address that in a follow-up PR.
This PR updates the design for the feature naming pattern info. In doing so, I've extracted the information into a single component.
It also, on @nicolaesocaciu's behest, makes the new toggle form inputs wider when they have room to grow.
Light mode:
Dark mode:
For copying features it looks like this: