Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[iOS] Shell Flyout Header and Footer not respecting safe area in landscape mode #28379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
Loading
from

Conversation

praveenkumarkarunanithi
Copy link
Contributor

Root Cause

The root cause of the issue (extra white space appearing on the left side of the Shell Flyout header and footer in landscape mode on iOS) is that the left safe area inset is implicitly applied to the Shell Flyout content (UITableView) by the system's UITableViewController. Specifically, the UITableViewController automatically respects the safe area insets provided by the system, causing the content to shift rightward in landscape mode. However, the Shell Flyout header and footer views are managed separately by ShellFlyoutLayoutManager and ShellFlyoutContentRenderer, and these views were not explicitly respecting the left safe area inset. As a result, the header and footer did not align correctly with the content, causing visual inconsistencies and unwanted white space.

Description of Change

ShellFlyoutLayoutManager.cs:
Updated the LayoutHeader and LayoutContent methods to explicitly apply the left safe area inset (UIApplication.SharedApplication.GetSafeAreaInsetsForWindow().Left) to the header and content views. This ensures the header view aligns correctly with the content view, respecting the left safe area inset.
ShellFlyoutContentRenderer.cs:
Modified the UpdateFooterPosition() method to explicitly apply the left safe area inset to the footer view. This ensures the footer aligns correctly with the content and header views.
Made ShouldHonorSafeArea method internal:
Changed the accessibility of the ShouldHonorSafeArea method in ShellFlyoutLayoutManager from private to internal, allowing it to be accessed from ShellFlyoutContentRenderer to determine if the footer should respect or ignore safe area insets.

Issues Fixed

Fixes #20131

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshots

Before Issue Fix After Issue Fix
withoutfix withfix

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

Hey there @praveenkumarkarunanithi! 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 Mar 13, 2025
@jsuarezruiz jsuarezruiz added platform/ios area-controls-shell Shell Navigation, Routes, Tabs, Flyout labels Mar 14, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

#elif MACCATALYST
App.EnterFullScreen();
#endif
VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

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

Pending snapshots, already available in the latest build.

Example, Android:
image

Could you commit the images?

Copy link
Contributor

Choose a reason for hiding this comment

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

Snapshot different than baseline: FlyoutShouldRespectSafeAreaInLandscape.png (size differs - baseline is 2556x1178 pixels, actual is 2436x974 pixels)

@praveenkumarkarunanithi praveenkumarkarunanithi marked this pull request as ready for review March 14, 2025 09:54
@praveenkumarkarunanithi praveenkumarkarunanithi requested a review from a team as a code owner March 14, 2025 09:54
@rmarinho
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MAUI Shell FlyoutHeader is not showing properly on iOS in landscape mode
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.