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(Explore): fixes broken layout of tooltips #14529
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14529 +/- ##
==========================================
+ Coverage 77.15% 77.35% +0.19%
==========================================
Files 958 960 +2
Lines 48241 49357 +1116
Branches 5636 6055 +419
==========================================
+ Hits 37219 38178 +959
- Misses 10821 10959 +138
- Partials 201 220 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
.control-label { | ||
margin-bottom: 0px; | ||
position: relative; | ||
span + span { |
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.
I was wondering if we should add class names to these and target those?
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.
I went ahead and moved these styles to a better location. I'll sleep better now, thanks for the suggestion.
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.
I think they're a little more solid now too... see if you can break it 🤞
@villebro You uncovered something gross... this PR only fixes SOME of the controls. A bunch of controls use Proposed approach:
|
Step 2 of the plan opened here: apache-superset/superset-ui#1107 |
@@ -49,7 +49,16 @@ export default class ControlHeader extends React.Component { | |||
renderOptionalIcons() { | |||
if (this.props.hovered) { | |||
return ( | |||
<span> | |||
<span | |||
css={theme => css` |
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.
css
👀 ... 🤣
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.
The debate of the ages! I'm actually working on a doc to specify use cases for each, and try to arrive at some sort of best practices. I'll share it when it's fully baked.
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 in light of the plan™
/testenv up |
@junlincc Ephemeral environment spinning up at http://34.214.11.39:8080. Credentials are |
Ephemeral environment shutdown and build artifacts deleted. |
* fix: moves LESS styles into Emotion, fixes broken layout of tooltips * fix: tests * style: linting * style: better styling location
* fix: moves LESS styles into Emotion, fixes broken layout of tooltips * fix: tests * style: linting * style: better styling location
* fix: moves LESS styles into Emotion, fixes broken layout of tooltips * fix: tests * style: linting * style: better styling location
SUMMARY
Fixes an issue where Explore control panels with long label text cause funky line-wrapping on mouseover. This was due to the
span
containing the tooltip(s) appearing inline, and getting to wide. This PR makes the tooltips absolutely positioned, so that they can't cause a line wrap. They might hang a little too far over to the right, but it's an improvement.As bycatch, this moves a bunch of CSS from LESS files to the component itself, using Emotion and theme variables.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Screen.Recording.2021-05-19.at.9.43.19.PM.mov
After:
TEST PLAN
ADDITIONAL INFORMATION