Repository navigation
fix: keep a side drawer's header below the status bar from its first frame #130 - #141
Merged
rathlinus merged 1 commit intoNov 15, 2026
Merged
Conversation
wmcparla
marked this pull request as ready for review
November 14, 2026 20:43
Member
|
Thanks, merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On iOS the mail, calendar and contacts drawers drew their first frame with the header at the very top of the screen, under the status bar and the Dynamic Island, and jumped down to the right place on the next frame (#130). In a recording of the iOS 26.5 simulator it shows on every opening of a drawer after its first.
The drawer panel was a native
SafeAreaViewinside the modal's own safe-area provider. The native view learns the insets a few frames after it is mounted, and a drawer's modal is mounted again each time it opens. The panel now takes its padding fromuseSafeAreaInsets(), which has the insets on the first render (a new provider starts with its parent's). The mail list header was fixed the same way earlier.Changes
src/components/DrawerPanel.tsx(new): aViewpadded top, bottom and left from the provider's insets.src/components/SidebarDrawer.tsx,calendar/CalendarSidebarDrawer.tsx,contacts/ContactsSidebarDrawer.tsx: use it in place of theSafeAreaView. The mail sidebar docked in a split layout goes through the same panel and reads the same insets as before.src/components/SafeAreaModal.tsx: the comment says the drawers still need the modal's provider.src/components/__tests__/modal-safe-area.test.ts: the drawers pad from the insets and hold no nativeSafeAreaView.Related issues
Closes #130
Type of change
Checklist
npx tsc --noEmit,npx vitest runandnpm run i18n:checkare clean (this repo has no lint or build script)How it was tested
A Release build for the iOS Simulator (iPhone 17 Pro, iOS 26.5, Xcode 26.6), signed in to a test account on a self-hosted Stalwart 1.1.0. A Maestro flow opens and closes each drawer twice while the screen is recorded, and every frame of the recording was looked at. The same flow ran against
mainat b3b4230 and against this branch.mainAlso on this branch:
Not run on a device: an iPhone in landscape, a real iPhone (the recording is of the simulator, which drew fewer frames than a phone does), a right-to-left layout, and Android with three-button navigation.
Seen in the same recordings and not changed here: switching to the Calendar tab for the first time draws its header under the status bar for a frame in the same way (the screen's own
SafeAreaView), onmainand on this branch.Screenshots
The calendar drawer's second opening, frame by frame from the recordings:
🤖 Generated with Claude Code