-
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
increase z-index on filter box to fix bleeding of filter indicator #8579
Conversation
.filter-container .filter-badge-container + div { | ||
width: 100%; | ||
width: 100%; | ||
z-index: 11; |
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.
looks like vscode applied some autoformatting. This is the only actual change.
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 noticed your colleague was adding some .less files to standardize some variables. i've found it quite useful to keep all z indexes used in an app in a single constant file that we can then import wherever it's needed (naming this one filter-box-dropdown-layer
or something like that)
If you think that's out of scope for this PR, then maybe at least add a comment saying that we should clean that up in the future?
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.
@etr2460 Not out of scope, definitely happy to do it in this PR. Though it probably involved converting this file to a .less
file. Is there some convention around using/preferring css/less/sass(?).
z-index
s can get pretty messy pretty quickly. At some point it may be fruitful to define hierarchies throughout the app. eg, modal > dropdowns > tooltips > regular divs. So we can use variables like @z-index-dropdown
to abstract away the actual values.
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.
Yeah, defining hierarchies is something i'm definitely behind. I don't know of any preference between css/less/sass (i actually don't know why we're using all three) so i'd say you should do what you think is best here
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.
@etr2460 I was just going to jump into this thread, to say that exactly what you're proposing is part of my LESS refactor plan. A registry of z-index "layers" and what they're used for will be super handy to grow up with.
Codecov Report
@@ Coverage Diff @@
## master #8579 +/- ##
==========================================
+ Coverage 65.67% 65.69% +0.02%
==========================================
Files 474 474
Lines 23587 23587
Branches 2574 2574
==========================================
+ Hits 15491 15496 +5
+ Misses 7927 7922 -5
Partials 169 169
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.
lgtm with one possible improvement (not required though)
.filter-container .filter-badge-container + div { | ||
width: 100%; | ||
width: 100%; | ||
z-index: 11; |
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 noticed your colleague was adding some .less files to standardize some variables. i've found it quite useful to keep all z indexes used in an app in a single constant file that we can then import wherever it's needed (naming this one filter-box-dropdown-layer
or something like that)
If you think that's out of scope for this PR, then maybe at least add a comment saying that we should clean that up in the future?
a1cc83f
to
6a4bed2
Compare
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.
still lgtm, but a couple nits that might be nice to address
.filter_box:hover { | ||
z-index: 1000; | ||
z-index: 1000; |
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.
let's pull this one out too (while we're here?)
background-color: @value; | ||
} | ||
.badge-loop(@i - 1); | ||
} | ||
.badge-loop (@iterations); | ||
|
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.
Can we prefix this new section with a comment? something describing that z index variables go here now?
@@ -16,62 +16,45 @@ | |||
* specific language governing permissions and limitations | |||
* under the License. | |||
*/ | |||
@indicator-color: #44C0FF; | |||
@indicator-color: #44c0ff; |
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.
not complaining, but wondering what autoformatter fixed this. prettier?
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'm pretty sure it's prettier + vscode format on save. Happy to turn it off and revert these changes, however I saw there has been discussion about getting prettier into the FE codebase, so reverting may be a wasted effort.
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.
No need to revert! Was only curious
6a4bed2
to
a3b6603
Compare
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.
still looks good! I'll merge this if it's all done
@etr2460 everything done on my end. Please merge when you get a chance, thanks! |
CATEGORY
Choose one
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION
REVIEWERS