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: nav submenu dropdown styles #14580
Conversation
/testenv up |
@pkdotson Container image not yet published for this PR. Please try again when build is complete. |
@pkdotson Ephemeral environment creation failed. Please check the Actions logs for details. |
Codecov Report
@@ Coverage Diff @@
## master #14580 +/- ##
=======================================
Coverage 77.53% 77.54%
=======================================
Files 958 958
Lines 48533 48526 -7
Branches 5703 5702 -1
=======================================
- Hits 37631 37628 -3
+ Misses 10701 10698 -3
+ Partials 201 200 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@junlincc Ephemeral environment spinning up at http://34.213.183.152:8080. Credentials are |
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.
Couple of small things to try, but this looks SO much better! Happy to see less LESS!
lgtm thank you for the fix! 😊 |
… into fix-menu-styles
/testenv up |
@suddjian Ephemeral environment spinning up at http://35.160.171.141:8080. Credentials are |
Just needs a rebase... almost there. |
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.
Small nits. No blockers.
& > .ant-menu-submenu-title { | ||
padding: 0 ${({ theme }) => theme.gridUnit * 6}px 0 | ||
${({ theme }) => theme.gridUnit * 3}px !important; | ||
svg { | ||
position: absolute; | ||
top: ${({ theme }) => theme.gridUnit * 4}px; | ||
top: ${({ theme }) => theme.gridUnit * 4 + 7}px; |
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.
Perhaps top: ${({ theme }) => theme.gridUnit * 5 + 3}px;
?
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.
This depends on what relationship we want the svg to have to the grid unit. When pixel amounts are hardcoded, it should be to format the thing being positioned so that it can look right in any grid. We could also do theme.gridUnit * 6 - 1
, for example.
I'm a little bit unclear on what this change is meant to fix. Is there a corresponding issue for this or a video of the problematic behavior? |
@suddjian this is more of follow up to the navbar refactor that I merged. There were some body styles that needed to be removed from less to emotion. This is pr pretty much removes that and uses a css trick to get the dropdown to position correctly instead of overriding the inline styles from antd. |
…ix-menu-styles
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 just two nits
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
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
Ephemeral environment shutdown and build artifacts deleted. |
* fix nav submenu dropdown styles * lint * fix mobile view styles * run lint * address comments * undo comit lock files * Update superset-frontend/src/common/components/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> (cherry picked from commit 3ad8b54)
* fix nav submenu dropdown styles * lint * fix mobile view styles * run lint * address comments * undo comit lock files * Update superset-frontend/src/common/components/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
* fix nav submenu dropdown styles * lint * fix mobile view styles * run lint * address comments * undo comit lock files * Update superset-frontend/src/common/components/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
* fix nav submenu dropdown styles * lint * fix mobile view styles * run lint * address comments * undo comit lock files * Update superset-frontend/src/common/components/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
SUMMARY
This pr removes the style overrides for the drop down submenus with moving the position of the anchor instead of overriding the inline styles.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-05-11.at.2.11.45.PM.mov
TEST PLAN
ADDITIONAL INFORMATION