Skip to content

fix: consolidate drawer bottom safe-area padding#84

Open
conversun wants to merge 1 commit into
lehhair:mainfrom
conversun:fix/pwa-drawer-bottom-padding
Open

fix: consolidate drawer bottom safe-area padding#84
conversun wants to merge 1 commit into
lehhair:mainfrom
conversun:fix/pwa-drawer-bottom-padding

Conversation

@conversun
Copy link
Copy Markdown
Contributor

Summary

Cleans up the bottom safe-area padding handling on the right/bottom drawer overlays so they follow the same pattern as the left Sidebar (inner sticky-bottom component handles its own pb), which is also the convention documented in index.css:53-57.

Changes

  • ResizablePanel.tsx: removed the inline paddingBottom: safeBottomInset (only set for right overlay) and the now-unused safeBottomInset constant. Added pb-[var(--safe-area-inset-bottom)] to both the overlay and docked contentRef wrappers — the inner content surface now owns safe-area-bottom.
  • RightPanel.tsx / BottomPanel.tsx: dropped the className=\"pb-[var(--safe-area-inset-bottom)]\" they were passing into ResizablePanel (no longer needed; ResizablePanel handles it internally).
  • Sidebar.tsx untouched — SidebarFooter already handles its own pb correctly.

Why

Previously the right drawer overlay had two sources of padding-bottom: var(--safe-area-inset-bottom) on the same element (caller className + ResizablePanel inline style). Inline won, so it wasn't visually doubled, but it was redundant code with two owners.

While moving the padding to the inner content wrapper, also fixed a latent docked-mode bug: in the docked branch contentRef is absolute inset-0, which fills the parent's padding box, not the content box. That meant the outer pb-[var(--safe-area-inset-bottom)] from RightPanel/BottomPanel had no effect on inner content positioning. Putting the padding directly on contentRef makes the safe area actually reduce content area in both overlay and docked modes.

Validation

  • npm run validate (typecheck + lint + tests + build) passes.
  • LSP diagnostics clean on all three changed files.

Move pb-[var(--safe-area-inset-bottom)] from the outer ResizablePanel
shell into the inner contentRef wrapper so right/bottom drawers follow
the same 'inner sticky-bottom component handles its own pb' pattern as
the left Sidebar (SidebarFooter).

Also fixes a latent bug: in docked mode contentRef is absolute inset-0
which fills the parent padding box, so an outer panel padding-bottom
had no effect on inner content. Putting the padding directly on
contentRef makes safe-area-bottom actually reduce the content area in
both overlay and docked modes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant