-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
feat: improve color consistency #19038
feat: improve color consistency #19038
Conversation
Co-authored-by: Geido <[email protected]>
…et into feat-color-consistency
@geido Nice catch! Fixed here. |
/testenv up |
@geido Ephemeral environment spinning up at http://50.112.38.121:8080. Credentials are |
@stephenLYZ I am worried that something happened to the ability to bring the colors of a chart from its Dashboard scheme to Explore. As you can see the colors in Explore look different from the Dashboard. untitled.dashboard.mp4 |
@geido Yes, it's a known issue and it only exists in the test environment, see Michael's comment. But in local env it cannot be reproduced.
|
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.
LGTM, Tested in local. work as expected.
Ephemeral environment shutdown and build artifacts deleted. |
(cherry picked from commit dc57508)
Hi, we've had some reports of unexpected colors in larger dashboards. From looking at this PR, I think this is because new colors are autogenerated once you "run out" of colors in the color scheme (correct me if I'm wrong?). I understand this is to prevent the same color being used twice, but non-unique dashboard colors are often not necessary if there are no conflicts within a single chart. I'm instructing users to override colors with label_colors if they don't like the autogenerated "similar to color scheme" ones, but this is a pretty big hassle, and it's a bit confusing because we don't surface shared_label_colors in the UI. Thoughts? |
What's particularly disruptive about this change is that it seems to cause colors to get auto-picked that are outside the defined color scheme. It also seems unclear what causes one chart to get a color auto-assigned vs another that has a color from the palette.
|
@serenajiang Hi, thanks for the feedback. This PR is not only to prevent color conflicts caused by "run out" of colors in the color-scheme, but mainly to ensure that the same dimensions of all charts in the dashboard have the same color. The The question is why we need to extract these same dimensions and use analogous colors? In this case, if we use the remaining color of color-scheme for the same dimensions in the one chart, we can't be sure whether the remaining color has been used in another chart, which may lead to color conflicts in another chart. For example, one dashboard has chartA and chartB. The color scheme is
chart B
But we need to make sure that dimension |
Hi @stephenLYZ, the use case you're describing makes sense - keeping chart dimension colors consistent. This was already possible via |
Thanks @stephenLYZ for the thorough explanation, I see without generating colors it'd be hard to totally avoid these conflicts, and trying to fine-tune it might get really messy. However, for our deployment, I'm not sure whether we need to optimize that hard, since users can always manually override label colors. Airbnb in particular has strong loyalty to our color scheme, so unexpected colors can be a bit jarring. Making this behavior optional for each dashboard could help mitigate disruptions, or even putting it all behind a feature flag (is there a feature flag for this already?). Re:
Would you mind pointing me to how to view this in the UI? I couldn't view it in the json metadata when I tried to edit a dashboard, and only found it because it was in the API response. |
Heya @clausherther and @serenajiang - thanks for raising your concerns. This is an intricate problem, but I'm confident we can find a sensible way forward so everyone gets what they want here. There are pros and cons to pretty much any approach, which I'll attempt to lay out here. As a bit of a side note, we sometimes find So... i think I see a couple paths forward, with varying levels of difficulty. Here goes...
Hope this helps, and hope we can steer this so that everyone wins :D |
SUMMARY
The difference between this PR and this one is that all label colors of the dashboard are saved to handle the native filter scenario.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
before
2022-03-06.11.02.05.mov
after
2022-03-06.11.00.34.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION