Skip to content
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

New .NET MAUI Blazor Hybrid template #32793

Merged
merged 4 commits into from
Jun 10, 2024

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Jun 10, 2024

Fixes #32792
Addresses #32692
Addresses #31909

Beth ... This should work ... I think 🤔🤞🍀. It should work IF the new project template exactly matches what we have in the article in terms of namespace suffixes, file locations and file names, code logic, etc. I still haven't created an app from the template (YET) just because I'm working full speed at the moment 🏃‍♂️🏃‍♂️🏃‍♂️ just to get everything covered in time for release tomorrow. I will create a local test app to compare; but if you can tell me about any deltas that exist between the article/sample app and the template, I hope I can work up the changes for this PR and put off creating a local project at the moment.

Here's what this PR is doing to the current coverage ...

  • Version a new section to describe the .NET MAUI Blazor Web App project template. BTW ... The workload should already be installed if they follow our earlier guidance here to go work the .NET MAUI Blazor Hybrid tutorial first.
  • Version OUT the coverage on .NET MAUI Blazor Web App sample app and Migrating a .NET MAUI Blazor Hybrid solution so that it only appears for 8.0.
  • Keep the rest of the article in place for >=9.0.
  • In the Using interfaces to support different device implementations section, refactor the language to describe the API in a way that should cover both 8.0 folks using it to manually build the app and 9.0 or later folks who are getting it generated from the project template ... as I mentioned, IF all of the naming and code was preserved exactly for the new template.

WRT the command, I included the interactivity and interactivity location options, but you might prefer that I strike them because they're probably the default ...

dotnet new maui-blazor-web -o MauiBlazorWeb -int Server -ai

If you confirm that they are the default, I'll change the text a bit and remove them from that command. I'll tell the reader the defaults in the text next to the command.

I'll retain the option for naming the folder/namespace (-o|--output MauiBlazorWeb).


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/hybrid/tutorials/maui-blazor-web-app.md Build a .NET MAUI Blazor Hybrid app with a Blazor Web App

Copy link
Contributor

@BethMassi BethMassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some minor changes needed.

@guardrex
Copy link
Collaborator Author

@BethMassi ... This will be a Texas Two-step operation. First, I'll merge your commits, then I'll see about a commit to deal with the .Maui naming and how the device form factor piece moved to the home page. I'll try to version it; otherwise, it will break the current sample app. Perhaps, I can find time later to make the 8.0 sample app conform to the new template and we can drop the versioning, but I don't think that can be done in the very near-term due to the workload right now.

guardrex and others added 2 commits June 10, 2024 17:45
Co-authored-by: Beth Massi <bethma@microsoft.com>
@guardrex
Copy link
Collaborator Author

@BethMassi ... See if my last commit resolves ...

  • Naming ... drop .Maui from project names for 9.0 or later, and keep it for 8.0.
  • Form factor and platform ... keep existing DeviceFormFactor component coverage for 8.0, and show the new Home component for 9.0 or later.

@guardrex
Copy link
Collaborator Author

... and BTW ... I will open a follow-up issue to make the 8.0 sample app match that. Then, I can go back in here later and nix the versioned content and use the new naming.

@guardrex
Copy link
Collaborator Author

Also, there was some kind of build failure on the prior commit. I'll check on that after this builds and see what broke it 💥.

@guardrex
Copy link
Collaborator Author

guardrex commented Jun 10, 2024

Ok ... I see the problem. I'll fix it.

I had one too many versioning blocks, and the section name change broke a bookmark link.

The next commit should fix it up.

@guardrex
Copy link
Collaborator Author

🎉

Success! See how it looks now with the latest updates.

Copy link
Contributor

@BethMassi BethMassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see references to MauiBlazorWeb.Maui but as long as that is only for 8.0 that's OK I guess? It's hard to follow the conditional statements :-) so I trust you. I'd suggest just updating the .NET 8 sample to match the naming so it's easier.

@guardrex
Copy link
Collaborator Author

It's hard to follow the conditional statements :-)

Exactly! ... which is why I've been arguing for Version-by-File for years. They won't implement it (yet anyway), so we're stuck with this versioning for the time being.

Yes, I searched the doc and updated the versioning for the .Maui naming, and I'll give it a final look before merging this.

I'd suggest just updating the .NET 8 sample to match the naming so it's easier.

It will take longer than doing it this way. I'll fix that up on the other issue that I opened. Hopefully, I'll reach that in the RC time frame.

@guardrex
Copy link
Collaborator Author

ORF! My power is going MAD here right now. We're getting slammed by a giant thunderstorm ⚡, and I'm losing power and Internet intermittently. I'll try to wrap this up between blackouts! 😆

@guardrex
Copy link
Collaborator Author

Ok ... we're good. I'll merge now.

@guardrex guardrex merged commit 3b62b2a into main Jun 10, 2024
3 checks passed
@guardrex guardrex deleted the guardrex/blazor-preview-5-maui-hybrid-template branch June 10, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React to new .NET MAUI Blazor Hybrid template
2 participants