Skip to content

Add pager-aware native list scroll targets - #162

Open
ricardovfreixo wants to merge 4 commits into
NativePHP:mainfrom
ricardovfreixo:fix/list-root-tab-scroll-target
Open

ricardovfreixo wants to merge 4 commits into
NativePHP:mainfrom
ricardovfreixo:fix/list-root-tab-scroll-target

Conversation

@ricardovfreixo

@ricardovfreixo ricardovfreixo commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

Adds optional native-list scroll targets for Android tab reselect, with native pager-aware availability.

  • NativeList::scrollTarget() / scroll-target names the real LazyListState; exact top means index zero AND offset zero.
  • Registration/disposal is owner-identity safe. Default list wire output is unchanged when the prop is unused.
  • Every pager page, with or without a header, receives a remembered native page context. Availability requires a stationary pager, matching current/target page, and available ancestor pagers.
  • Active-keyed disposal invalidates an abandoned entry; the live predicate also closes the frame gap before recomposition/PHP's page-change response. A hidden neighbor cannot be refreshed just because it remains composed.
  • Non-pager lists retain the default available behavior. No app-specific names, new dependencies, or new visibility props.

Required paired delivery / release ordering

Depends on the matching core scroll registry and optional isAvailable argument. Do not merge/release this before that core interface is available.

Verification

  • Official PHP suite after upstream merge: 416 passed / 1,227 assertions. Paired app: 1,336 passed / 13,091 assertions.
  • Focused paired-source harness: 23 passed / 44 assertions.
  • Independent source review cleared the implementation and paired interface.

These include Kotlin source-contract assertions, not Kotlin execution. Upstream now includes a focused JVM harness under tests/android; it was not run. No Kotlin/JVM/Gradle build or phone validation was executed here. No JUnit test source is placed in production renderer assets.

Follow-up Kotlin compatibility fix

The user's first native build exposed four unresolved references in the upstream TabRowRenderer.kt: LocalTopBarColor / LocalTopTabRow are absent from the paired core. Commit 28753b7 removes those unsupported imports and restores the documented transparent container. Two source regressions were red before the change and green after it; the full PHP suite and 26 app Log tests pass. Independent narrow review cleared the fix. No native compiler rerun was executed by the agent.

Current-main integration

Merge 00e4831be6cf24fa71ce60b0c1699d4060e3966a includes upstream 86ef0e6 without a rebase. Bounded gestures, fonts/text/keyboard/sheet fixes are preserved alongside live pager availability and scroll-target registration. TabRowRenderer is byte-identical to upstream's corrected transparent implementation. Matching core: cbf2eb466f85ed68dec960d5e727ca61673ddbf6. Independent provider/consumer review found no P0/P1.

Android gates — ready for review, native validation outstanding

Rebuild using the paired core/UI refs and verify root-tab scroll + refresh, pager swipes/settles, nested pager availability, away-and-return cancellation, and non-pager lists. Compile/runtime behavior and TalkBack/layout checks remain user-run.

Bounded merge for the companion PR NativePHP#162: takes upstream's bounded
gesture areas (NativePHP#173), the text/font/keyboard/divider/sheet fixes
(NativePHP#142, NativePHP#155, NativePHP#156, NativePHP#163, NativePHP#147, NativePHP#168, NativePHP#170) and the tab-row chrome fix
(NativePHP#167), while keeping this branch's scroll-target seam intact — the
live pager page availability guard (PagerPageContext), the ancestor
pager chain in isAvailable(), and the Android list scroll-target
registration. TabRowRenderer.kt resolves to upstream's version: both
sides had independently removed the unsupported LocalTopBarColor /
LocalTopTabRow hooks, so nothing was reintroduced and no stubs added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant