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(plugin-chart-table): Upgrade old color formats #21101

Merged
merged 3 commits into from
Aug 16, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Aug 16, 2022

SUMMARY

First version of table conditional formatter was using rgb() format to describe colors. Later we changed it to hex notation, which broke the existing color formatters. This PR adds a migration of old color formatters to use hex notation.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screenshot 2022-08-16 at 16 27 48

After:
Screenshot 2022-08-16 at 16 25 02

TESTING INSTRUCTIONS

  1. Open a table chart with conditional formatters using the old color formats (or just manually edit the form data in the database with 1 of rgb(255,0,0) for red, rgb(255,255,0) for yellow or rgb(0,255,0) for green.
  2. Run the migration
  3. Verify that the conditional formatters apply colors correctly.
  4. The conditional formatters that were already using the new color notation should remain unchanged.

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
      Current: 0.56 s
      10+: 0.85 s
      100+: 0.64 s
      1000+: 0.54 s
  • Introduces new feature or API
  • Removes existing feature or API

@kgabryje kgabryje requested a review from a team as a code owner August 16, 2022 14:43
@kgabryje kgabryje marked this pull request as draft August 16, 2022 14:55
@kgabryje kgabryje marked this pull request as ready for review August 16, 2022 14:58
@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #21101 (47a5cb9) into master (5c2a1f8) will decrease coverage by 0.72%.
The diff coverage is 55.00%.

❗ Current head 47a5cb9 differs from pull request most recent head 85a5dbc. Consider uploading reports for the commit 85a5dbc to get more accurate results

@@            Coverage Diff             @@
##           master   #21101      +/-   ##
==========================================
- Coverage   66.27%   65.55%   -0.73%     
==========================================
  Files        1770     1770              
  Lines       67530    67543      +13     
  Branches     7182     7185       +3     
==========================================
- Hits        44758    44276     -482     
- Misses      20936    21428     +492     
- Partials     1836     1839       +3     
Flag Coverage Δ
hive 53.16% <ø> (ø)
mysql ?
postgres ?
presto 53.06% <ø> (ø)
python 79.99% <ø> (-1.50%) ⬇️
sqlite 79.61% <ø> (ø)
unit 50.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ns/plugin-chart-echarts/src/Gauge/controlPanel.tsx 66.66% <ø> (ø)
...nd/plugins/plugin-chart-echarts/src/Gauge/types.ts 100.00% <ø> (ø)
...end/src/components/Datasource/DatasourceEditor.jsx 65.61% <0.00%> (-0.27%) ⬇️
...s/plugin-chart-echarts/src/Gauge/transformProps.ts 76.92% <57.89%> (-4.90%) ⬇️
superset/datasets/commands/update.py 25.00% <0.00%> (-69.05%) ⬇️
superset/datasets/commands/create.py 29.41% <0.00%> (-68.63%) ⬇️
superset/datasets/commands/delete.py 38.63% <0.00%> (-54.55%) ⬇️
superset/datasets/commands/bulk_delete.py 33.33% <0.00%> (-53.34%) ⬇️
superset/datasets/columns/commands/delete.py 44.11% <0.00%> (-52.95%) ⬇️
superset/datasets/metrics/commands/delete.py 44.11% <0.00%> (-52.95%) ⬇️
... and 30 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@kgabryje kgabryje merged commit 8005b7f into apache:master Aug 16, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants