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

[MAUI]After sliding horizontally, the page cannot display the latest added item. #26939

Open
RoiChen001 opened this issue Jan 3, 2025 · 5 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView area-testing Unit tests, device tests csi-new platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@RoiChen001
Copy link

RoiChen001 commented Jan 3, 2025

Description

After sliding horizontally, the page cannot display the latest added item.

Affected test case:
I1_Add items to linear layout

Steps to Reproduce

1.Deploy https://devdiv.visualstudio.com/Pkgs/_git/VS.TestAssets.Xaml?path=/Assets/Projects/ManualMauiTests to Android platform.
2.Navigate to I1_Add items to linear layout.
3.Click button 'Add' to add more items.

Actual result:
On the Android platform, after horizontal sliding, the page does not display the latest added item7.
Image
On the iOS platform, the page also cannot display the latest added items.
Image

Expected result:
After sliding horizontally, the page should display the latest added item.

Link to public reproduction project repository

https://devdiv.visualstudio.com/Pkgs/_git/VS.TestAssets.Xaml?path=/Assets/Projects/ManualMauiTests

Version with bug

9.0.30-ci.main.25052.1

Is this a regression from previous behavior?

Not a regression. It can also be reproduced on 9.0.21 and 8.0.3.

Affected platforms

Android, iOS

@RoiChen001 RoiChen001 added csi-new platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working labels Jan 3, 2025
@mattleibow mattleibow added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jan 4, 2025
@mattleibow
Copy link
Member

Does this happen with Windows?

@mattleibow mattleibow added this to the Backlog milestone Jan 4, 2025
@RoiChen001
Copy link
Author

RoiChen001 commented Jan 6, 2025

@mattleibow In fact, we can also say that it reproduces in Windows and MacCatalyst, but if we drag horizontally to enlarge the window, we can see the hidden item. BTW, it's still reproducible on CollectionView2 handlers.
Image

@jfversluis
Copy link
Member

@RoiChen001 I think this simply happens because the button and the CollectionView are in the same cell in the Grid. We probably need to change the app to not do that. So this is not so much an issue with one of our controls, it seems to be a bug in the testing app :)

Is this something that you can fix or should we?

@RoiChen001
Copy link
Author

@jfversluis Thanks for your attention, we will fix it and update our results promptly.

@SailDev
Copy link

SailDev commented Jan 10, 2025

I am observing the same behaviour with Maui 9.0.21 on iOS.

It's hard to detect:

  • Simulator Iphone 16 - works o.k.
  • Simulator Iphone SE (3. gen) - works o.k.
  • IPad with different window width's - works o.k.
  • Physical Iphone 12 - last 2 entries are cut off.

Two workarounds work for me

  1. Use ItemSizingStrategy = MeasureFirstItem. I know, it's not the solution for every scenario, but on the other hand it's a performance boost.
    or
  2. Do not use "HorizontalItemSpacing", use item margins instead.

@Zhanglirong-Winnie Zhanglirong-Winnie added the area-testing Unit tests, device tests label Jan 13, 2025
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 area-testing Unit tests, device tests csi-new platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants