Add NamingStyle adapter to enforce format for added features.#880
Add NamingStyle adapter to enforce format for added features.#880
Conversation
| invalid: %w[CamelCase cobraCase double__underscore], | ||
| }, | ||
| kebab: { | ||
| valid: %w[kebab kebab-case kebab-case-1 htt-party], |
There was a problem hiding this comment.
I approve of these kebabs. 🎉
jnunemaker
left a comment
There was a problem hiding this comment.
This is sick. So clean. Thanks for whipping this together. I'm good as is. Random questions below:
- Any thoughts on if/how we should communicate the error raised from the flipper-ui? Should we rescue this error and add validation errors to the form or something? I could see someone being confused about an exception/error page with no details of why it is popping up. If we somehow rescue this error and explain maybe that would be enough?
- Any thoughts on what should happen in cloud sync when this error is hit? I think most of the cloud syncing avoids raising anything so I'm wondering if they'd not get feedback.
I'm good with leaving as is for now but part of me wants to add this by default with snake case in the future.
|
Awesome!
IMO, the best UX would be an inline error message that displays once the user has blurred the input. The second-best would be a banner/inline error if the user tries to submit the form. 😄 |
|
This feature would be great to ensure consistent naming across all feature flags, could this be revisited @bkeepers @jnunemaker ? |
As suggested by @LandonSchropp in #879, this adds the ability to constrain feature names to a naming style.
Output: