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-period-over-period-kpi): Blank chart when switching from BigNumberTotal #27203

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Feb 22, 2024

SUMMARY

When user creates and saves a Big Number chart and then switches to Big Number Period over Period, the chart appears blank. The reason for that is that Period over Period chart expects the values coming from header_font_size control to be pixels. However, the old Big Number chart uses proportions (0.2-0.6) in that control, so when the new chart inherits those values, the size in pixels is <1, so it seems blank.
This PR implements a mapping between proportion values used in Big Number and actual pixel size values expected by Period over Period chart.

Additionally, this PR moves the KPI chart to a common directory with other BigNumber plugins so that they can share to font size controls.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

  1. Create a new Big number chart using the Vehicle Sales chart.
  2. Save the chart
  3. Switch to Big Number with Time Period Comparison" chart
  4. Finally, update the chart.
  5. Verify that the chart renders correctly

TESTING INSTRUCTIONS

Before:

Screen.Recording.2024-02-22.at.14.43.40.mov

After:

Screen.Recording.2024-02-22.at.14.42.56.mov

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

@kgabryje kgabryje marked this pull request as ready for review February 22, 2024 14:09
Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez 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 making these changes, I left a couple comments but nothing blocking.

Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.

Project coverage is 69.68%. Comparing base (127df24) to head (dd23f80).
Report is 1509 commits behind head on master.

Files with missing lines Patch % Lines
...s/src/BigNumber/BigNumberPeriodOverPeriod/utils.ts 81.25% 0 Missing and 3 partials ⚠️
...s/src/BigNumber/BigNumberPeriodOverPeriod/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #27203      +/-   ##
==========================================
+ Coverage   69.58%   69.68%   +0.10%     
==========================================
  Files        1905     1908       +3     
  Lines       74580    74517      -63     
  Branches     8330     8309      -21     
==========================================
+ Hits        51893    51924      +31     
+ Misses      20637    20540      -97     
- Partials     2050     2053       +3     
Flag Coverage Δ
javascript 57.18% <76.47%> (+0.17%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kgabryje kgabryje merged commit 5403797 into apache:master Feb 22, 2024
34 checks passed
@sadpandajoe
Copy link
Member

🏷️ preset:2024.8

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Feb 22, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Feb 28, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 4, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 7, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 8, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 14, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 19, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 22, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 26, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 26, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Mar 28, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 1, 2024
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 2, 2024
betodealmeida pushed a commit that referenced this pull request Apr 25, 2024
eschutho pushed a commit that referenced this pull request Jun 5, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.1.0 labels Nov 27, 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 dependencies:npm plugins size/L 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants