PopoverService: Add CheckForPopoverProvider#9391
Merged
ScarletKuro merged 3 commits intoMudBlazor:devfrom Jul 13, 2024
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9391 +/- ##
==========================================
+ Coverage 89.82% 90.61% +0.78%
==========================================
Files 412 403 -9
Lines 11878 12663 +785
Branches 2364 2447 +83
==========================================
+ Hits 10670 11475 +805
+ Misses 681 632 -49
- Partials 527 556 +29 ☔ View full report in Codecov by Sentry. |
Member
Author
|
Let me know if the message should be different: |
Contributor
|
How about this error message: |
Contributor
|
Also, I suggest pasting the console error message as text in the head of this issue so people googling for this error will land here. |
henon
approved these changes
Jul 13, 2024
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.
Description
Adds as error: Unhandled exception rendering component: Missing
<MudPopoverProvider/>, please add it to your layout. See https://mudblazor.com/getting-started/installation#manual-install-add-componentsWe adhere to the "fail fast" policy, so it makes sense to add a check to see if the
MudPopoverProviderexists when trying to create a popover, tooltip, dropdown, etc.—anything that relies on the provider.Many of our users often forget to add the
MudPopoverProviderto theMainLayoutor Page (in the case of per-page render mode) and then complain that we should add a hint that it's required. Many suggested adding an alert to the documentation for components that need it, but I think this approach is more effective.If someone wants the old behavior, they should set:
Or, if they are adding services individually for some reason:
This is how it looks if

MudPopoverProvideris missing:How Has This Been Tested?
Unit tests & visually
Type of Changes
Checklist
dev).