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

Merged
merged 19 commits into from
Nov 21, 2024

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 with limitations:
    • The color scheme cannot be changed if the chart shares labels with multiple charts in the Dashboard.
    • When setting custom label colors via the advanced settings of the Dashboard, the custom label colors will always be enforced also when a color scheme is not set for the Dashboard.
    • The chart should consistently display colors that match those used in the Dashboard.

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
@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
@rusackas

This comment was marked as outdated.

@geido geido added the hold:testing! On hold for testing label Nov 13, 2024
@kgabryje
Copy link
Member

/testenv up

Copy link
Contributor

@kgabryje Ephemeral environment spinning up at http://35.93.185.64:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@geido geido force-pushed the geido/fix/color-consistency-race-conditions branch 6 times, most recently from 3f7df9f to 84ea4d6 Compare November 21, 2024 16:14
@geido geido removed the hold:testing! On hold for testing label Nov 21, 2024
@geido geido force-pushed the geido/fix/color-consistency-race-conditions branch from 84ea4d6 to 02c5b5d Compare November 21, 2024 16:28
@geido geido force-pushed the geido/fix/color-consistency-race-conditions branch from 02c5b5d to d78af29 Compare November 21, 2024 17:35
@geido geido merged commit 90572be into master Nov 21, 2024
34 checks passed
asher-lab added a commit to asher-lab/superset that referenced this pull request Nov 22, 2024
* fix: Exception handling for SQL Lab views (apache#30897)

* fix: don't show metadata for embedded dashboards (apache#30875)

* feat: add logging durations for screenshot async service (apache#30884)

* refactor(Avatar): Migrate Avatar to Ant Design 5 (apache#30740)

* refactor(input): Migrate Input component to Ant Design 5 (apache#30730)

* fix(empty dashboards): Allow downloading a screenshot of an empty dashboard (apache#30767)

Co-authored-by: Geido <[email protected]>

* chore(ci): add tai and michael to helm owners (apache#30925)

* fix(helm): use submodule on helm release action (apache#30924)

* docs: add Free2Move to INTHEWILD.md (apache#30930)

* fix: blocks UI elements on right side (apache#30886)

Co-authored-by: Evan Rusackas <[email protected]>

* chore(deps): Migrate from `crate[sqlalchemy]` to `sqlalchemy-cratedb` (apache#29243)

* chore: update change log, UPDATING.md and bug-report.yml for 4.1 release (apache#30915)

* chore(docs): Update list of supported databases to include CrateDB (apache#30946)

* feat(trino,presto): add missing time grains (apache#30926)

* fix(Dashboard): Exclude edit param in async screenshot (apache#30962)

* fix(Card): Use correct class names for Ant Design 5 Card component (apache#30964)

* chore(Accessibility): Fix accessibility for 'Show x entries' dropdown in tables (apache#30818)

* build(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /superset-frontend/cypress-base (apache#30969)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(release validation): scripts now support RSA and EDDSA keys. (apache#30967)

* build(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /docs (apache#30970)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: add performance information to tooltip (apache#30948)

* fix(helm-chart): Fix broken PodDisruptionBudget due to introduction of extraLabels. (apache#30966)

* chore(helm): bumping app version to 4.1.1 in helm chart (apache#30918)

* chore: add unit tests for `is_mutating()` (apache#31021)

* chore(🦾): bump python numexpr 2.10.0 -> 2.10.1 (apache#31006)

Co-authored-by: GitHub Action <[email protected]>

* chore(🦾): bump python cffi 1.16.0 -> 1.17.1 (apache#31002)

Co-authored-by: GitHub Action <[email protected]>

* chore(🦾): bump python flask-babel subpackage(s) (apache#31000)

Co-authored-by: GitHub Action <[email protected]>

* fix(Dashboard): Retain colors when color scheme not set (apache#30646)

* fix(explore): verified props is not updated (apache#31008)

* chore: publish wheels (apache#30981)

* docs: Embedded sdk (apache#30972)

* fix(imports): import query_context for imports with charts (apache#30887)

* docs: Update doc about CSV upload (apache#30867)

Co-authored-by: Evan Rusackas <[email protected]>

* chore(🦾): bump python cattrs 23.2.3 -> 24.1.2 (apache#30998)

Co-authored-by: GitHub Action <[email protected]>

* fix(dataset): use sqlglot for DML check (apache#31024)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
Co-authored-by: Joe Li <[email protected]>
Co-authored-by: Maxime Beauchemin <[email protected]>
Co-authored-by: Mehmet Salih Yavuz <[email protected]>
Co-authored-by: Geido <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Paolo Terzi <[email protected]>
Co-authored-by: Sukuna <[email protected]>
Co-authored-by: Evan Rusackas <[email protected]>
Co-authored-by: Andreas Motl <[email protected]>
Co-authored-by: Andreas Motl <[email protected]>
Co-authored-by: Levis Mbote <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <[email protected]>
Co-authored-by: Christoph Keller <[email protected]>
Co-authored-by: lodu <[email protected]>
Co-authored-by: Beto Dealmeida <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: JUST.in DO IT <[email protected]>
Co-authored-by: David Hotham <[email protected]>
Co-authored-by: Giampaolo Capelli <[email protected]>
Co-authored-by: Linden <[email protected]>
Co-authored-by: Seiya <[email protected]>
Co-authored-by: Asher Manangan <[email protected]>
sadpandajoe pushed a commit that referenced this pull request Nov 22, 2024
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 packages plugins size/XXL v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch
Projects
Status: Cherried
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
6 participants