Repository navigation
fix(ui): retain custom mobile navigation headers - #600
Merged
Merged
Conversation
houko
force-pushed
the
fix/navpage-custom-header
branch
3 times, most recently
from
November 18, 2026 02:14
68f1cfb to
11ad607
Compare
…size A page's own Header becomes the system header's title view on iOS and Android, which lays header views out at their content's size, so a header that only grows, such as a row with a stretching search field, has no width there while it spans the page on desktops. Say so in NavPage's doc, the public navigation guide (English and Chinese, which lacked the new paragraph) and the device differences table, whose NavPage row now names the platforms that differ, and record filling the bar as a roadmap gap.
houko
force-pushed
the
fix/navpage-custom-header
branch
from
November 18, 2026 02:16
11ad607 to
293ead0
Compare
Collaborator
Author
|
Reviewed.
|
houko
marked this pull request as ready for review
November 18, 2026 02:16
Collaborator
Author
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.
ui.NavPagediscarded a page's customHeaderon iOS and Android while preserving it on desktops. Keep it as the system navigation bar's title view, overridingHeaderTitle, while preserving the page's left/right views and system back behavior. A suppliedNavHeaderno longer replaces the custom page header; its scroll reference still drives iOS header blur.Closes #556.
Behaviour
Headerbecomes the system header's title view, in place ofHeaderTitle, beside the page'sHeaderLeft,HeaderRightand the system back button. Like every system header view it takes its content's size, so a header that only grows (a row with a stretching search field and no width) has no width there; the doc comment, the public navigation guide (English and Chinese) and the device differences table say so, and filling the bar's title area is recorded as a roadmap gap.Headeris drawn above the content.Verification
TestNavPageKeepsCustomHeaderfails on the iOS and Android environments without the fix (custom header mounted 0 times, want once) and passes on all six with it. It checks custom-header precedence, single mounting, natural size, retained native side views/back state and press handling.go build ./...,go vet ./uifor windows/amd64, linux/amd64, android/arm64 and js/wasm,go tool nsgo check -target all,go tool nsgo test ./ui(185 passed) andgo tool nsgo test -run 'Layer|Skills|Doc' .(35 passed).ui/testdata/navheaderchecks on a native target that the custom header is the system title view and that its colored pixels are on screen.go tool nsgo test -target ios_simulator ./ui/testdata/navheaderpassed on an iOS 27 simulator.go tool nsgo test -target android ./ui/testdata/navheaderpasses on the Android API 35 emulator after the rebase onto current main, and fails there without the fix (the custom header is not the system title view). The Pixel 3 XL was not attached, so the run used the emulator; the iPhone itself could not be checked.