Skip to content

fix(dashboard): replace position:fixed on filter apply button with flex layout#39250

Closed
sadpandajoe wants to merge 8 commits into
masterfrom
sc-101082-filter-apply-button-scale
Closed

fix(dashboard): replace position:fixed on filter apply button with flex layout#39250
sadpandajoe wants to merge 8 commits into
masterfrom
sc-101082-filter-apply-button-scale

Conversation

@sadpandajoe
Copy link
Copy Markdown
Member

@sadpandajoe sadpandajoe commented Apr 9, 2026

SUMMARY

The filter bar's Apply button used position: fixed; bottom: 0 which breaks at high display scale
factors (e.g. 150% on a 1920×1080 monitor). At 150% OS scale the CSS viewport shrinks and the
fixed-position button can be clipped or misaligned with the panel.

This replaces the fixed positioning with a proper flex layout:

  • Bar gets an explicit height and overflow: hidden, acting as the flex column container
  • The scrollable content area uses flex: 1; min-height: 0; overflow: auto to fill remaining space
  • ActionButtons becomes a natural flex footer, always visible at the bottom regardless of zoom
  • Removes the 108px padding-bottom hack on FilterControlsWrapper (only needed to avoid content
    hidden under the fixed button)
  • Removes the width prop from ActionButtons (no longer needed without fixed positioning)

Also fixes false-green tests: the old getComputedStyle position check always passed in jsdom
since jsdom doesn't apply emotion class-based CSS. Replaced with @emotion/jest toHaveStyleRule
assertions that read from emotion's actual CSS rules.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

After:

Screen.Recording.2026-04-24.at.1.13.31.PM.mov

TESTING INSTRUCTIONS

  1. Open any dashboard with the vertical filter bar enabled
  2. Verify the Apply/Clear buttons are visible at the bottom of the filter panel
  3. Scroll the filter list — buttons should remain pinned at the bottom
  4. Set OS display scaling to 150% (or use browser zoom 150%) and verify buttons are still correctly
    positioned within the filter panel
  5. Toggle between vertical and horizontal filter bar orientations — both should work correctly

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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

…ex layout

The filter bar's Apply button used position:fixed;bottom:0 which is
fragile at high display scale factors (e.g. 150% on 1920x1080). At
150% OS scale the CSS viewport shrinks to 720px and the fixed button
could be clipped or misaligned with the panel due to missing left
anchor and subpixel rounding.

Replace the approach with a proper flex layout: Bar now has an
explicit height (scrollable-area height + filter-bar-header height),
the scrollable content area uses flex:1/min-height:0 to fill remaining
space, and the ActionButtons are a natural flex footer always visible
at the bottom of the panel regardless of zoom level.

Also removes the 108px padding-bottom hack from FilterControlsWrapper
that was only needed to avoid content being hidden under the fixed
button.

Closes sc-101082

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 81.48148% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.62%. Comparing base (151d7d7) to head (891753a).
⚠️ Report is 76 commits behind head on master.

Files with missing lines Patch % Lines
...nts/controls/DateFilterControl/DateFilterLabel.tsx 77.77% 4 Missing ⚠️
...rd/components/nativeFilters/FilterBar/Vertical.tsx 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #39250      +/-   ##
==========================================
+ Coverage   64.44%   64.62%   +0.17%     
==========================================
  Files        2560     2558       -2     
  Lines      133574   133040     -534     
  Branches    31017    30919      -98     
==========================================
- Hits        86082    85976     -106     
+ Misses      45999    45575     -424     
+ Partials     1493     1489       -4     
Flag Coverage Δ
javascript 66.44% <81.48%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member Author

@sadpandajoe sadpandajoe left a comment

Choose a reason for hiding this comment

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

Removed unused review

…ns, document barHeight

- Replace window.getComputedStyle() position check (always passes in jsdom
  since jsdom does not apply emotion class-based CSS) with @emotion/jest
  toHaveStyleRule(), which reads from emotion's actual CSS rules
- Add meaningful layout assertions: vertical container has display:flex and
  flex-direction:column; both orientations are confirmed to have no
  position:fixed
- Add horizontal orientation test to cover the margin-left:auto layout path
- Document the barHeight calculation assumption in Vertical.tsx: the `height`
  prop equals (100vh - FILTER_BAR_HEADER_HEIGHT - MAIN_HEADER_HEIGHT), so
  adding FILTER_BAR_HEADER_HEIGHT back gives the total panel height
- Add comment to tabPaneStyle useMemo explaining the intentional empty deps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Apr 10, 2026
@sadpandajoe sadpandajoe changed the title [sc-101082] Fix filter apply button hidden at 150% display scale fix(dashboard): fix filter apply button hidden at 150% display scale Apr 10, 2026
…ply-button-scale

