-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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: Loading overlay bugfix and cleanup #10105
fix: Loading overlay bugfix and cleanup #10105
Conversation
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.
a couple comments, thanks for fixing this!
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.
a couple comments, thanks for fixing this!
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.
Awesome, works like a charm!
Codecov Report
@@ Coverage Diff @@
## master #10105 +/- ##
==========================================
- Coverage 70.56% 70.46% -0.10%
==========================================
Files 590 590
Lines 31150 31209 +59
Branches 3164 3192 +28
==========================================
+ Hits 21981 21992 +11
- Misses 9060 9101 +41
- Partials 109 116 +7
Continue to review full report at Codecov.
|
@etr2460 This PR is like pulling a loose thread on a sweater... I simplified a few more things, by consolidating some global LESS into the component, and removing the className in favor of additional "position" options. I hope this all makes sense. It seems simpler to me, anyway. I think the only recognizable visual diff is that the "inline" style is 10px narrower, which looks better to my eye, in the one place it's used: |
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.
lgtm with the exception of the one cleanup line
Looks like this instance needs to be updated too: https://github.com/preset-io/incubator-superset/blob/master/superset-frontend/src/components/ListView/ListView.tsx#L120 |
d9f598b
to
22f0381
Compare
* fix: reordering DOM output, simplifying styles, Emotionalizing * simplification * converting RefreshChartOverlay to TS * Loading -> TS, stripping unused size prop * simplification... * just letting "position" prop act as a class name. Simpler! * consolidating styles, changing a className prop to a position prop. * nixing (unused) classname prop * replacing inline loading img with the proper Loading component * BY THERE. * position prop is optional! (cherry picked from commit 36ea42f)
* fix: reordering DOM output, simplifying styles, Emotionalizing * simplification * converting RefreshChartOverlay to TS * Loading -> TS, stripping unused size prop * simplification... * just letting "position" prop act as a class name. Simpler! * consolidating styles, changing a className prop to a position prop. * nixing (unused) classname prop * replacing inline loading img with the proper Loading component * BY THERE. * position prop is optional!
SUMMARY
Initial report:
Issue uncovered:
The loader was indeed there, but buried (z-index-wise) below the controls.
The fix:
Could this be fixed with one line of CSS? Yep! But that's not the right way. This PR does the following:
Reverses the rendering order of the three key layers in
chart.jsx
so the Loader is atop the Refresh overlay atop the Chart itself. Not sure why it would be the other way, but if anyone has some idea, let me know!Touches up a bunch of CSS to make the positioning of those re-stacked elements work
Moves the CSS out of LESS and into Emotion 👩🎤
Migrates
Loading
andRefreshChartOverlay
components to tsx.Removes the
size
prop from Loading, which sure seems to be unusedRemoves some unused css for a "dismiss" button that no longer seems to exist.
BEFORE
AFTER
TEST PLAN
ADDITIONAL INFORMATION