-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obsolete setting mainpage via application #23692
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
02b0576
Obsolete setting mainpage via application
PureWeen 69515de
- fix up our samples
PureWeen b90c270
- Add templates for creating a window
PureWeen 6c3ee5e
- fixes
PureWeen 83f8c8f
- fix naming
PureWeen 61bd069
- fix mainpage
PureWeen edcc273
Update WindowTests.cs
PureWeen 403c8d0
- restore mainpage test
PureWeen 6879339
- fix
PureWeen 44fedfc
- fix page setter
PureWeen d5b239b
- fix essentials
PureWeen b44b090
- winui fix
PureWeen 860b4a2
- more fixes
PureWeen a946072
- fix
PureWeen 1e44265
- fix
PureWeen c5032a4
Update App.xaml.cs
PureWeen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud - this will cause a warning (or possibly error) in 100% of MAUI applications ever written, no? Is it that bad to keep this? Maybe an analyzer could be used to flag it and rewrite the code for those interested? (And ignored by those who don't.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I just worry about also dragging the past along with us and not overall widening the pit of success
From a library author perspective using these APIs is really bad. For example, none of this code from our toolkit will work for multi-window https://github.com/CommunityToolkit/Maui/blob/cc1fb686815587076bbad45a1903f3ec3039315d/src/CommunityToolkit.Maui/PopupService.cs#L17
We probably see an issue a month for android where users need to override
CreateWindow
#23645
#23493
I also worry about new users using
MainPage
and ignoring the analyzer suggestions.The fix here is basically to do a solution search for
MainPage and replace it with Windows[0].Page
I get it because how widespread it is that users will all see warnings, but, it just seems to put MAUI in general on a path to longer term refinement/success.
I could see us maybe Obsoleting the set and just using an analyzer on the
get
perhaps?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing non-trivial apps already have various workarounds. There are still various gotchas in APIs. It's been getting better but it's not like there are no sharp edges.
Given that MAUI is relatively young, personally, I would be more radical, especially if it can lead to people not hitting bugs in the future (which translates to not losing more resources).
Analyzer might be nice in the sense: fix it for me fast.