Skip to content

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jul 9, 2025

REVERTED

Description of Change

The regression is caused by this PR: #28670, but I think that the changes introduced by @albyrock87 let us simplify the code and easily fix the regression

Issues Fixed

Fixes #30483

Before After
Screen.Recording.2025-07-09.at.02.08.10.mov
Screen.Recording.2025-07-09.at.02.07.27.mov

Copilot AI review requested due to automatic review settings July 9, 2025 00:10
@kubaflo kubaflo requested a review from a team as a code owner July 9, 2025 00:10
@kubaflo kubaflo requested review from mattleibow and rmarinho July 9, 2025 00:10
@kubaflo kubaflo self-assigned this Jul 9, 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.

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jul 9, 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 fixes the misalignment of the first item in the iOS Shell flyout by removing the legacy SetHeaderContentInset logic and consolidating header offset calculations.

  • Remove all calls to SetHeaderContentInset and delete the method implementation
  • Simplify header offset logic in LayoutContent to always use the header’s frame height
  • Drop obsolete call in ViewSafeAreaInsetsDidChange

Reviewed Changes

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

File Description
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellTableViewController.cs Removed the SetHeaderContentInset call in safe-area changes
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs Deleted SetHeaderContentInset method and calls; simplified the header offset logic
Comments suppressed due to low confidence (2)

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs:191

  • This layout change affects the iOS flyout header and first-item alignment; consider adding corresponding UI tests in TestCases.HostApp and TestCases.Shared.Tests to verify correct positioning under both scrollable and non-scrollable scenarios.
		internal void UpdateHeaderSize()

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs:289

  • By removing the conditional branch for ScrollView, the offset now always uses the header height instead of margin for scrollable content. Please verify that this doesn't reintroduce layout issues in scrollable scenarios, or restore a margin-based offset path if needed.
				contentYOffset += HeaderView.Frame.Height;

@kubaflo kubaflo added platform/ios area-controls-collectionview CollectionView, CarouselView, IndicatorView area-controls-flyout Flyout collectionview-cv2 shell-flyout and removed community ✨ Community Contribution labels Jul 9, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo kubaflo added the community ✨ Community Contribution label Jul 10, 2025
@PureWeen
Copy link
Member

PureWeen commented Aug 7, 2025

/rebase

@PureWeen PureWeen added this to the .NET 9 SR11 milestone Aug 7, 2025
@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Aug 7, 2025
@albyrock87
Copy link
Contributor

albyrock87 commented Aug 8, 2025

Thanks @kubaflo, this makes sense!
So I guess it means that the flyout UITest did not include VerifyScreenshot.

@PureWeen
Copy link
Member

/azp run

@PureWeen PureWeen modified the milestones: .NET 9 SR11, .NET 9 SR10 Aug 10, 2025
@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added the p/0 Current heighest priority issues that we are targeting for a release. label Aug 10, 2025
@PureWeen
Copy link
Member

@kubaflo can you add a test for this?

@kubaflo
Copy link
Contributor Author

kubaflo commented Aug 10, 2025

I've added a test

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen modified the milestones: .NET 9 SR10, .NET 9 SR11 Aug 11, 2025
mattleibow
mattleibow previously approved these changes Sep 1, 2025
@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Sep 1, 2025
@jfversluis jfversluis changed the base branch from main to inflight/current September 2, 2025 11:35
@jfversluis jfversluis merged commit af204c6 into dotnet:inflight/current Sep 2, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Sep 2, 2025
PureWeen pushed a commit that referenced this pull request Sep 8, 2025
sheiksyedm added a commit to sheiksyedm/maui that referenced this pull request Sep 17, 2025
@sheiksyedm sheiksyedm mentioned this pull request Sep 17, 2025
rmarinho pushed a commit that referenced this pull request Sep 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView area-controls-flyout Flyout collectionview-cv2 community ✨ Community Contribution p/0 Current heighest priority issues that we are targeting for a release. platform/ios shell-flyout

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Regression] [iOS] Flyout Menu CollectionView First Item Misaligned Since 9.0.51 (iOS 15–18.1 Affected, Works in 9.0.50)

6 participants