Skip to content

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Sep 14, 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!

Description of Change

Introduces SetHeaderContentInset to properly manage the header's content inset based on FlyoutHeaderBehavior, ensuring correct layout and scroll behavior.

This PR resolves an issue pointed by this comment #31525 (comment)

Copilot AI review requested due to automatic review settings September 14, 2025 15:01
@kubaflo kubaflo requested a review from a team as a code owner September 14, 2025 15:01
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 implements various bug fixes and test coverage improvements for the .NET MAUI framework, focusing on iOS Shell flyout header behavior, dispatcher extensions, and expanding test coverage across multiple UI components.

Key Changes:

  • Fixes iOS Shell flyout header content inset calculation to properly respect FlyoutHeaderBehavior settings
  • Adds comprehensive test coverage for dispatcher extensions and improves existing UI test coverage
  • Implements theme change handling for SearchBar components and updates various control behaviors

Updated Areas:

  • iOS Shell flyout layout management with improved header behavior handling
  • Test infrastructure with new feature matrix tests for TitleBar, Picker, and IndicatorView components
  • Platform-specific fixes for SearchBar theme updates and TabbedPage behavior improvements

Reviewed Changes

Copilot reviewed 90 out of 382 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs Fixes header content inset logic to respect FlyoutHeaderBehavior configuration
src/Controls/tests/Core.UnitTests/DispatcherExtensionsTests.cs Adds comprehensive unit tests for dispatcher extension methods
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ Adds new feature matrix test files for TitleBar, Picker, and IndicatorView components
src/Controls/src/Core/SearchBar/SearchBar.cs Implements theme change handling for SearchBar color properties
src/Controls/tests/TestCases.HostApp/FeatureMatrix/ Adds complete feature matrix implementations for UI testing
Comments suppressed due to low confidence (2)

src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/SearchBarFeatureTests.cs:51

  • The test method is no longer conditionally disabled but the platform-specific behavior differences that caused the original test failures may still exist. Consider adding platform-specific assertions or comments explaining why the test now works across all platforms.
	[Test, Order(2)]
	[Category(UITestCategories.SearchBar)]
	public void SearchBar_SearchButtonClicked_VerifyEventTriggered()
	{
		App.WaitForElement("SearchBar");
		App.ClearText("SearchBar");
		App.EnterText("SearchBar", "Test Search");
		App.PressEnter();
		App.WaitForElement("SearchButtonPressedLabel");
		var labelText = App.WaitForElement("SearchButtonPressedLabel").GetText();
		Assert.That(labelText, Is.EqualTo("Yes"));
	}

src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs:1

  • This line has been removed but may be necessary for proper cleanup during navigation testing. The removal could lead to memory leaks or improper handler lifecycle management in tests.
using System;

#elif IOS || MACCATALYST
if (isCursorVisible)
handler.PlatformView.TintColor = UIKit.UITextField.Appearance.TintColor;
handler.QueryEditor.TintColor = UIKit.UITextField.Appearance.TintColor;
Copy link

Copilot AI Sep 14, 2025

Choose a reason for hiding this comment

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

The property access has changed from handler.PlatformView.TintColor to handler.QueryEditor.TintColor, but this change should be verified to ensure QueryEditor is the correct property to access for cursor visibility control on iOS SearchBar handlers.

Copilot uses AI. Check for mistakes.
handler.QueryEditor.TintColor = UIKit.UITextField.Appearance.TintColor;
else
handler.PlatformView.TintColor = UIKit.UIColor.Clear;
handler.QueryEditor.TintColor = UIKit.UIColor.Clear;
Copy link

Copilot AI Sep 14, 2025

Choose a reason for hiding this comment

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

The property access has changed from handler.PlatformView.TintColor to handler.QueryEditor.TintColor, but this change should be verified to ensure QueryEditor is the correct property to access for cursor visibility control on iOS SearchBar handlers.

Copilot uses AI. Check for mistakes.
@kubaflo kubaflo changed the base branch from main to inflight/candidate September 14, 2025 15:03
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Sep 14, 2025
@dotnet-policy-service
Copy link
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
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@sheiksyedm
Copy link
Contributor

@kubaflo The entire ScrollView device test case in ShellFlyoutHeaderBehaviorAndContentTestCases fails on these PR changes. Can you please look?

image

@PureWeen
Copy link
Member

/rebase

Introduces SetHeaderContentInset to properly manage the header's content inset based on FlyoutHeaderBehavior, ensuring correct layout and scroll behavior.
@github-actions github-actions bot force-pushed the fixed-failure-September-15th-2 branch from fc88f53 to 15fc235 Compare September 16, 2025 13:35
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 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.

There are some Shell Flyout tests failing on iOS and Catalyst: FlyoutNavigationBetweenItemsWithNavigationStacks, ShellWithTopTabsFreezesWhenNavigatingFlyoutItems, FlyoutItemShouldShowTitle, FlyoutContentOffsetsCorrectly, NavigationBetweenFlyoutItems and others.

Related with the changes?

@sheiksyedm sheiksyedm mentioned this pull request Sep 17, 2025
@rmarinho
Copy link
Member

Closing in favor of #31643

@rmarinho rmarinho closed this Sep 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants