Skip to content

Navigation safe area subcompose refactor - #494

Draft
dfabulich wants to merge 2 commits into
skiptools:mainfrom
dfabulich:navigation-safe-area-refactor
Draft

Navigation safe area subcompose refactor#494
dfabulich wants to merge 2 commits into
skiptools:mainfrom
dfabulich:navigation-safe-area-refactor

Conversation

@dfabulich

Copy link
Copy Markdown
Member

This is currently a draft PR partly because I'm not yet sure there are enough tests, and also because I'm not sure this is the right direction.

This PR uses SubcomposeLayout to layout the TopAppBar and the body content of the NavigationStack, mirroring the implementation of Compose Scaffold (see their implementation.)

This eliminates the need to use onGloballyPositioned to measure the app bar, eliminating layout shift.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
    (Not required)
  • OPTIONAL: I have added an example of any UI changes to the Showcase sample app

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Cursor generated the core of this PR. I manually tested it with the Showcase app in the SafeAreaPlayground, but I'm not confident I've done enough manual testing; I don't want to invest a lot of energy into it unless we agree that this is something like the right approach.

This eliminates the need to use `onGloballyPositioned` to measure the app bar, eliminating layout shift.
@cla-bot cla-bot Bot added the cla-signed label Jul 26, 2026
@dfabulich dfabulich changed the title Navigation safe area refactor Navigation safe area subcompose refactor Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SkipUI should use Compose WindowInsets instead of a _safeArea environment value

1 participant