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-echarts): layout broken when resizing #20783

Merged
merged 2 commits into from
Jul 20, 2022

Conversation

stephenLYZ
Copy link
Member

SUMMARY

The essence of this problem is the inconsistency between the width and height of the parent container and the actual echart resize. Since our outer layer is based on useResizeDetector to debounce the width and height change, there is a probability of inconsistency, so we do not put useEffect here to ensure that resize and render execution are idempotent.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

2022-07-20.5.00.29.mov

after

2022-07-20.4.58.44.mov

TESTING INSTRUCTIONS

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

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Merging #20783 (046faf2) into master (9c7bcfc) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #20783      +/-   ##
==========================================
- Coverage   66.30%   66.30%   -0.01%     
==========================================
  Files        1756     1756              
  Lines       66735    66739       +4     
  Branches     7049     7049              
==========================================
  Hits        44251    44251              
- Misses      20688    20692       +4     
  Partials     1796     1796              
Flag Coverage Δ
javascript 51.92% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ins/plugin-chart-echarts/src/components/Echart.tsx 0.00% <0.00%> (ø)

@rusackas rusackas merged commit d90b973 into apache:master Jul 20, 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 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/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants