Skip to content

[FluentNotification] Add Expand button behavior#2260

Merged
nodes11 merged 9 commits intomicrosoft:mainfrom
nodes11:dismiss_button_override
Apr 22, 2026
Merged

[FluentNotification] Add Expand button behavior#2260
nodes11 merged 9 commits intomicrosoft:mainfrom
nodes11:dismiss_button_override

Conversation

@nodes11
Copy link
Copy Markdown
Contributor

@nodes11 nodes11 commented Mar 31, 2026

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

This change introduces an optional expand button for FluentNotification when there is a message line limit set and the message text is longer than the given limit. Tapping the expand button will cause all text to be displayed. This is achieved through the addition of a new SwiftUI view called ExpandableText. Consumers can enable this feature by setting enableExpandableMessageText to true on the FluentNotification or the corresponding state object (depending on the initialization method).

Binary change

(how is our binary size impacted -- see https://github.com/microsoft/fluentui-apple/wiki/Size-Comparison)

Verification

Validated in the fluent demo controller, as well as in internal use cases.

Visual Verification

ExpandableText Demo:

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-03-31.at.16.11.53.mov

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@nodes11 nodes11 requested a review from a team as a code owner March 31, 2026 23:15
Comment thread Sources/FluentUI_iOS/Components/Notification/ExpandableText.swift
Comment thread Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift Outdated
Comment thread Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift Outdated
Comment thread Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift Outdated
Comment thread Sources/FluentUI_iOS/Components/Notification/FluentNotification.swift Outdated
@nodes11 nodes11 force-pushed the dismiss_button_override branch from ed17108 to e1a7189 Compare April 20, 2026 15:14
@nodes11 nodes11 force-pushed the dismiss_button_override branch from 0df7ad7 to 7ffea39 Compare April 22, 2026 21:35
@nodes11 nodes11 enabled auto-merge (squash) April 22, 2026 21:35
@nodes11 nodes11 merged commit 3df2d47 into microsoft:main Apr 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants