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: avoid while cycle in computeMaxFontSize for big Number run forever when css rule applied #20173

Conversation

diegomedina248
Copy link
Contributor

@diegomedina248 diegomedina248 commented May 24, 2022

SUMMARY

Adding custom CSS to a dashboard with a bigInt chart would activate a while loop that didn't ever finished, which somehow wasn't caught by the surrounding ErrorBoundary cause the whole app crashed before running out of memory (my guess)

Follow up on #20067, adding the missing titles

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

168395532-ef3dc781-3415-4a76-82fa-23d796395bde.1.mov

TESTING INSTRUCTIONS

  1. Create a Dashboard.
  2. Access it on edit mode.
  3. Click on the three ellipses on the top right corner > Edit CSS.
  4. Add below CSS code to it:
.header-line {
  font-size: 170px!important;
}
  1. Add a Big Number Chart to the Dashboard.

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

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #20173 (ce547f4) into master (ce547f4) will not change coverage.
The diff coverage is n/a.

❗ Current head ce547f4 differs from pull request most recent head 1e8fa65. Consider uploading reports for the commit 1e8fa65 to get more accurate results

@@           Coverage Diff           @@
##           master   #20173   +/-   ##
=======================================
  Coverage   66.44%   66.44%           
=======================================
  Files        1721     1721           
  Lines       64548    64548           
  Branches     6811     6811           
=======================================
  Hits        42890    42890           
  Misses      19925    19925           
  Partials     1733     1733           
Flag Coverage Δ
hive 53.72% <0.00%> (ø)
javascript 51.32% <0.00%> (ø)
mysql 82.14% <0.00%> (ø)
postgres 82.20% <0.00%> (ø)
presto 53.58% <0.00%> (ø)
python 82.63% <0.00%> (ø)
sqlite 81.94% <0.00%> (ø)
unit 49.43% <0.00%> (ø)

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce547f4...1e8fa65. Read the comment docs.

@diegomedina248 diegomedina248 force-pushed the fix/using-the-important-rule-on-a-custom-css branch from d792183 to 1e8fa65 Compare May 24, 2022 21:16
Copy link
Member

@stephenLYZ stephenLYZ left a comment

Choose a reason for hiding this comment

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

LGTM!

@stephenLYZ stephenLYZ merged commit 365acee into apache:master May 25, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
michael-s-molina pushed a commit that referenced this pull request Aug 30, 2022
…er when css rule applied (#20173)

(cherry picked from commit 365acee)
@mistercrunch mistercrunch added 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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 Preset-Patch size/S 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants