Hide `x` buttons in settings color picker when control is already set to the default
See original GitHub issueDescription https://github.com/foxglove/studio/pull/4060 introduced the ability to “clear” color fields, resetting them to the default.
Unfortunately, this leads to some instances where I have an x
button that does nothing when clicked, because the field is already at the default.
I think we should hide the x
button when a field is already set to its default value.
According to https://github.com/foxglove/studio/pull/4060#issuecomment-1213346122, “default” is not actually a concept, we just send undefined
to the panel and let it figure out how it wants to handle things.
It’s up to the panel implementor. They’ll receive an incoming value of undefined but can process that however they want. In the case of that panel it’s reverting it to the panel’s own concept of the default. But at the level of the settings ui there’s no “default” value.
Therefore, to fix this we may need to introduce a concept of “default” for controls like this. Opening up for discussion.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
On a separate note I think the
x
button should maybe be gray instead of purple. It’s a very inviting button when it’s purple, but probably not something we expect people would need too often.This might be a good topic for product review. We can talk through the various competing goals here.