fix: adjust zIndex for AppBar in AppLayout component#243
fix: adjust zIndex for AppBar in AppLayout component#243anderdc merged 2 commits intoentrius:testfrom
Conversation
|
@anderdc could you please review the pr? |
|
@anderdc could you please approve workflows and review this PR? |
anderdc
left a comment
There was a problem hiding this comment.
zIndex: 1300 will break modals/dialogs
MUI's z-index scale: AppBar=1100, Drawer=1200, Modal=1300. Setting the AppBar to 1300 means it renders over any Modal or Dialog in the app.
The root cause is the sticky header row at line 148 of AppLayout.tsx sitting at zIndex: 1200, which is above the default AppBar (1100). Fix options:
- Lower the sticky header's z-index below 1100 (e.g. 1099)
- Set AppBar to 1201 — above the sticky element but below modals
- Use
theme.zIndex.appBar + 1for a relative value
Also: the "Closes" field in the PR body is empty — no issue linked.
anderdc
left a comment
There was a problem hiding this comment.
To clarify — we don't actually use modals today so 1300 won't break anything right now. But the simpler fix is to lower the sticky header's z-index (line 148) to something like 500 instead of bumping the AppBar above it. That way everything stays well below MUI's built-in layers.
|
@anderdc Thanks for the review — updated as suggested. I removed the AppBar z-index override and lowered the sticky search header z-index in AppLayout (line ~148) to 500 so it stays below MUI’s default layers. This resolves the mobile overlap issue in #287 while keeping the z-index hierarchy aligned with MUI. Could you please recheck when you have a moment? |
Summary
On mobile widths (
< md), the fixed header/search area showed an unwanted border/stacking overlap because the AppBar was rendered under adjacent sticky content.This updates the mobile
AppBarz-index inAppLayoutso it consistently layers above nearby header-row content and removes the visual border artifact.Type of Change
Related Issues
fix #287
Screenshots
Checklist
npm run formatandnpm run lint:fixhave been runnpm run buildpassesImplementation Notes
AppBarstyle insrc/components/layout/AppLayout.tsxto use a higherzIndex(1300).AppBardefault layer (MuiAppBar-positionFixed) was lower than nearby sticky header/search container, causing visible overlap/border artifact.Behavior
Edge Cases
mdboundary) still behave as expected.