Skip to content

Conversation

@PureWeen
Copy link
Member

@PureWeen PureWeen commented Aug 3, 2025

No description provided.

NafeelaNazhir and others added 16 commits July 24, 2025 15:23
 
This pull request introduces a new `ToolbarFeaturePage` to the
application, enhancing the Primary and Secondary toolbar functionality
and adding comprehensive test coverage. The changes include the addition
of a new feature matrix page, implementation of toolbar item
interactions, and updates to existing test cases to improve
compatibility and functionality.

### New Toolbar Feature Implementation:
* Added a new `ToolbarFeaturePage` to the `CorePageView` navigation,
allowing users to interact with various toolbar items and test their
behaviors
(`src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs`).
* Created `ToolbarFeaturePage.xaml` to define the UI layout and toolbar
items, including primary and secondary toolbar items with various
properties
(`src/Controls/tests/TestCases.HostApp/FeatureMatrix/ToolbarItem/ToolbarFeaturePage.xaml`).
* Implemented `ToolbarFeaturePage.xaml.cs` to handle toolbar item
interactions, such as enabling/disabling items, changing text, and
modifying commands dynamically
(`src/Controls/tests/TestCases.HostApp/FeatureMatrix/ToolbarItem/ToolbarFeaturePage.xaml.cs`).

### Test Coverage for Toolbar Features:
* Added a new test suite, `ToolbarFeatureTests`, to validate toolbar
item behaviors, including enabling/disabling, text changes, command
updates, and interactions between primary and secondary items
(`src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ToolbarFeatureTests.cs`).

