[dev-v5] Refactor MessageBarService to NotificationService#4945
Merged
Conversation
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.5%
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames the MessageBar service surface area to NotificationService/INotificationService and updates callers (tests, components, and demo docs) to use the new Show*BarAsync / ShowMessageBarAsync / CloseAllMessageBarsAsync method names.
Changes:
- Renamed service types from
MessageBarService/IMessageBarServicetoNotificationService/INotificationService. - Renamed key service methods (typed helpers,
ShowMessage*, andCloseAll*) and updated usages across the codebase. - Updated demo documentation and examples to inject/use
INotificationService.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Core/Components/MessageBar/MessageBarServiceTests.cs | Updates service instantiation and method calls to NotificationService. |
| tests/Core/Components/MessageBar/MessageBarInstanceTests.cs | Updates tests to use NotificationService for instance creation/closing. |
| tests/Core/Components/MessageBar/MessageBarEventArgsTests.cs | Updates tests to use NotificationService. |
| tests/Core/Components/MessageBar/FluentMessageBarProviderTests.razor | Updates injection and calls to INotificationService + renamed methods. |
| src/Core/Extensions/ServiceCollectionExtensions.cs | Switches DI registration from IMessageBarService to INotificationService. |
| src/Core/Events/MessageBarEventArgs.cs | Updates XML docs to reference INotificationService/NotificationService. |
| src/Core/Components/MessageBar/Services/NotificationService.Subscribers.cs | Renames the partial service type for subscriber management. |
| src/Core/Components/MessageBar/Services/NotificationService.cs | Renames the service and its public API methods. |
| src/Core/Components/MessageBar/Services/MessageBarResult.cs | Updates XML docs to reference INotificationService. |
| src/Core/Components/MessageBar/Services/MessageBarOptions.cs | Updates XML docs to reference INotificationService. |
| src/Core/Components/MessageBar/Services/MessageBarInstance.cs | Updates internal wiring from IMessageBarService to INotificationService. |
| src/Core/Components/MessageBar/Services/INotificationService.cs | Renames interface and its method signatures. |
| src/Core/Components/MessageBar/Services/IMessageBarInstance.cs | Updates XML docs to reference INotificationService. |
| src/Core/Components/MessageBar/FluentMessageBarProvider.razor.cs | Provider now resolves INotificationService and subscribes to NotificationService. |
| src/Core/Components/MessageBar/FluentMessageBarProvider.razor | Updates provider markup to use the renamed service property. |
| src/Core/Components/MessageBar/FluentMessageBar.razor.cs | Updates XML docs to reference INotificationService. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/MessageBar/FluentMessageBar.md | Renames doc section and updates examples to NotificationService API. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/MessageBar/Examples/MessageBarServiceOptions.razor | Updates injected service + API usage to INotificationService. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/MessageBar/Examples/MessageBarServiceDefault.razor | Updates injected service + typed helper calls to Show*BarAsync. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/MessageBar/Examples/MessageBarServiceCustomized.razor | Updates injected service + custom component calls to ShowMessageBarAsync. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/MessageBar/Examples/Message/CustomizedMessageBar.razor | Updates comment text to mention NotificationService. |
Comments suppressed due to low confidence (1)
src/Core/Components/MessageBar/Services/INotificationService.cs:13
- The XML summary still says "Interface for the MessageBar service" even though the type was renamed to
INotificationService, which makes the public API docs misleading.
vnbaaij
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[dev-v5] Refactor MessageBarService to NotificationService
Update the MessageBarService to NotificationService, reflecting a shift in naming and functionality.
This change enhances clarity and aligns with the service's purpose of managing notifications.
MessageBarServicetoNotificationServiceMessageBarService.ShowSuccessAsynctoNotificationService.ShowSuccessBarAsync(and Info, Warning, Error methods)No breaking changes are introduced.