You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/13 22:10:05 UTC
[GitHub] [superset] Gwitchr opened a new pull request, #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Gwitchr opened a new pull request, #20067:
URL: https://github.com/apache/superset/pull/20067
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
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)
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
https://user-images.githubusercontent.com/22302890/168395532-ef3dc781-3415-4a76-82fa-23d796395bde.mov
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
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;
}
```
5. Add a Big Number Chart to the Dashboard.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #20067:
URL: https://github.com/apache/superset/pull/20067#issuecomment-1126563132
# [Codecov](https://codecov.io/gh/apache/superset/pull/20067?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#20067](https://codecov.io/gh/apache/superset/pull/20067?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aa2f260) into [master](https://codecov.io/gh/apache/superset/commit/62e1c34ffb042bcb9a624440cab7b7683b509b70?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (62e1c34) will **increase** coverage by `0.01%`.
> The diff coverage is `40.00%`.
```diff
@@ Coverage Diff @@
## master #20067 +/- ##
==========================================
+ Coverage 66.28% 66.30% +0.01%
==========================================
Files 1712 1713 +1
Lines 63968 64017 +49
Branches 6731 6754 +23
==========================================
+ Hits 42404 42448 +44
+ Misses 19853 19850 -3
- Partials 1711 1719 +8
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.33% <40.00%> (+0.05%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/20067?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...perset-ui-core/src/dimension/computeMaxFontSize.ts](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvZGltZW5zaW9uL2NvbXB1dGVNYXhGb250U2l6ZS50cw==) | `86.95% <40.00%> (-13.05%)` | :arrow_down: |
| [superset-frontend/src/reports/reducers/reports.js](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3JlcG9ydHMvcmVkdWNlcnMvcmVwb3J0cy5qcw==) | `38.09% <0.00%> (-36.91%)` | :arrow_down: |
| [...d/src/explore/components/PropertiesModal/index.tsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Qcm9wZXJ0aWVzTW9kYWwvaW5kZXgudHN4) | `63.93% <0.00%> (-4.92%)` | :arrow_down: |
| [...rset-frontend/src/components/ReportModal/index.tsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvUmVwb3J0TW9kYWwvaW5kZXgudHN4) | `78.33% <0.00%> (-4.21%)` | :arrow_down: |
| [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `56.80% <0.00%> (-4.13%)` | :arrow_down: |
| [...onalFormattingControl/FormattingPopoverContent.tsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Db25kaXRpb25hbEZvcm1hdHRpbmdDb250cm9sL0Zvcm1hdHRpbmdQb3BvdmVyQ29udGVudC50c3g=) | `51.35% <0.00%> (-2.94%)` | :arrow_down: |
| [...dashboard/components/SliceHeaderControls/index.tsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NsaWNlSGVhZGVyQ29udHJvbHMvaW5kZXgudHN4) | `63.85% <0.00%> (-2.40%)` | :arrow_down: |
| [...-frontend/src/components/AlteredSliceTag/index.jsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQWx0ZXJlZFNsaWNlVGFnL2luZGV4LmpzeA==) | `87.23% <0.00%> (-1.01%)` | :arrow_down: |
| [...ard/components/filterscope/FilterScopeSelector.jsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2ZpbHRlcnNjb3BlL0ZpbHRlclNjb3BlU2VsZWN0b3IuanN4) | `78.51% <0.00%> (-0.69%)` | :arrow_down: |
| [...ponents/controls/ControlPopover/ControlPopover.tsx](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9Db250cm9sUG9wb3Zlci9Db250cm9sUG9wb3Zlci50c3g=) | `89.09% <0.00%> (-0.66%)` | :arrow_down: |
| ... and [56 more](https://codecov.io/gh/apache/superset/pull/20067/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/20067?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/20067?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [62e1c34...aa2f260](https://codecov.io/gh/apache/superset/pull/20067?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] stephenLYZ commented on pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on PR #20067:
URL: https://github.com/apache/superset/pull/20067#issuecomment-1127322772
Thanks for the fix! It looks like the codecov didn't pass, so I'm guessing we might need to add some branch tests for this function.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Posted by GitBox <gi...@apache.org>.
kgabryje commented on PR #20067:
URL: https://github.com/apache/superset/pull/20067#issuecomment-1140296662
Replaced by https://github.com/apache/superset/pull/20173
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje closed pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Posted by GitBox <gi...@apache.org>.
kgabryje closed pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
URL: https://github.com/apache/superset/pull/20067
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Posted by GitBox <gi...@apache.org>.
kgabryje commented on PR #20067:
URL: https://github.com/apache/superset/pull/20067#issuecomment-1127367946
Also, it would be great to implement binary search for optimal font size instead of decrementing by 1 to improve performance, but that's definitely out of scope of this PR 🙂
Anyway, is the proposal from comment above is not viable or would require a large refactor, let's merge this fix (which is great!) and iterate on this later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] kgabryje commented on pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Posted by GitBox <gi...@apache.org>.
kgabryje commented on PR #20067:
URL: https://github.com/apache/superset/pull/20067#issuecomment-1127365623
Thanks for tagging me Ville! My fix doesn't cover the scenario presented by @Gwitchr, so I think this should go in.
I just wonder if we could break the loop quicker - instead of decrementing to below 0, maybe we could do a check like "if the size for font size x is the same as the size for x-1, return x". Wdyt?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] villebro commented on pull request #20067: fix: avoid while cycle in computeMaxFontSize for big Number run forever when css !important rule applied
Posted by GitBox <gi...@apache.org>.
villebro commented on PR #20067:
URL: https://github.com/apache/superset/pull/20067#issuecomment-1127358550
IIRC, @kgabryje already fixed a related problem in #19688 - I wonder if this additional check is still needed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org