# Conflicts:
#	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/ActionButtons.test.tsx
#	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx
@pull-request-size pull-request-size Bot added size/M and removed size/L labels Apr 16, 2026
@sadpandajoe sadpandajoe added the 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR label Apr 23, 2026
@github-actions github-actions Bot added 🎪 2eb9926 🚦 building Environment 2eb9926 status: building 🎪 2eb9926 📅 2026-04-23T00-36 Environment 2eb9926 created at 2026-04-23T00-36 🎪 2eb9926 🤡 sadpandajoe Environment 2eb9926 requested by sadpandajoe 🎪 ⌛ 48h Environment expires after 48 hours (default) and removed 🎪 ⚡ showtime-trigger-start Create new ephemeral environment for this PR labels Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime is building environment on GHA for 2eb9926

@github-actions github-actions Bot added 🎪 2eb9926 🚦 deploying Environment 2eb9926 status: deploying 🎪 2eb9926 🚦 running Environment 2eb9926 status: running 🎪 🎯 2eb9926 Active environment pointer - 2eb9926 is receiving traffic 🎪 2eb9926 🌐 34.223.235.243:8080 Environment 2eb9926 URL: http://34.223.235.243:8080 (click to visit) and removed 🎪 2eb9926 🚦 building Environment 2eb9926 status: building 🎪 2eb9926 🚦 deploying Environment 2eb9926 status: deploying 🎪 2eb9926 🚦 running Environment 2eb9926 status: running 🎪 🎯 2eb9926 Active environment pointer - 2eb9926 is receiving traffic labels Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime deployed environment on GHA for 2eb9926

Environment: http://34.223.235.243:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

@github-actions github-actions Bot added 🎪 7cb7e8d 🚦 running Environment 7cb7e8d status: running 🎪 🎯 7cb7e8d Active environment pointer - 7cb7e8d is receiving traffic 🎪 7cb7e8d 🌐 16.147.40.138:8080 Environment 7cb7e8d URL: http://16.147.40.138:8080 (click to visit) and removed 🎪 7cb7e8d 🚦 running Environment 7cb7e8d status: running 🎪 🎯 7cb7e8d Active environment pointer - 7cb7e8d is receiving traffic 🎪 0741432 🚦 running Environment 0741432 status: running 🎪 0741432 📅 2026-04-24T06-24 Environment 0741432 created at 2026-04-24T06-24 🎪 0741432 🤡 sadpandajoe Environment 0741432 requested by sadpandajoe 🎪 0741432 🌐 44.249.30.169:8080 Environment 0741432 URL: http://44.249.30.169:8080 (click to visit) labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime deployed environment on GHA for 7cb7e8d

Environment: http://16.147.40.138:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

autoAdjustOverflow was set to false during the Ant Design 5 migration
(#31973) as a mechanical conversion, not a design decision. Enabling
it lets Ant Design reposition the popover when it would extend beyond
the viewport — critical when the time range filter trigger is near the
bottom of the filter panel at 150% zoom.

Combined with the max-height + scrollable content fix, this gives two
layers of protection: repositioning first, then scrolling if still
too tall.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added 🎪 1d4c394 🚦 building Environment 1d4c394 status: building 🎪 1d4c394 📅 2026-04-24T21-02 Environment 1d4c394 created at 2026-04-24T21-02 🎪 1d4c394 🤡 sadpandajoe Environment 1d4c394 requested by sadpandajoe labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime is building environment on GHA for 1d4c394

@github-actions github-actions Bot added 🎪 1d4c394 🚦 deploying Environment 1d4c394 status: deploying 🎪 1d4c394 🚦 running Environment 1d4c394 status: running 🎪 🎯 1d4c394 Active environment pointer - 1d4c394 is receiving traffic 🎪 1d4c394 🌐 35.93.184.4:8080 Environment 1d4c394 URL: http://35.93.184.4:8080 (click to visit) and removed 🎪 1d4c394 🚦 building Environment 1d4c394 status: building 🎪 1d4c394 🚦 deploying Environment 1d4c394 status: deploying 🎪 1d4c394 🚦 running Environment 1d4c394 status: running 🎪 🎯 1d4c394 Active environment pointer - 1d4c394 is receiving traffic 🎪 7cb7e8d 📅 2026-04-24T18-21 Environment 7cb7e8d created at 2026-04-24T18-21 labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime deployed environment on GHA for 1d4c394

Environment: http://35.93.184.4:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

calc(100vh - 100px) gives 620px at 150% zoom on 1080p, leaving only
52px for positioning in a 720px viewport. 70vh gives 504px, leaving
~216px for Ant Design's autoAdjustOverflow to reposition the popover
when the trigger is near the top or bottom of the screen.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime is building environment on GHA for 891753a

@github-actions
Copy link
Copy Markdown
Contributor

🎪 Showtime deployed environment on GHA for 891753a

Environment: http://34.208.99.100:8080 (admin/admin)
Lifetime: 48h auto-cleanup
Updates: New commits create fresh environments automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:draft size/L 🎪 ⌛ 48h Environment expires after 48 hours (default) 🎪 891753a 🚦 running Environment 891753a status: running 🎪 891753a 🤡 sadpandajoe Environment 891753a requested by sadpandajoe 🎪 891753a 🌐 34.208.99.100:8080 Environment 891753a URL: http://34.208.99.100:8080 (click to visit) 🎪 891753a 📅 2026-04-24T22-10 Environment 891753a created at 2026-04-24T22-10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants