-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix: Color editor discards colors with default name. #37496
Fix: Color editor discards colors with default name. #37496
Conversation
b25d330
to
73ce182
Compare
Size Change: +61 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
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.
This tested well for me.
I guess there is still the edge case that a user may want a custom color of #000
called Color 1
, which isn't possible - but I think that is unlikely enough to not warrant complicating things further trying to account for it.
On #36940 we added a default name to colors in the custom color palette. It seems the user can just rely on that name and provide a color value but if that happens the color is discarded because there is no slug for that color. This situation makes it look like there is a bug and things are not working.
This PR updates the logic and now the user can use the default name and if the color is changed it is not discarded.
cc: @ramonjd
How has this been tested?
I went to the color palette.
I added a custom color keeping the default name of "Color x" and changing the color to red.
I pressed done and verified the color was not discarded.