Add NamingStyle adapter to enforce format for added features.#880
Open
Add NamingStyle adapter to enforce format for added features.#880
Conversation
jnunemaker
reviewed
Aug 22, 2024
| invalid: %w[CamelCase cobraCase double__underscore], | ||
| }, | ||
| kebab: { | ||
| valid: %w[kebab kebab-case kebab-case-1 htt-party], |
Collaborator
There was a problem hiding this comment.
I approve of these kebabs. 🎉
jnunemaker
approved these changes
Aug 22, 2024
Collaborator
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As suggested by @LandonSchropp in #879, this adds the ability to constrain feature names to a naming style.
Output: