Skip to content
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

Merged
merged 3 commits into from
Nov 20, 2019

Conversation

nytai
Copy link
Member

@nytai nytai commented Nov 15, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2019-11-14 at 4 06 28 PM

Screen Shot 2019-11-14 at 4 06 55 PM

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

.filter-container .filter-badge-container + div {
width: 100%;
width: 100%;
z-index: 11;
Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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-indexs 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.

Copy link
Member

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

Copy link
Member

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-io
Copy link

codecov-io commented Nov 15, 2019

Codecov Report

Merging #8579 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
.../assets/src/visualizations/FilterBox/FilterBox.jsx 5.93% <ø> (ø) ⬆️
superset/utils/core.py 88.81% <0%> (+0.16%) ⬆️
superset/dataframe.py 94.48% <0%> (+0.78%) ⬆️
superset/db_engine_specs/sqlite.py 66.66% <0%> (+9.99%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff6ab10...a3b6603. Read the comment docs.

@nytai nytai marked this pull request as ready for review November 15, 2019 00:48
Copy link
Member

@etr2460 etr2460 left a 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;
Copy link
Member

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?

Copy link
Member

@etr2460 etr2460 left a 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;
Copy link
Member

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);

Copy link
Member

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;
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

@nytai nytai force-pushed the tai/filter-z-index branch from 6a4bed2 to a3b6603 Compare November 18, 2019 21:19
Copy link
Member

@etr2460 etr2460 left a 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

@nytai
Copy link
Member Author

nytai commented Nov 20, 2019

@etr2460 everything done on my end. Please merge when you get a chance, thanks!

@mistercrunch mistercrunch merged commit 54d9154 into apache:master Nov 20, 2019
@mistercrunch mistercrunch deleted the tai/filter-z-index branch November 20, 2019 06:55
@nytai nytai mentioned this pull request Nov 21, 2019
12 tasks
@dpgaspar dpgaspar added v0.35 and removed v0.35 labels Dec 20, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants