Skip to content

Conversation

@NafeelaNazhir
Copy link
Contributor

@NafeelaNazhir NafeelaNazhir commented Aug 12, 2025

This pull request introduces a new feature matrix page to the test host app, allowing users to interactively test and configure layout options for ScrollView child layouts. The changes add a new LayoutControlPage with a detailed UI for adjusting layout options, as well as the necessary supporting view model and navigation logic.

New Feature Matrix Page for ScrollView Layout Options:

  • Added a new entry for "ScrollView With LayoutOptions Feature Matrix" to the list of gallery pages in CorePageView.cs, making the new test page accessible from the app's main navigation.

UI and Navigation for Layout Testing:

  • Introduced LayoutControlPage.xaml and its code-behind, which provide a UI for displaying a ScrollView whose content and layout can be changed between a stack layout and a grid, as well as navigation to an options page for further configuration. [1] [2]
  • Added LayoutOptionsPage.xaml and its code-behind, presenting a UI for selecting horizontal/vertical layout options, width/height requests, and scroll orientation, which updates the view model accordingly. [1] [2]

Issues Fixed

Fixes #30698

Screen.Recording.2025-08-11.at.10.48.50.AM.mov

@dotnet-policy-service
Copy link
Contributor

Hey there @@NafeelaNazhir! 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 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Aug 12, 2025
@NafeelaNazhir NafeelaNazhir added area-testing Unit tests, device tests area-controls-scrollview ScrollView labels Aug 12, 2025
@NafeelaNazhir NafeelaNazhir marked this pull request as ready for review August 12, 2025 07:19
Copilot AI review requested due to automatic review settings August 12, 2025 07:19
@NafeelaNazhir NafeelaNazhir requested a review from a team as a code owner August 12, 2025 07:19
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 introduces a comprehensive feature matrix test system for testing ScrollView layout options and behavior. The PR adds a new interactive testing interface that allows users to configure various layout options for ScrollView child layouts (StackLayout and Grid) and validate their behavior through automated UI tests.

Key changes:

  • Adds an interactive test host app with configurable layout options for ScrollView child layouts
  • Implements comprehensive automated UI tests covering 48 different layout scenarios
  • Provides proper separation between UI configuration and test validation logic

Reviewed Changes

Copilot reviewed 7 out of 103 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ScrollViewWithLayoutOptionsFeatureTests.cs Complete test suite with 48 UI tests covering all ScrollView layout option combinations
LayoutViewModel.cs View model for managing layout configuration state with property change notifications
LayoutOptionsPage.xaml Configuration UI for selecting horizontal/vertical layout options, dimensions, and scroll orientation
LayoutOptionsPage.xaml.cs Event handling logic for the options configuration page
LayoutControlPage.xaml Main test page displaying ScrollView with configurable content layouts
LayoutControlPage.xaml.cs Navigation and content generation logic for the main test interface
CorePageView.cs Navigation entry point addition for the new feature matrix page


private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
{
BindingContext = _viewModel = new LayoutViewModel();
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

Creating a new LayoutViewModel instance discards the existing view model state. This could lead to unexpected behavior when navigating to options page. Consider preserving the existing view model state or explicitly resetting only the necessary properties.

Suggested change
BindingContext = _viewModel = new LayoutViewModel();

Copilot uses AI. Check for mistakes.
Comment on lines +554 to +557
App.WaitForElement(Height300);
App.Tap(Height300);
App.WaitForElement(OrientationHorizontal);
App.Tap(OrientationHorizontal);
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

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

The order of UI interactions is inconsistent compared to other tests. In this test, Height300 is tapped before OrientationHorizontal, while other similar tests tap OrientationHorizontal first. This inconsistency could make the tests harder to maintain and may cause different UI states.

Suggested change
App.WaitForElement(Height300);
App.Tap(Height300);
App.WaitForElement(OrientationHorizontal);
App.Tap(OrientationHorizontal);
App.WaitForElement(OrientationHorizontal);
App.Tap(OrientationHorizontal);
App.WaitForElement(Height300);
App.Tap(Height300);

Copilot uses AI. Check for mistakes.
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

Pending snapshot for Windows:
image
Already available in the latest build. Could you commit the images?

@NafeelaNazhir
Copy link
Contributor Author

Pending snapshot for Windows: image Already available in the latest build. Could you commit the images?

@jsuarezruiz I have added the base images in the latest commit.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

The tests VerifyScrollViewWithScrollToPositionStartAndEditorContent is failing on Android.
Snapshot different than baseline: VerifyScrollViewWithScrollToPositionStartAndEditorContent.png (0.89% difference)

image

@NafeelaNazhir NafeelaNazhir force-pushed the scrollview_layoutoptions branch from 956eb20 to 5e231f5 Compare September 5, 2025 04:26
@NafeelaNazhir
Copy link
Contributor Author

The tests VerifyScrollViewWithScrollToPositionStartAndEditorContent is failing on Android. Snapshot different than baseline: VerifyScrollViewWithScrollToPositionStartAndEditorContent.png (0.89% difference)

image

Hi @jsuarezruiz , This test case appears to be unrelated to the changes in this PR. I have verified it locally in this branch, and it passes as expected. Kindly review and share your concerns.

Screenshot 2025-09-05 at 10 13 39 AM

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ghost ghost closed this by deleting the head repository Sep 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2025
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-scrollview ScrollView 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.

2 participants