Add Platform-Specific Option to Enable Snackbar on Windows#1780
Merged
TheCodeTraveler merged 11 commits intomainfrom Mar 29, 2024
Merged
Add Platform-Specific Option to Enable Snackbar on Windows#1780TheCodeTraveler merged 11 commits intomainfrom
TheCodeTraveler merged 11 commits intomainfrom
Conversation
bijington
reviewed
Mar 28, 2024
bijington
requested changes
Mar 28, 2024
Contributor
bijington
left a comment
There was a problem hiding this comment.
Good work @brminnick I think we should either use the value parameter or remove it though.
Co-authored-by: Shaun Lawrence <[email protected]>
Collaborator
Author
|
Thanks Shaun! Good catch. Updated ✅ |
TheCodeTraveler
commented
Mar 28, 2024
TheCodeTraveler
commented
Mar 28, 2024
Collaborator
Author
TheCodeTraveler
left a comment
There was a problem hiding this comment.
Thanks Shaun + Vlad! I think I'm happy with the implementation now.
We've added enough fail-safes to the code to assist future devs who haven't yet seen the platform-specific implementation docs for Snackbar on Windows. Hopefully throwing these exceptions at runtime will help folks find the docs instead of opening a new Issue on the repo.
And if they do open an issue for one of these InvalidOperationExceptions, we can just copy/paste the link from the stack trace, point them to the docs and close the issue.
pictos
previously approved these changes
Mar 28, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Snackbar now requires additional code to be added on Windows to the Package.appxmanifest file: MicrosoftDocs/CommunityToolkit#374
Currently, without adding this additional code to
Package.appxmanifest,CommunityToolkit.Mauicauses all Windows apps to crash on launch.This PR adds
Options.ShouldEnableSnackbarOnWidowsto allow users to opt-in to enabling Snackbar on Windows, ensuring that they have added the additional required code toPackage.appxmanifest.