MudSnackbar: Add global HideIcon option#11900
Merged
ScarletKuro merged 2 commits intoMudBlazor:devfrom Sep 22, 2025
Merged
Conversation
…obal + per-snackbar overrides
Contributor
There was a problem hiding this comment.
Code Review
This pull request effectively adds a global HideIcon option for Snackbars, which is a useful enhancement. The implementation is clean, moving the property to CommonSnackbarOptions to avoid duplication and making it available for both global and per-snackbar configuration. The new functionality is well-covered by unit tests, which is great to see. I've only found one minor issue with a misleading comment and a slightly confusing name in one of the new tests, which I've flagged for correction. Overall, this is a solid contribution.
ScarletKuro
approved these changes
Sep 22, 2025
Contributor
Author
|
Thank you guys, pleasure to have made my first contribution to Mudblazor! |
This was referenced Oct 1, 2025
Closed
This was referenced Nov 16, 2025
This was referenced Nov 24, 2025
Closed
This was referenced Dec 11, 2025
Closed
Closed
This was referenced Dec 29, 2025
This was referenced Jan 9, 2026
Closed
This was referenced Feb 10, 2026
Closed
This was referenced Feb 23, 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.
Summary
Fixes: #11677
HideIconproperty toCommonSnackbarOptionsso it is available in both:SnackbarConfiguration(global config viaProgram.cs)SnackbarOptions(per-snackbar override).HideIconproperty fromSnackbarOptionssince it now inherits fromCommonSnackbarOptions.AddMudServicesto pass through the new option.HideIcon = false)HideIcon = trueUsage
Global configuration in
Program.cs:Per-snackbar override: