Skip to content

Add pager-aware native list scroll targets - #162

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

ricardovfreixo wants to merge 3 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: 407 passed / 1,203 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. This plugin has no standalone JVM runner; no Kotlin/JVM/Gradle build or phone validation was run 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.

Android gates — draft, not merge-ready

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.

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