Skip to content

fix: Removing specific column widths, letting things flex naturally.#14637

Merged
villebro merged 1 commit into
masterfrom
fixing-submenu-header-layout
May 14, 2021
Merged

fix: Removing specific column widths, letting things flex naturally.#14637
villebro merged 1 commit into
masterfrom
fixing-submenu-header-layout

Conversation

@rusackas
Copy link
Copy Markdown
Member

@rusackas rusackas commented May 14, 2021

SUMMARY

The SubMenu component was recently re-jiggered to use a grid (row/col) layout, and the text/header was given a fixed width, which caused line-wrapping. This PR uses the Row component's automatic layout to avoid this.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image

After:
image

TEST PLAN

Go to Alerts and Reports, and make sure you don't see awkward line-wrapping when the browser is narrow.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2021

Codecov Report

Merging #14637 (eb8aa80) into master (e4d2424) will decrease coverage by 0.24%.
The diff coverage is 100.00%.

❗ Current head eb8aa80 differs from pull request most recent head 1bac907. Consider uploading reports for the commit 1bac907 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14637      +/-   ##
==========================================
- Coverage   77.47%   77.23%   -0.25%     
==========================================
  Files         958      958              
  Lines       48486    48481       -5     
  Branches     5679     5681       +2     
==========================================
- Hits        37565    37443     -122     
- Misses      10721    10838     +117     
  Partials      200      200              
Flag Coverage Δ
hive ?
javascript 72.51% <100.00%> (-0.01%) ⬇️
presto ?

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

Impacted Files Coverage Δ
...components/DashboardBuilder/DashboardContainer.tsx 100.00% <ø> (ø)
superset-frontend/src/components/Menu/SubMenu.tsx 95.58% <100.00%> (-0.13%) ⬇️
superset-frontend/src/components/Tabs/Tabs.tsx 96.55% <100.00%> (-0.33%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 70.32% <0.00%> (-17.08%) ⬇️
superset/db_engine_specs/presto.py 83.36% <0.00%> (-6.95%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 88.58% <0.00%> (-1.69%) ⬇️
superset/db_engine_specs/base.py 88.01% <0.00%> (-0.42%) ⬇️
superset/models/core.py 88.85% <0.00%> (-0.28%) ⬇️
... 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 e4d2424...1bac907. Read the comment docs.

Copy link
Copy Markdown
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM; I clicked around menus that were affected and did aggressive resizing, and they all now look much better 👍

@villebro villebro requested a review from kgabryje May 14, 2021 08:58
Copy link
Copy Markdown
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

LGTM! (+ a few low priority nits)

@villebro villebro merged commit bf90885 into master May 14, 2021
@villebro villebro deleted the fixing-submenu-header-layout branch May 14, 2021 09:12
const [navRightStyle, setNavRightStyle] = useState('nav-right');
const [navRightCol, setNavRightCol] = useState(8);

const { headerSize = 2 } = props;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that we can remove headerSize from SubMenuProps (line 153), it doesn't seem to be used anymore.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can also remove passing headerSize to SubMenu from CssTemplatesList and AnnotationLayersList

@junlincc junlincc added the rush! Requires immediate attention label May 18, 2021
henryyeh pushed a commit to preset-io/superset that referenced this pull request May 18, 2021
@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
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 First shipped in 1.3.0 labels Mar 12, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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/XS 🚢 1.3.0 First shipped in 1.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants