Skip to content

Conversation

@prakashKannanSf3972
Copy link
Contributor

@prakashKannanSf3972 prakashKannanSf3972 commented May 9, 2025

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!

Cause

  • During the landscape-to-portrait transition, CarouselView fails to retain the expected item position, scrolling to the next item instead. Appium triggers a right-scroll, causing the test to fail in CV2 as Item 3 appears instead of the expected Item 2.

  • The test CarouselViewItemShouldScaleProperly sets the device to landscape but doesn’t reset it to portrait. As a result, the next test, CarouselViewInLineBreakMode, starts in landscape and switches to portrait during execution, causing inconsistent behavior.

  • This issue is unrelated to LineBreakMode and stems from CarouselView’s item position handling during orientation changes. It has already been reported here: [https://github.com/CarouselView Item Changes Unexpectedly on Orientation Change in CV2 #28972]

Description of Change

  • Added a [TearDown] method to reset the app's orientation to portrait mode after the CarouselViewItemShouldScaleProperly test is completed, ensuring a consistent test environment setup. The test now passes for both CV1 and CV2 handlers.

Issues Fixed

Fixes #29402

Output

Before After
CV2_Failing_Before_Reset.mov
CV2_Passed_After_Reset.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 9, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@prakashKannanSf3972! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label May 9, 2025
@prakashKannanSf3972 prakashKannanSf3972 added the area-testing Unit tests, device tests label May 9, 2025
@prakashKannanSf3972 prakashKannanSf3972 marked this pull request as ready for review May 9, 2025 14:03
Copilot AI review requested due to automatic review settings May 9, 2025 14:03
@prakashKannanSf3972 prakashKannanSf3972 requested a review from a team as a code owner May 9, 2025 14:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes an issue with CarouselView's item retention during orientation changes by ensuring that tests always run in portrait mode.

  • Added a TearDown method in the test case to reset device orientation to portrait.
  • Updated XAML to use the standard CarouselView control instead of a legacy/custom control.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28523.cs Added a TearDown method to enforce portrait orientation after the test.
src/Controls/tests/TestCases.HostApp/Issues/Issue28930.xaml Replaced legacy CarouselView1 with the standard CarouselView control.

@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current May 13, 2025 14:28
@PureWeen PureWeen merged commit 3c27edc into dotnet:inflight/current May 13, 2025
129 checks passed
PureWeen pushed a commit that referenced this pull request May 14, 2025
PureWeen pushed a commit that referenced this pull request May 14, 2025
github-actions bot pushed a commit that referenced this pull request May 15, 2025
PureWeen added a commit that referenced this pull request May 21, 2025
For more information about inflight process check
https://github.com/dotnet/maui/wiki/Inflight-Branch-Process

# .NET MAUI Release Notes

## New Release: May 21, 2025

We're excited to announce a new release of .NET MAUI with several bug
fixes and improvements across various platforms.

### Bug Fixes

#### iOS
- **Map Control**: Fixed crash when navigating to a page containing a
map more than once (#29369)
- **CarouselView**: Fixed bounce-back behavior when Loop=false, ensuring
proper scrolling experience (#29318)
- **UIView**: Fixed NullReferenceException for UIView not being in
UIWindow (#29460)

#### Windows
- **CarouselView**: Fixed HorizontalScrollBarVisibility="Never" not
working properly (#29343)
- **UI Controls**: Fixed the color not being applied to the
Expand/Collapse Chevron icon (#29140)

#### Windows & macOS
- **Modal Navigation**: Fixed issue where Disappearing event was not
triggered when closing a window with a modal page (#29129)

#### Android
- **Modal Pages**: Improved inheritance of StatusBar and NavigationBar
background colors (#28568)
- **Footer Scrolling**: Fixed footer scrolling issues in list controls
(#29381)
- **Modal Pages**: Improved inheritance of StatusBar and NavigationBar
background colors on modal pages (#28568)

#### Cross-Platform
- **CarouselView**: Fixed ItemsLayout runtime updates to ensure proper
layout behavior (#29447)
- **CollectionView**: Fixed various issues in CollectionView
implementation (#29423)

### Testing Improvements
- Added feature matrix UITest cases for CollectionView dynamic changes
(#29424)

### Code Quality
- Fixed code formatting issues across the codebase
- Minor typo corrections (#29379)

### Contributors

This release was made possible by the hard work of our dedicated team
and community contributors. We'd like to extend our gratitude to
everyone who has contributed to this release.

### Installation

This update is available through NuGet and the .NET SDK. Update your
projects to get access to these fixes.

### Known Issues

Please refer to our issue tracker for any known issues and their
workarounds.

---

For more information about .NET MAUI, visit [the official
documentation](https://docs.microsoft.com/dotnet/maui/).
PureWeen pushed a commit that referenced this pull request May 21, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CV2] LineBreakModeInCarouselViewShouldWork

4 participants