Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid inertial scroll support (#13502) #13511

Merged

Conversation

stogle
Copy link
Contributor

@stogle stogle commented Nov 6, 2023

What does the pull request do?

Adds inertial scrolling support to DataGrid via a new IsScrollInertiaEnabled property, which is true by default. See #13502.

What is the current behavior?

DataGrid does not currently support inertial scrolling, meaning that when the user scrolls the grid with a touch gesture, scrolling always stops as soon as the gesture ends.

What is the updated/expected behavior with this PR?

With this PR, DataGrid supports inertial scrolling, and it is enabled by default, meaning that when the user scrolls the grid with a "flick" gesture, scrolling will decelerate rather than stop as soon as the gesture ends. The current behavior can be restored by setting the IsScrollInertiaEnabled property to false.

How was the solution implemented (if it's not obvious)?

As described in #13502, a property was added to DataGrid, and the Fluent and Simple templates were updated to use it.

Checklist

Breaking changes

As the new property defaults to true, DataGrid will now use inertial scrolling by default. IMO this is expected behavior (consistent with other controls that use ScrollViewer), not a breaking change.

Obsoletions / Deprecations

None.

Fixed issues

Fixes #13502

@stogle
Copy link
Contributor Author

stogle commented Nov 6, 2023

Shouldn't there be a package created by the CI build that I can use to test this?

@maxkatz6
Copy link
Member

maxkatz6 commented Nov 6, 2023

As the new property defaults to true, DataGrid will now use inertial scrolling by default. IMO this is expected behavior (consistent with other controls that use ScrollViewer), not a breaking change.

It was "true" before we even had this property, so this PR fixes unintentional breaking change to previous behavior. Just to clarify it.

@maxkatz6
Copy link
Member

maxkatz6 commented Nov 6, 2023

@stogle looks like bot has died. But you still can find build number in the Azure CI - 11.0.999-cibuild0041588-beta (41588 is in the CI URL and GetPRNumber job logs).

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me

@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 6, 2023
Merged via the queue into AvaloniaUI:master with commit 90b09b1 Nov 7, 2023
6 checks passed
@stogle
Copy link
Contributor Author

stogle commented Nov 7, 2023

@stogle looks like bot has died. But you still can find build number in the Azure CI - 11.0.999-cibuild0041588-beta (41588 is in the CI URL and GetPRNumber job logs).

Thanks @maxkatz6. I tested with that version and it works great.

@stogle stogle deleted the feature/datagrid-inertial-scroll branch November 7, 2023 14:11
@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Nov 28, 2023
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataGrid should support inertial scrolling
2 participants