-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Ensure Consistent Category Colors #1722
Ensure Consistent Category Colors #1722
Conversation
@JLambertazzo just an idea here—what if we used a simple Stimulus controller to hide the color picker entirely if the parent category field is populated, then on the backend, we simply use our internal logic to assign the parent color to the subcategory? cc @justinfar in case you had other ideas here. |
This worked really well! Here are the results: |
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.
Looks good! Once conflicts are resolved, good to merge.
Signed-off-by: Julien Bertazzo Lambert <[email protected]>
Completed merge, behavior seems to be the same! |
Closes #1668
Note
Was not able to accomplish reactivity in this PR. Disabling of other colors, in addition to displaying the error message, only shows up after a failed attempt to create the category.
Approach
category.rb
model which displays the message below when trying to select a color different from the parent category