KEMBAR78
[Windows] Fix `ActionSheet` maximum size and styling by morning4coffe-dev · Pull Request #30835 · dotnet/maui · GitHub
Skip to content

Conversation

morning4coffe-dev
Copy link
Contributor

Description of Change

Issues Fixed

This pull request addresses improvements to the ActionSheet implementation on Windows, focusing on better layout handling, text wrapping, and display consistency.

Previous/current Windows behavior, Android behavior

Previous Windows behavior

Screenshot 2025-07-24 165202

Current Windows behavior

image

Android

Screenshot 2025-07-25 104546

Key changes include updating the ActionSheet dialog's layout and styles to match other platforms behavior and be more in-line with Fluent Design system.

Fixes #25200

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

Hey there @@morning4coffe-dev! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@morning4coffe-dev morning4coffe-dev marked this pull request as ready for review July 28, 2025 07:58
@Copilot Copilot AI review requested due to automatic review settings July 28, 2025 07:58
@morning4coffe-dev morning4coffe-dev requested a review from a team as a code owner July 28, 2025 07:58
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 PR fixes ActionSheet display issues on Windows by removing hardcoded size limitations and improving text wrapping behavior. The changes align the Windows ActionSheet implementation with other platforms and Fluent Design system principles.

Key changes:

  • Removed hardcoded MaxHeight and MaxWidth constraints from the FlyoutPresenter style
  • Added text wrapping support for ActionSheet titles and items
  • Introduced a custom data template for ActionSheet items with proper padding and text wrapping

Reviewed Changes

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

File Description
src/Core/src/Platform/Windows/Styles/Resources.xaml Updates FlyoutPresenter style to remove size constraints, adds custom template with ScrollViewer, and creates ActionSheet item data template with text wrapping
src/Controls/src/Core/Platform/AlertManager/ActionSheetDialog.Windows.cs Enables text wrapping for title TextBlock and applies custom item template to ListView
src/Controls/tests/TestCases.HostApp/Issues/Issue25200.cs Creates test UI page with three ActionSheet scenarios to validate proper sizing and text wrapping
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25200.cs Implements NUnit tests to verify ActionSheet display behavior with various content lengths

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@bronteq
Copy link

bronteq commented Aug 9, 2025

Hi @MartyIX can you explain what's necessary to do to commit the CI pending snapshots?

@MartyIX
Copy link
Contributor

MartyIX commented Aug 9, 2025

Hi @MartyIX can you explain what's necessary to do to commit the CI pending snapshots?

It's documented here AFAIK: https://github.com/dotnet/maui/blob/main/docs/design/UITesting.md#screenshots

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.

LGTM. Optionally, can update the code linking to the new issue related with Appium and Catalyst, but create the new issue anyway.

@PureWeen PureWeen merged commit 02b2e65 into dotnet:main Sep 5, 2025
131 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-dialogalert DisplayAlert, dialog community ✨ Community Contribution platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Actionsheet maximum size has been hardcoded on windows, creating display issues

5 participants