Skip to content
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(Dashboard): Retain colors when color scheme not set #30646

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

geido
Copy link
Member

@geido geido commented Oct 17, 2024

SUMMARY

This PR does the following:

  • It fixes an issue for which colors would sometimes not keep their consistency when leaving and revisiting the Dashboard.
  • It fixes an issue for which charts original color schemes were not tracked making falling back to their origin color scheme impossible when removing the color scheme from the Dashboard.
  • It attempts to fix and re-enable skipped E2E tests that are critical for the coverage of the color consistency implementation.
  • Fixes Cannot set color scheme for dashboard-associated chart even when dashboard color scheme is cleared #23874

BEFORE

Color.Consistency.Test.mp4

AFTER

Color.Consistency.Test.1.mp4

TESTING INSTRUCTIONS

  1. Open a Dashboard with a color scheme and shared label colors
  2. Edit the Dashboard properties and remove the color scheme
  3. After applying the changes, verify that shared label colors are still respected
  4. For charts that do not share labels, verify their original color scheme is respected
  5. Save and exit the Dashboard by going to the Dashboard lists
  6. Come back again to the same Dashboard you just saved
  7. Make sure colors haven't changed from the previous state

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@hanslemm
Copy link
Contributor

hanslemm commented Oct 18, 2024

Upvote for this. This problem is annoying.

@geido geido force-pushed the geido/fix/color-consistency-race-conditions branch from f65b57b to 23dbe5e Compare October 18, 2024 15:22
@geido geido marked this pull request as ready for review October 18, 2024 15:23
@dosubot dosubot bot added the dashboard:colors Related to the color scheme of the Dashboard label Oct 18, 2024
@geido geido force-pushed the geido/fix/color-consistency-race-conditions branch from 23dbe5e to 7e23659 Compare October 18, 2024 15:43
@rusackas
Copy link
Member

OMG thank you!

@geido geido requested a review from fisjac October 18, 2024 16:03
@@ -42,15 +42,29 @@ function openProperties() {
cy.getBySel('header-actions-menu')
.contains('Edit properties')
.click({ force: true });
cy.wait(500);
cy.get('.ant-modal-body').should('be.visible');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could add a data-test attribute to select if that's considered more stable than the antD class name.

@apache apache deleted a comment from github-actions bot Oct 18, 2024
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing, LGTM!

@geido
Copy link
Member Author

geido commented Oct 18, 2024

I will try to tackle an issue for which after deleting a color scheme from a Dashboard and then editing the Chart from the Dashboard, Explore won't allow to customize the color.

Copy link
Contributor

@fisjac fisjac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michael-s-molina michael-s-molina added review:checkpoint Last PR reviewed during the daily review standup v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch labels Oct 18, 2024
@geido geido added the hold! On hold label Oct 18, 2024
@michael-s-molina michael-s-molina removed the review:checkpoint Last PR reviewed during the daily review standup label Oct 21, 2024
@geido geido requested a review from villebro as a code owner October 24, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:colors Related to the color scheme of the Dashboard hold! On hold packages plugins size/XL v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch
Projects
Status: Non-blocker
Development

Successfully merging this pull request may close these issues.

Cannot set color scheme for dashboard-associated chart even when dashboard color scheme is cleared
5 participants