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

CollectionView snaps randomly when we give horizontal and vertical spacing #19037

Open
AswinPG opened this issue Nov 26, 2023 · 7 comments
Open
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 t/bug Something isn't working
Milestone

Comments

@AswinPG
Copy link

AswinPG commented Nov 26, 2023

Description

When using CollectionView with GridLayout and use Vertical and Horizontal spacing with span 2, the collectionview snaps while scrolling. It makes scrolling feel jerky and makes a feeling that the scroll has ended, when in fact there's more to scroll

Steps to Reproduce

  1. Create a CV
  2. Use GridLayout with span 2 and vertical orientation
  3. Give HorizontalItemSpacing and VerticalItemSpacing
    4.Run app and scroll the CV

Link to public reproduction project repository

https://github.com/AswinPG/CVSnapRepro

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

Don't use ItemSpacings

Relevant log output

No response

@AswinPG AswinPG added the t/bug Something isn't working label Nov 26, 2023
@jsuarezruiz jsuarezruiz added platform/android 🤖 area-controls-collectionview CollectionView, CarouselView, IndicatorView s/needs-repro Attach a solution or code which reproduces the issue labels Nov 27, 2023
@ghost
Copy link

ghost commented Nov 27, 2023

Hi @AswinPG. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@AswinPG
Copy link
Author

AswinPG commented Nov 27, 2023

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Nov 27, 2023
@mattleibow mattleibow removed the s/needs-attention Issue has more information and needs another look label Nov 28, 2023
@mattleibow mattleibow added this to the Backlog milestone Nov 28, 2023
@ghost
Copy link

ghost commented Nov 28, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@xavic99
Copy link

xavic99 commented Dec 4, 2023

It happens the same using VerticalLayout and specifying a ItemSpacing

<CollectionView.ItemsLayout>

</CollectionView.ItemsLayout>

@Take-A-Byte
Copy link

Seems to be related - #19383 (comment)

There seems to be a race condition in a render/calculate call when we have a relative size in the grid or spacing.

@JoeVoo
Copy link

JoeVoo commented Dec 21, 2024

I see this on Windows, only on my main screen (3440x1440) but not on the smaller second screen: (1920x1200).
Downsize the main screen does not solve it.
Changing the window size let the number of columns snapping between 2 and 1 or between 3 and 2, depending on set gridspan to 2 or 3.
The collectionview keeps the full number of columns, but the last column will be empty and the items jump to the previous column.
Tested on net9 with all updates and with c# markup page.

@JoeVoo
Copy link

JoeVoo commented Dec 21, 2024

I found out that there is a connection between 'Snapping' and the graphic hardware.
On the faster Geforce 2060 of the main screen, it snaps, on the slower Isis Xe it does not snap.
seems to relate to #19383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants