Skip to content

Conversation

@skrtdev
Copy link

@skrtdev skrtdev commented Dec 30, 2025

I think that this should be decided by the user, but the default should be true as well

Copilot AI review requested due to automatic review settings December 30, 2025 18:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request changes the default animation behavior for the maintainScrollAtEnd feature by modifying the animated parameter passed to doMaintainScrollAtEnd from false to true across all call sites. The goal is to provide a smoother user experience with animated scrolling when maintaining scroll position at the end of a list (e.g., in chat interfaces).

Key Changes:

  • Changed the animated parameter from false to true in all three calls to doMaintainScrollAtEnd
  • This affects scroll behavior during item layout changes, container layout updates, and data changes

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/core/updateItemSize.ts Updated doMaintainScrollAtEnd call to use animated: true when item sizes change
src/core/handleLayout.ts Updated doMaintainScrollAtEnd call to use animated: true during layout changes
src/core/checkResetContainers.ts Updated doMaintainScrollAtEnd call to use animated: true when data changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (shouldMaintainScrollAtEnd) {
if (maintainScrollAtEnd === true || (maintainScrollAtEnd as MaintainScrollAtEndOptions).onItemLayout) {
doMaintainScrollAtEnd(ctx, state, false);
doMaintainScrollAtEnd(ctx, state, true);
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The PR description mentions "this should be decided by the user," but the MaintainScrollAtEndOptions interface does not include an animated property. Users currently have no way to control whether the scroll animation is enabled or disabled when maintainScrollAtEnd is triggered. Consider adding an animated?: boolean property to the MaintainScrollAtEndOptions interface to allow users to override the default behavior.

Copilot uses AI. Check for mistakes.
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