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

fix: nav submenu dropdown styles #14580

Merged
merged 10 commits into from May 17, 2021
Merged

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented May 11, 2021

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

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@pkdotson pkdotson changed the title Fix: nav submenu dropdown styles fix: nav submenu dropdown styles May 11, 2021
@pkdotson
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

@pkdotson Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

@pkdotson Ephemeral environment creation failed. Please check the Actions logs for details.

@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #14580 (9391f23) into master (6d9d362) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           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     
Flag Coverage Δ
javascript 72.52% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/common/components/index.tsx 100.00% <100.00%> (ø)
superset-frontend/src/components/Menu/Menu.tsx 65.00% <100.00%> (+1.36%) ⬆️
...nd/src/explore/components/ExploreViewContainer.jsx 2.32% <0.00%> (-0.02%) ⬇️
...uperset-frontend/src/components/Menu/MenuRight.tsx 93.18% <0.00%> (ø)
...nd/src/explore/components/ExploreActionButtons.tsx 72.34% <0.00%> (ø)
...ews/CRUD/annotationlayers/AnnotationLayersList.tsx 77.35% <0.00%> (ø)
...mponents/controls/MetricControl/MetricsControl.jsx 82.45% <0.00%> (ø)
...ontrols/FilterControl/AdhocFilterControl/index.jsx 57.69% <0.00%> (ø)
superset-frontend/src/components/Menu/SubMenu.tsx 96.87% <0.00%> (+1.28%) ⬆️
superset-frontend/src/components/Icons/Icon.tsx 100.00% <0.00%> (+4.00%) ⬆️
... and 1 more

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 6d9d362...9391f23. Read the comment docs.

@junlincc
Copy link
Member

/testenv up

@junlincc junlincc added the bash! label May 11, 2021
@github-actions
Copy link
Contributor

@junlincc Ephemeral environment spinning up at http://34.213.183.152:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@rusackas rusackas requested review from suddjian and nytai May 11, 2021 23:42
Copy link
Member

@rusackas rusackas left a 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!

@junlincc
Copy link
Member

lgtm thank you for the fix! 😊

@junlincc junlincc added the need:review Requires a code review label May 13, 2021
@suddjian
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@suddjian Ephemeral environment spinning up at http://35.160.171.141:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@rusackas
Copy link
Member

Just needs a rebase... almost there.

Copy link
Member

@michael-s-molina michael-s-molina left a 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.

superset-frontend/src/common/components/index.tsx Outdated Show resolved Hide resolved
& > .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;
Copy link
Member

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

Copy link
Member

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.

@suddjian
Copy link
Member

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?

@pkdotson
Copy link
Member Author

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.

Copy link
Member

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

superset-frontend/src/components/Menu/MenuRight.tsx Outdated Show resolved Hide resolved
superset-frontend/src/components/Menu/MenuRight.tsx Outdated Show resolved Hide resolved
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rusackas rusackas merged commit 3ad8b54 into apache:master May 17, 2021
@rusackas rusackas deleted the fix-menu-styles branch May 17, 2021 20:58
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@junlincc junlincc added rush! Requires immediate attention and removed need:review Requires a code review labels May 18, 2021
henryyeh pushed a commit to preset-io/superset that referenced this pull request May 18, 2021
* 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)
@junlincc junlincc removed the rush! Requires immediate attention label May 27, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* 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>
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* 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>
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* 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>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 preset-io size/M 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants