-
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(color): color consistency enhancements #21507
Conversation
/testenv up |
@geido Ephemeral environment spinning up at http://35.85.63.230:8080. Credentials are |
@stephenLYZ thanks for this!
|
Good catch! This is a case that I have missed, I only dealt with the case of changing the color scheme. |
8f49450
to
831676d
Compare
Codecov Report
@@ Coverage Diff @@
## master #21507 +/- ##
==========================================
- Coverage 66.86% 66.84% -0.02%
==========================================
Files 1803 1805 +2
Lines 68996 69052 +56
Branches 7349 7369 +20
==========================================
+ Hits 46132 46158 +26
- Misses 20971 20996 +25
- Partials 1893 1898 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/testenv up |
@rusackas Ephemeral environment spinning up at http://35.160.87.160:8080. Credentials are |
@stephenLYZ as I work on the E2E I report here any issue that I encounter. I just found an issue with already rendered charts under a hidden tab. If you first visit the tab and let the chart load, then move away to another tab, add a custom label color and go back to the tab with the chart, you will see that the custom label color isn't applied. Tabbed.Dashboard.mp4Same thing happens with changing the color scheme Tabbed.Dashboard.1.mp4 |
@stephenLYZ the above happens also for main tabs. If you go to tab B, then go to tab A, change scheme, go back to tab B and you will see the color scheme isn't applied. I also found an even weirder bug where if you change the color scheme from tab B, it picks different colors than if you did change it from tab A. Tabbed.Dashboard.2.mp4 |
@stephenLYZ not sure if this is all about the same issue, but when changing color scheme, it works for a nested tab in the initial dashboard tab, but it is not applied correctly to the second tab. As you can see the label colors for "Anthony" are different Tabbed.Dashboard.3.mp4 |
@geido It looks like I can't reproduce in my local. I actually fixed this issue in the 'Chart.jsx' file: 2022-09-30.3.11.25.mov |
@stephenLYZ I can reproduce this pretty consistently with the "Tabbed Dashboard" that is available as a sample dashboard in the E2E testing env. I suggest that you try your changes using my E2E tests PR #21622 where the above issues should be apparent immediately. |
0a35a5f
to
df73632
Compare
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.
All tests are passing now!
Adding @jinghua-qa for an upmost confirmation from QA. Let's hold for her feedback before merging |
/testenv up |
@jinghua-qa Ephemeral environment spinning up at http://54.200.28.129:8080. Credentials are |
I found an issue that if a series in different charts in the same dashboard, then it is not consistent for the color on that series Expect: |
…Z/superset into feat-color-enhancement
@jinghua-qa Thanks for reporting this issue. This is a bug once we enter the dashboard from explore. I have fixed it and maybe we can add some e2e tests for the native filter scene in the future. cc @geido |
/testenv up |
@stephenLYZ Ephemeral environment spinning up at http://35.89.74.57:8080. Credentials are |
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.
I am sorry but I found another issue :(
If you look at the video you will see that the label "Daniel" changes color when you set a custom label color "Anthony". I am not sure why this happens but it is causing all sorts of weird behaviours when removing custom label colors. The colors should be deterministic. If you add a custom label color, it should not affect the colors of all the other labels, but only that of the target label.
Tabbed.Dashboard.1.mp4
@geido The problem may have existed before. I will fix this in this PR. |
/testenv up |
@stephenLYZ Ephemeral environment spinning up at http://52.36.247.190:8080. Credentials are |
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.
Tentatively re-approving as all new test scenarios are passing. @jinghua-qa another look from your side would be very appreciated!
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
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
In the current world, we have this problem:
• SharedLabelColors are calculated when the dashboard loads, but only for the visible tab(s)
• SharedLabelColors are only "reserved" if the label is used twice or more in the VISIBLE charts at load time.
• This means if a label is used once at load time, and then used by another chart when a hidden tab is loaded, the color will be inconsistent.
Current solution by @rusackas and @geido :
• When loading the initial dashboard, make ALL labels use reserved colors... not just those that are used more than once. In other words, assume that ALL colors will be shared/reused.
• Then, when you change tabs, any labels that are used the second time (or more) will already be in the SharedLabelColors
• When loading/exposing a hidden tab, you might see a new series/label for the first time. These should also be added to SharedLabelColors, in case a third or subsequent tab uses those.
Module Diagrams:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION