Fix crash when dynamically updating Loop in CarouselView #29453
Fix crash when dynamically updating Loop in CarouselView #29453bhavanesh2001 wants to merge 7 commits into
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| @@ -0,0 +1,26 @@ | |||
| #if !MACCATALYST //Appium Swipe is not working on MACCATALYST | |||
There was a problem hiding this comment.
Ok, will take a look to it. Can you try to use the DragCoordinates method for Mac (with a compilation directive in the test)?
There was a problem hiding this comment.
Sure, Will try that out. In my local machine , App.SwipeRightToLeft() is reducing the screen brightness.
There was a problem hiding this comment.
@jsuarezruiz I tried using App.DragCoordinates, but it doesn’t work as expected on MacCatalyst. It performs a one-finger drag, while CarouselView swipe requires a two-finger gesture on the touchpad to trigger scroll.
|
Do we need to add this to also CV2 ? |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Test's seems to be passing. Although, I forgot to add Mapper to CV2 :( |
|
I have created a PR for this issue to include additional logic for maintaining the current item when the loop value changes, and to handle scrollbar visibility based on the loop value. |
|
@bhavanesh2001 , When the loop setting is changed from false to true at runtime, the CarouselView does not update properly. We cannot scroll past the first item, and it behaves as if the loop is still set to false. I have attached a video for reference. Issue report for windows - #29412 Loop.False.to.True.mp4 |
Hmm, I guess this is an issue that has existed before. Since we aren't changing anything related to Windows here |
@bhavanesh2001 , Previously, we could not change the loop at runtime; we could only set it during initialization. This issue does not occur when setting it at initialization. This behavior was introduced in this PR. |
Yeah, I meant whatever is causing the issue was already present; we just enabled it by mapping the Loop property. Also, I'm not sure if this PR is in play. #29527 seems to include additional changes compared to this one. Does the same issue occur with that PR as well? 🤔 |
|
Closing in favour of #29527 |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
In
CarouselView, enabling or disabling loop mode dynamically at runtime has no effect.Currently, attempting to set
Loopto false on Android and iOS causes a crash due to missing platform updates.Root Cause
The
MapLoopmapper was not included in the handler’s property mapper. As a result, runtime changes to theLoopproperty were not communicated to the platform-specific implementations.Description of Change
Added
MapLoopto the property mapper forCarouselViewHandler, enabling support for dynamic updates to loop behavior at runtime and preventing platform crashes.Validated the behavior on the following platforms
Issues Fixed
Fixes #29411