Skip to content

@relextm19/scroll position - #850

Draft
relextm19 wants to merge 20 commits into
mainfrom
@relextm19/scroll-position
Draft

relextm19 wants to merge 20 commits into
mainfrom
@relextm19/scroll-position

Conversation

@relextm19

Copy link
Copy Markdown
Collaborator

Summary

Closes #169

Add onScroll event to EnrichedTextInput triggered when the content is scrolled. Payload is the same as in the React Native implementation

nativeEvent:{
  contentOffset: {
      x: number;
      y: number;
    };
}

Also adds a scrollEventThrottle prop defaulting to 16

Test Plan

Check the metro logs when running the mobile example or browser logs when running the web test. You can also write your own handler for onScroll and test it yourself

Screenshots / Videos

Compatibility

OS Implemented
iOS ✅
Android ✅
Web ✅

Checklist

  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

Copilot AI balanced review requested due to automatic review settings October 29, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new fullscreen row invalidates existing screenshot baselines, and scroll events have cross-platform throttling, unit, and precision errors.

6 open issues

Review effort: Balanced

Comment on lines +118 to +120
<Text testID="scroll-offset-output" style={styles.scrollOffsetOutput}>
Scroll offset: {scrollOffset.toFixed(2)}
</Text>
super.onScrollChanged(horiz, vert, oldHoriz, oldVert)

val now = SystemClock.uptimeMillis()
if (now - scrollLastTick > scrollEventThrottle) {
Comment on lines +351 to +352
horiz,
vert,
Comment on lines +323 to +324
x: CodegenTypes.Int32;
y: CodegenTypes.Int32;
Comment thread src/web/EnrichedTextInput.tsx Resolved
Comment thread src/web/EnrichedTextInput.tsx Outdated
Comment on lines +204 to +207
if (
!shouldEmitScrollEvent(scrollLastTickRef.current, scrollEventThrottle)
) {
return;
@relextm19
relextm19 marked this pull request as draft October 29, 2026 19:32
@relextm19
relextm19 force-pushed the @relextm19/scroll-position branch from e7a6c07 to 2e5d181 Compare October 30, 2026 11:33

This branch has not been deployed

No deployments
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.

[Feature request] scroll position

2 participants