Skip to content

Conversation

HarishKumarSF4517
Copy link
Contributor

This pull request adds a new interactive feature matrix for StackLayout, including both horizontal and vertical layouts, to the test application. The addition includes new pages for demonstrating and configuring StackLayout behaviors, as well as a view model to support dynamic UI updates. This enables easier testing and exploration of layout options and properties.

New StackLayout Feature Matrix:

  • Added a new entry for "StackLayout Feature Matrix" to the list of gallery pages in CorePageView, making the new feature matrix accessible from the main test app navigation.

  • Introduced StackLayoutControlPage and StackLayoutControlMainPage (with XAML and code-behind) to showcase interactive examples of both HorizontalStackLayout and VerticalStackLayout, including nesting, spacing, alignment, and color demonstration. [1] [2]

  • Added StackLayoutOptionsPage (XAML and code-behind) to allow users to adjust layout orientation, visibility, flow direction (RTL/LTR), spacing, and rectangle dimensions through a toolbar-accessible options menu. [1] [2]

  • Implemented StackLayoutViewModel to support two-way data binding for layout properties, including orientation, visibility, flow direction, spacing, and rectangle size, with property change notifications for dynamic UI updates.

StacKLayoutFeatureMatrix.mov

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

Hey there @@HarishKumarSF4517! 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 Aug 29, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@jsuarezruiz jsuarezruiz self-assigned this Aug 29, 2025
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 snapshots on Windows and macOS.
image
Could you commit the images?

@HarishKumarSF4517
Copy link
Contributor Author

Hi @jsuarezruiz, I have committed the images?

@anandhan-rajagopal anandhan-rajagopal added the area-testing Unit tests, device tests label Sep 2, 2025
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

jsuarezruiz
jsuarezruiz previously approved these changes Sep 2, 2025
@HarishKumarSF4517 HarishKumarSF4517 marked this pull request as ready for review September 2, 2025 14:54
@Copilot Copilot AI review requested due to automatic review settings September 2, 2025 14:54
@HarishKumarSF4517 HarishKumarSF4517 requested a review from a team as a code owner September 2, 2025 14:54
Copy link
Contributor

@Copilot 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 test suite for StackLayout feature matrix functionality in the .NET MAUI test application. The implementation includes both horizontal and vertical stack layout testing with configurable properties like spacing, visibility, flow direction (RTL/LTR), and rectangle dimensions.

Key Changes:

  • Adds a new StackLayout Feature Matrix test case with comprehensive UI tests covering 18 different scenarios
  • Implements an interactive test UI with configuration options for layout properties
  • Provides a view model with data binding support for dynamic property updates

Reviewed Changes

Copilot reviewed 7 out of 75 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
StackLayoutFeatureTests.cs Comprehensive test suite with 18 test methods covering various StackLayout scenarios including visibility, RTL, spacing, and dimension combinations
StackLayoutViewModel.cs Data binding view model supporting layout orientation, visibility, flow direction, spacing, and rectangle dimensions with property change notifications
StackLayoutOptionsPage.xaml/.cs Configuration page allowing users to modify layout properties through a toolbar-accessible options menu
StackLayoutControlPage.xaml/.cs Main interactive demonstration page showcasing both horizontal and vertical stack layouts with nesting examples
CorePageView.cs Adds the new StackLayout Feature Matrix entry to the test application's main gallery navigation

xmlns:local="clr-namespace:Maui.Controls.Sample"
x:Class="Maui.Controls.Sample.StackLayoutOptionsPage"
x:DataType="local:StackLayoutViewModel"
Title="tackLayoutOptionsPage">
Copy link
Preview

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

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

The Title attribute has a typo. It should be 'StackLayoutOptionsPage' instead of 'tackLayoutOptionsPage'.

Suggested change
Title="tackLayoutOptionsPage">
Title="StackLayoutOptionsPage">

Copilot uses AI. Check for mistakes.


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

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

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

Creating a new StackLayoutViewModel instance discards any changes made in the current view model. This should retain the existing _viewModel state instead of creating a new instance.

Suggested change
BindingContext = _viewModel = new StackLayoutViewModel();
BindingContext = _viewModel;

Copilot uses AI. Check for mistakes.


#if ANDROID || IOS
[Test]
public void HorizontalStackLayout_Spacing_WithLandspace()
Copy link
Preview

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

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

Method names contain a typo. 'WithLandspace' should be 'WithLandscape'.

Copilot uses AI. Check for mistakes.

}

[Test]
public void VerticalStackLayout_Spacing_WithLandspace()
Copy link
Preview

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

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

Method names contain a typo. 'WithLandspace' should be 'WithLandscape'.

Copilot uses AI. Check for mistakes.

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing Unit tests, device tests community ✨ Community Contribution layout-stack partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants