poc(expo-ui): drive native toolbar from LazyColumn - #31
Draft
AmatoGiulio wants to merge 14 commits into
Draft
Conversation
Owner
Author
Upstream Expo UI proposalThe POC needs only a generic Expo UI modifier; no AndroidIn import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.rememberNestedScrollInteropConnectionand in register("nestedScrollInterop") { _, _, _, _ ->
Modifier.nestedScroll(rememberNestedScrollInteropConnection())
}JS APIIn /**
* Connects a Compose nested-scroll chain to a cooperating Android View
* `NestedScrollingParent3` ancestor.
*
* This wraps Compose's `rememberNestedScrollInteropConnection()` and is useful
* when an Expo UI scrollable is hosted inside an Android View hierarchy that
* participates in AndroidX nested scrolling.
*/
export const nestedScrollInterop = () => createModifier('nestedScrollInterop');Usage: <LazyColumn modifiers={[fillMaxSize(), nestedScrollInterop()]}>
{...}
</LazyColumn>This is intentionally a generic Compose/View interop primitive. The local POC's node_modules patch mirrors this proposed upstream implementation. |
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.
Explores Expo UI
LazyColumnas a real Compose-owned scroll source forreact-native-scroll-interop.POC scope:
LazyColumnas the scroll ownerrememberNestedScrollInteropConnection()ComposeViewas a generic nested-scroll transaction source without adding a compile-time Compose dependency to the coreThe example carries a temporary SDK 57 patch script that registers a
nestedScrollInteropExpo UI modifier. The intended upstream Expo API is a generic modifier, independent of this library.Local validation target:
examples/expodependencies (refreshes its lockfile with direct@expo/ui@57.0.12)Expo UI LazyColumn POCThis is deliberately a draft POC and should not merge as-is; the node_modules patch is evidence for the upstream Expo change, not a shipping integration.