-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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: Clean up custom css when dashboard unmounted #19342
fix: Clean up custom css when dashboard unmounted #19342
Conversation
() => () => { | ||
// need to clean up custom css | ||
// when dashboard unmounts | ||
injectCustomCss(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at line 235, it seems like the function injectCustomCss
was designed to handle the cleanup (or that was the intention).
I would recommend reviewing that function and finding out why is it not working.
The useEffect
from above should be sufficient then.
Codecov Report
@@ Coverage Diff @@
## master #19342 +/- ##
========================================
Coverage 66.59% 66.59%
========================================
Files 1670 1676 +6
Lines 63888 64703 +815
Branches 6510 6519 +9
========================================
+ Hits 42544 43088 +544
- Misses 19655 19924 +269
- Partials 1689 1691 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
LGTM! Thanks! |
* clean up custom css when dashboard unmounted * resolve comment (cherry picked from commit a88fa89)
🏷️ preset:2022.13 |
* clean up custom css when dashboard unmounted * resolve comment
SUMMARY
This happened because the previous version didn't clear customCss when dashboard is unmounted.
So user could see injected css unless the browser was refreshed by force or some reason.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE:
[DEV] Superset - 23 March 2022 - Watch Video
AFTER:
[DEV] Superset - 23 March 2022 - Watch Video
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION