Skip to content

Introduce FluentNotificationTriggerModel for FluentNotifcation to rework the Bump animation#2245

Merged
nodes11 merged 4 commits intomicrosoft:mainfrom
nodes11:notification_bump_fixes
Feb 21, 2026
Merged

Introduce FluentNotificationTriggerModel for FluentNotifcation to rework the Bump animation#2245
nodes11 merged 4 commits intomicrosoft:mainfrom
nodes11:notification_bump_fixes

Conversation

@nodes11
Copy link
Contributor

@nodes11 nodes11 commented Feb 20, 2026

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

This change introduces the FluentNotificationTriggerModel, which simplifies client interactions with FluentNotification. Currently, most of the notification state is managed through MSFNotificationStateImpl, but this is not publicly exposed on the notification. Instead of exposing the MSFNotificationStateImpl property on the notification, we are introducing a new observable model that clients can easily interact with.

The first use case for this new model is to expose the bump behavior. Previously, this behavior was enabled through the state object. However, pure SwiftUI views did not have a straightforward way to trigger it. With this change, clients can now set triggerModel.shouldBump = true, and the notification view will respond accordingly.

This change also adds an option onDismiss parameter to the FluentNotification init which will be passed along to the state property. This is purely for the convienece of apps that use FluentNotification directly.

Binary change

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

Verification

Validated in internal use cases. Updated demo controllers. See demo videos below.

Visual Verification
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-20.at.12.01.35.mov
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-02-20.at.12.16.20.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 February 20, 2026 20:34
@nodes11 nodes11 enabled auto-merge (squash) February 20, 2026 22:27
@nodes11 nodes11 merged commit 2f75440 into microsoft:main Feb 21, 2026
7 checks passed
joannaquu pushed a commit to joannaquu/fluentui-apple that referenced this pull request Feb 24, 2026
…ork the Bump animation (microsoft#2245)

* Add FluentNotificationTriggerModel for easier client interactions with FluentNotification
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