[iOS]CarouselView Position Not Respected When Changing From Hidden to Visible in CV2 - fix#29999
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where the CarouselView's position is not respected when changing from hidden to visible by updating the test case to use CarouselView2 and adding a guard in the iOS controller.
- Updated CarouselViewUpdatePosition.xaml to use CarouselView2 instead of CarouselView1.
- Added an early return in CarouselViewController2.cs when the control is not visible in order to prevent resetting the initial position.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Controls/tests/TestCases.HostApp/Issues/CarouselViewUpdatePosition.xaml | Updated control tags from CarouselView1 to CarouselView2 for test consistency. |
| src/Controls/src/Core/Handlers/Items2/iOS/CarouselViewController2.cs | Added visibility check in UpdateInitialPosition to improve behavior when control is hidden. |
Comments suppressed due to low confidence (1)
src/Controls/tests/TestCases.HostApp/Issues/CarouselViewUpdatePosition.xaml:16
- [nitpick] Consider updating the TODO comment to reflect the current usage of CarouselView2 to avoid confusion for future maintainers.
<!-- TODO: Replace CarouselView1 with CarouselView once the issues mentioned in the GitHub issue are resolved. -->
|
Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
rmarinho
left a comment
There was a problem hiding this comment.
We have a way to run both tests handlers for CarouselView1 and CarouselView2 ? so using CarouselView instead of CarouselView2 should run the tests against both.
Right! Fixed |
|
/rebase |
b5f3858 to
37fac1c
Compare
c4564b1 to
be4d18d
Compare
… Visible in CV2 - fix (#29999) * [iOS]CarouselView Position Not Respected When Changing From Hidden to Visible in CV2 - fix * Update CarouselViewUpdatePosition.xaml * Update CarouselViewUpdatePosition.xaml
… Visible in CV2 - fix (#29999) * [iOS]CarouselView Position Not Respected When Changing From Hidden to Visible in CV2 - fix * Update CarouselViewUpdatePosition.xaml * Update CarouselViewUpdatePosition.xaml
… Visible in CV2 - fix (#29999) * [iOS]CarouselView Position Not Respected When Changing From Hidden to Visible in CV2 - fix * Update CarouselViewUpdatePosition.xaml * Update CarouselViewUpdatePosition.xaml
… Visible in CV2 - fix (#29999) * [iOS]CarouselView Position Not Respected When Changing From Hidden to Visible in CV2 - fix * Update CarouselViewUpdatePosition.xaml * Update CarouselViewUpdatePosition.xaml
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!
Issues Fixed
Fixes #29309