Skip to content

[iOS]CarouselView Position Not Respected When Changing From Hidden to Visible in CV2 - fix - #29999

Merged
PureWeen merged 3 commits into
dotnet:inflight/currentfrom
kubaflo:fix-29309
Aug 22, 2025
Merged

PureWeen merged 3 commits into
dotnet:inflight/currentfrom
kubaflo:fix-29309

Conversation

@kubaflo

@kubaflo kubaflo commented Jun 15, 2025

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings June 15, 2025 22:43
@kubaflo
kubaflo requested a review from a team as a code owner June 15, 2025 22:43
@kubaflo kubaflo self-assigned this Jun 15, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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. -->

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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.

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@kubaflo

kubaflo commented Jun 17, 2025

Copy link
Copy Markdown
Contributor Author

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

@PureWeen PureWeen added this to the .NET 9 SR11 milestone Aug 4, 2025
@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Aug 4, 2025
@PureWeen

Copy link
Copy Markdown
Member

/rebase

@PureWeen
PureWeen changed the base branch from main to inflight/current August 22, 2025 22:34
@PureWeen
PureWeen merged commit 12a6a8d into dotnet:inflight/current Aug 22, 2025
@github-project-automation github-project-automation Bot moved this from Ready To Review to Done in MAUI SDK Ongoing Aug 22, 2025
jfversluis pushed a commit that referenced this pull request Aug 25, 2025
… 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
github-actions Bot pushed a commit that referenced this pull request Sep 4, 2025
… 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
github-actions Bot pushed a commit that referenced this pull request Sep 5, 2025
… 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
PureWeen pushed a commit that referenced this pull request Sep 5, 2025
… 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
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[iOS] - CarouselView Position Not Respected When Changing From Hidden to Visible in CV2

5 participants