### Updates to Existing Test Cases:
* Updated test cases for issues (`Issue20177`, `Issue29499`,
`Issue7156`, `Issue6127`) to replace toolbar interaction methods with
`App.WaitForMoreButton` and `App.TapMoreButton`, ensuring compatibility
across platforms
(`src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20177.cs`,
`Issue29499.cs`, `Issue7156.cs`, `Issue6127.cs`)
[[1]](diffhunk://#diff-136d48a0250c82fedadcbd273484b6543a03720db0d362280e66431c7c998c17L1-R1)
[[2]](diffhunk://#diff-136d48a0250c82fedadcbd273484b6543a03720db0d362280e66431c7c998c17L17-R18)
[[3]](diffhunk://#diff-58e7ba9f5a159976ee0075271a58a8e96a3ed513d5d5a238ee6bbdb5767c180cL1-R1)
[[4]](diffhunk://#diff-58e7ba9f5a159976ee0075271a58a8e96a3ed513d5d5a238ee6bbdb5767c180cL23-R24)
[[5]](diffhunk://#diff-7d0f7d8312370b8e389655e062842827c0363773b2d524bcfdb1282ff98471ffL1-R1)
[[6]](diffhunk://#diff-7d0f7d8312370b8e389655e062842827c0363773b2d524bcfdb1282ff98471ffL20-L26)
[[7]](diffhunk://#diff-c92d1fc72093c9245ac8575e135f5bfed0ec8ed336d93b4e1e31432b0621535dL1-R1).

#### Issues Identified
- #30674
- #30675



https://github.com/user-attachments/assets/d2c6e6a9-54a9-4f04-86b3-bbf50e5fe314
* Added repro sample

* Added UITests

* Changes in navigation events parameters

* Fix failing UITest

* Fixed test

* Fixed test on iOS/Catalyst

* Renamed NavigationType.PageSwap to NavigationType.Replace

* Removed NavigationType.Initialized

* Added two more samples, using tabs and flyout

* Updated sample

* Create Issue21814TabbedPage.cs

* Updated flyout sample

* Adding more tests

* Added more TabbedPage tests

* More FlyoutPage tests

* Updated test

* Fixed tests

* Use Replace with Tabs and FlyoutItems

* Fixed unit tests

* Updated test

* Fix iOS Flyout tests

* Changes in tests

* Fix test on Android

* Fixed Windows test

* Fixed parameters in NavigatingFromEventArgs

* Updated TabbedPage unit test

* Added more navigation unit tests

* - fix publicapi.txt files

* Update FlyoutPage.cs

* Update FlyoutPage.cs

* Update MultiPage.cs

* - fix publicapi

* More tests

* Fixed device test

* Changes based on PR feedback, simplify FlyoutPage Detail

* More changes to fix a test

* [ci] Update the publicapi

* - remove navigatingfrom

* Updated tests

---------

Co-authored-by: Shane Neuville (HE/HIM) <[email protected]>
Co-authored-by: Rui Marinho <[email protected]>
… size property (#30962)

* FontImageSource

* - just use height as the bounding box not width

* - set to 24

* - change to 44

* - fix screen shots

---------

Co-authored-by: Shane Neuville <[email protected]>
### Description of Change

This PR is a re-application of #30964
to make sure that @kubaflo is added as a co-author

This pull request introduces several updates to the `ScrollView` and its
related components to improve layout handling, measurement logic, and
platform-specific implementation for Android. The changes focus on
simplifying code, enhancing functionality, and addressing edge cases in
layout and measurement.

### Enhancements to measurement and layout logic:

- **Refactored `ICrossPlatformLayout.CrossPlatformMeasure` and
`CrossPlatformArrange`:** Improved measurement logic by introducing
explicit constraints based on scroll orientation and utilizing the new
`MeasureContent` method for more accurate content measurement. Added
null checks and default values to prevent errors during layout
operations.
(`[[1]](diffhunk://#diff-d3dcb79b77b66e99d195c7e8406a19b95224604786bab4e82509c4acd3913735L246-R266)`,
`[[2]](diffhunk://#diff-d3dcb79b77b66e99d195c7e8406a19b95224604786bab4e82509c4acd3913735L237-R238)`)
- **Introduced `MeasureContent` method in `LayoutExtensions`:** Added a
new internal method to handle content measurement with support for
explicit dimensions and padding adjustments, improving modularity and
reusability.
(`[src/Core/src/Layouts/LayoutExtensions.csR170-R200](diffhunk://#diff-923a4005b8fd76c6fe5a26814219f9002063666b6d6a49b6b1e19aea086628f4R170-R200)`)

### Platform-specific updates for Android:

- **Updated `MauiHorizontalScrollView` initialization:** Enabled the
`FillViewport` property to ensure the scroll view fills its viewport,
enhancing usability for horizontal scrolling.
(`[src/Core/src/Platform/Android/MauiScrollView.csL100-R104](diffhunk://#diff-546ef8b25e238ce6a1820c920cb327471d6481eefc486eae39b3e5a31b45d907L100-R104)`)
- **Removed unused `CrossPlatformArrange` logic:** Simplified the layout
handling in `MauiScrollView` by removing the `CrossPlatformArrange`
property and related code, which was no longer required.
(`[[1]](diffhunk://#diff-546ef8b25e238ce6a1820c920cb327471d6481eefc486eae39b3e5a31b45d907L232-L240)`,
`[[2]](diffhunk://#diff-546ef8b25e238ce6a1820c920cb327471d6481eefc486eae39b3e5a31b45d907L324-L325)`)

### Code cleanup and refactoring:

- **Improved readability in `ScrollView` and
`ScrollViewHandler.Android`:** Adjusted formatting and removed redundant
code to enhance clarity and maintainability.
(`[[1]](diffhunk://#diff-7c61a3f8442182cb2e772edaa805382c721965440aa3b0244462d1aae6c4ee4dL518-R519)`,
`[[2]](diffhunk://#diff-d3dcb79b77b66e99d195c7e8406a19b95224604786bab4e82509c4acd3913735L28-L35)`)
### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #30951 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Co-authored-by: kubaflo <[email protected]>
Copilot AI review requested due to automatic review settings August 3, 2025 15:03
@PureWeen PureWeen requested a review from a team as a code owner August 3, 2025 15:03
@PureWeen PureWeen requested review from mattleibow and rmarinho August 3, 2025 15:03
@PureWeen PureWeen added this to the .NET 10.0-preview7 milestone Aug 3, 2025
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 PR updates the release/10.0.1xx-preview7 branch with the latest fixes from the net10.0 branch. The changes primarily focus on improving navigation event handling with enhanced parameter information, fixing scroll view layout issues, and resolving various UI test platform compatibility concerns.

  • Enhanced navigation events to provide better context information including navigation type and destination/previous page details
  • Fixed scroll view measurement and layout issues on Android platform
  • Updated UI tests to use standardized toolbar interaction methods and corrected platform-specific test conditions

Reviewed Changes

Copilot reviewed 44 out of 52 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt Added DispatcherExtensions API entries to public API surface
src/Core/src/Platform/Android/MauiScrollView.cs Fixed scroll view layout by adding FillViewport property and removing cross-platform arrange logic
src/Core/src/Layouts/LayoutExtensions.cs Added new MeasureContent overload with constraint parameters for better layout handling
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Android.cs Improved scroll view measurement logic and null checking
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/*.cs Updated test methods to use standardized toolbar interactions and corrected platform conditions
src/Controls/tests/TestCases.HostApp/Issues/Issue21814*.* Added comprehensive navigation event testing infrastructure for TabbedPage, FlyoutPage scenarios
src/Controls/tests/TestCases.HostApp/FeatureMatrix/ToolbarItem/. Added new toolbar feature matrix testing page
src/Controls/src/Core/Shell/Shell.cs Updated navigation type handling to use Replace instead of PageSwap
src/Controls/src/Core/Page/*.cs Enhanced navigation event args with NavigationType enum and destination/previous page information
src/Controls/src/Core/PublicAPI/*.txt Updated public API surface to include new NavigationType enum and enhanced navigation event args

override Microsoft.Maui.SwipeViewSwipeStarted.GetHashCode() -> int
override Microsoft.Maui.SwipeViewSwipeStarted.ToString() -> string!
*REMOVED*readonly Microsoft.Maui.PropertyMapper._mapper -> System.Collections.Generic.Dictionary<string!, System.Action<Microsoft.Maui.IElementHandler!, Microsoft.Maui.IElement!>!>!
static Microsoft.Maui.Dispatching.DispatcherExtensions.DispatchIfRequired(this Microsoft.Maui.Dispatching.IDispatcher! dispatcher, System.Action! action) -> void
Copy link

Copilot AI Aug 3, 2025

Choose a reason for hiding this comment

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

This appears to be adding new public API entries. Please verify this is not a breaking change as we do not make breaking changes in minor versions or service releases.

Copilot uses AI. Check for mistakes.
Microsoft.Maui.Controls.LayoutConstraint.VerticallyFixed = 2 -> Microsoft.Maui.Controls.LayoutConstraint
*REMOVED*Microsoft.Maui.Controls.MessagingCenter
*REMOVED*Microsoft.Maui.Controls.MessagingCenter.MessagingCenter() -> void
~Microsoft.Maui.Controls.NavigatedFromEventArgs.DestinationPage.get -> Microsoft.Maui.Controls.Page
Copy link

Copilot AI Aug 3, 2025

Choose a reason for hiding this comment

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

This appears to be adding new public API entries for navigation event args. Please verify this is not a breaking change as we do not make breaking changes in minor versions or service releases.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,183 @@
using Microsoft.Maui.Controls;
Copy link

Copilot AI Aug 3, 2025

Choose a reason for hiding this comment

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

This appears to be adding new test case UI. Please ensure that corresponding test cases exist in TestCases.Shared.Tests and that AutomationIds are unique to avoid WaitForElement failures.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,77 @@
using System;
Copy link

Copilot AI Aug 3, 2025

Choose a reason for hiding this comment

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

This appears to be adding new UI test infrastructure. Please ensure that corresponding test cases exist in TestCases.Shared.Tests and that AutomationIds are unique to avoid WaitForElement failures.

Copilot uses AI. Check for mistakes.
@PureWeen PureWeen added the p/0 Current heighest priority issues that we are targeting for a release. label Aug 3, 2025
@PureWeen
Copy link
Member Author

PureWeen commented Aug 3, 2025

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@github-project-automation github-project-automation bot moved this from Todo to Approved in MAUI SDK Ongoing Aug 4, 2025
@rmarinho rmarinho merged commit 5b89900 into release/10.0.1xx-preview7 Aug 4, 2025
115 checks passed
@rmarinho rmarinho deleted the merge_net10_fixes branch August 4, 2025 10:15
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Aug 4, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

p/0 Current heighest priority issues that we are targeting for a release.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants