Repository navigation
Conversation
This branch has not been deployed
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.
Draft. Parked. Do not merge.
This PR adds
variant="floating"toNavigationBar: a 64dp capsule that floats over the content, with an icon for each destination. MD3 has no floating navigation bar, and@rootnative/componentsfollows MD3. The code belongs to the planned glass component family, in its own package. This PR keeps the code, and CI builds and checks it until that package exists.What it adds
variant?: 'docked' | 'floating'onNavigationBar. The default is'docked', the bar as before.surfaceContainer, full corners, elevation level 3.SafeAreaProvider:NavigationItemgets a'floating'placement, so the capsule reuses the item, the state layer, the badge and the focus ring of the docked bar.NavigationBarPropsbecomes a type alias. The type rejectslabelVisibility,labelStyleandinsetBottomon the floating bar.llms.txttext, andNavigationBarVariantinapi-surface.json.Why it is parked
NavShape = CornerNone). The nearest MD3 surface is the floating toolbar, which is for actions, not for destinations.components, the type alias breaks aninterfacethat extendsNavigationBarProps. A separate component in the glass package does not need that change.Open before it can ship
componentsinto the glass package, as its own component and not as a variant. Revert theNavigationBarunion.pointerEventstable and the focus ring. Today these are internal tocomponents.scrollOffsetthat moves the capsule between 64dp and 48dp after 24dp of scroll in one direction. The capsule is full at the top, and it keeps its size through the iOS bounce at the end of the content.expo-glass-effectdraws the native glass only on iOS 26 and later. Android, web and older iOS need a material of their own.@rootnative/inertia:useHideOnScrollmust start again when its offset source changes, for example on a tab switch.Checks
NavigationBar.test.tsx, a floating row in both elevation tables, and a prop passthrough case. Each new check fails when its fault is put into the source.tsconcomponents, lint,docs:check,registry:checkand Prettier.api:check,check:singletons,check:worklets, and the example typecheck against the builtdist.api-surface.jsonwas edited by hand.