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

Add New .NET MAUI Template with Syncfusion Toolkit Integration #25419

Merged
merged 17 commits into from
Oct 25, 2024

Conversation

PaulAndersonS
Copy link
Contributor

@PaulAndersonS PaulAndersonS commented Oct 21, 2024

This PR introduces a fully featured sample app as part of the new .NET MAUI project experience. When you choose to include the sample content in a new .NET MAUI project, you will find a fully functional to-do app that will bring balance to every .NET developer's life. You can create projects, and projects can have tasks. It uses controls from the new Syncfusion Toolkit for .NET MAUI to visualize the data. and to persist the data we use a local database based on SQLite. Furthermore, the sample app uses common patterns, like MVVM, and libraries that you will find in almost every .NET MAUI application.

new-template-flat
template-windows

The libraries that are included in the sample content are:

  • Syncfusion Toolkit for .NET MAUI
  • .NET MAUI Community Toolkit
  • CommunityToolkit.Mvvm
  • SQLite

We believe that this sample app will give you a flying start when you begin working with .NET MAUI.

When creating a new .NET MAUI project from Visual Studio, you can check the box to include all this sample code and get a sense of what an actual .NET MAUI project looks like. Also, dotnet new maui from the command line will now include this content. If you wish to opt-out you can do dotnet new maui --empty or, when using Visual Studio, you can uncheck the box.

@PaulAndersonS PaulAndersonS requested a review from a team as a code owner October 21, 2024 13:12
@PaulAndersonS PaulAndersonS requested review from Eilon and tj-devel709 and removed request for a team October 21, 2024 13:12
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Oct 21, 2024
Copy link
Contributor

Hey there @PaulAndersonS! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@PaulAndersonS
Copy link
Contributor Author

@dotnet-policy-service agree

@jsuarezruiz jsuarezruiz added the area-templates Project templates, Item Templates for Blazor and MAUI label Oct 21, 2024
@davidortinau
Copy link
Contributor

Thanks @PaulAndersonS!

Everyone, please review and comment especially on the guidance and patterns this template provides.

Providing a more full featured sample in the templates is something we are often asked for by developers (often in their learning journey), while also retaining the empty template.

@dotnet dotnet deleted a comment from jsuarezruiz Oct 21, 2024
@dotnet dotnet deleted a comment from azure-pipelines bot Oct 21, 2024
Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

It's really nice to see a more complex template with more possibilities!

@@ -3,7 +3,13 @@
"name": ".NET MAUI App",
"description": "A project for creating a .NET MAUI application for iOS, Android, Mac Catalyst, WinUI and Tizen",
Copy link
Contributor

Choose a reason for hiding this comment

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

It's the same description as the default project

"description": "A project for creating a .NET MAUI application for iOS, Android, Mac Catalyst, WinUI and Tizen",
, shouldn't it be different? mention the use of the Syncfusion Toolkit etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"A project template for creating a .NET MAUI application that includes Syncfusion Toolkit integration, supporting iOS, Android, Mac Catalyst, WinUI, and Tizen"

Any other suggestions?

Copy link
Member

Choose a reason for hiding this comment

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

Note that the template without the sample app is still there too, so the description might be made a bit more accurate but let's make sure people know it's optional

"symbols/Framework/choices/DOTNET_TFM_VALUE/description": "Target DOTNET_TFM_VALUE",
"symbols/IncludeSampleContent/displayName": "_Include sample content",
"symbols/IncludeSampleContent/description": "Configures whether to add sample pages and functionality to demonstrate basic usage patterns.",
"symbols/Empty/description": "Configures whether to omit sample pages and styling that demonstrate basic usage patterns.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it be located later? only the main description seems to be localized.

Copy link
Member

Choose a reason for hiding this comment

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

@rmarinho I think a follow-up pr comes to localize, correct?

Copy link
Member

@rmarinho rmarinho Oct 22, 2024

Choose a reason for hiding this comment

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

yap when is merged to main it will trigger the localization steps, we can then backport if we get the translations in time

@PureWeen PureWeen added this to the .NET 9.0 GA milestone Oct 21, 2024
@daltzctr
Copy link
Contributor

I notice no screenshots of Windows usage. Is Windows supported for this template or is it exclusively for mobile platforms?

@davidortinau
Copy link
Contributor

I notice no screenshots of Windows usage. Is Windows supported for this template or is it exclusively for mobile platforms?

Windows is tested and supported. Someone could add some screenshots for completeness.

@PaulAndersonS
Copy link
Contributor Author

I notice no screenshots of Windows usage. Is Windows supported for this template or is it exclusively for mobile platforms?

Windows is tested and supported. Someone could add some screenshots for completeness.

Added Windows screenshots

@baaaaif
Copy link

baaaaif commented Oct 22, 2024

I am surprised that a SyncFusion Toolkit integration is being waved through so easily into the official template (even though it is free).

Don't other commercial providers such as DevExpress or Telerik feel offended by this?

I don't care, but I just wanted to point it out.

@CliffAgius
Copy link
Contributor

Really like this but when it's in place can it be that the current empty template is the default and this new template that is awesome becomes an opt in or check box option.

Be nice if the template had some simple tests for testing the VM's and UI this seems to be where most projects struggle that I see in teams I help out with.

@GeorgeLeithead
Copy link

Really like this but when it's in place can it be that the current empty template is the default and this new template that is awesome becomes an opt in or check box option.

Be nice if the template had some simple tests for testing the VM's and UI this seems to be where most projects struggle that I see in teams I help out with.

I think it would be even better to have a check-box for each of the included toolkits, along with a '?' that links to the appropriate community landing page. For example,

  • Syncfusion Toolkit for .NET MAUI
  • .NET MAUI Community Toolkit
  • CommunityToolkit.Mvvm
  • SQLite

Copy link
Contributor

@pictos pictos left a comment

Choose a reason for hiding this comment

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

I like this new template, but I don't think it should be default one.

I also, have some suggestions

}
}

public class ChipDataTemplateSelector : DataTemplateSelector
Copy link
Contributor

Choose a reason for hiding this comment

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

can this class have its own file?

Copy link
Member

Choose a reason for hiding this comment

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

Going to leave this one here for now we can discuss for the next iteration

/// <param name="ex">Exception.</param>
public void HandleError(Exception ex)
{
lock (this)
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a good practice, if some one uses this ModalErrorHandler for locking it may cause a deadlock. And more important question, do we need a lock here? I don't think so, since the DisplayAlert will only run on UIThread

@davidortinau
Copy link
Contributor

I am surprised that a SyncFusion Toolkit integration is being waved through so easily into the official template (even though it is free).

Don't other commercial providers such as DevExpress or Telerik feel offended by this?

I don't care, but I just wanted to point it out.

We welcome all contributions, and there are various ways. This is just one of them.

More context for this PR: https://devblogs.microsoft.com/dotnet/dotnet-maui-welcomes-syncfusion-open-source-contributions/

@davidortinau
Copy link
Contributor

I think it would be even better to have a check-box for each of the included toolkits, along with a '?' that links to the appropriate community landing page. For example,

Yeh, that's something we could do in the future. There are other VS extensions that provide this kind of experience today.

@PureWeen
Copy link
Member

@pictos I tracked some of your comments here
#25515

Because I think they are useful to have a longer discussion about a few of these

@akhanalcs
Copy link

This is great, but don't make it the default one. Maybe something like:
dotnet new maui --sf and series of prompts to include additional options specific to Syncfusion.

@Redth Redth self-requested a review October 24, 2024 22:32
@PureWeen
Copy link
Member

This is great, but don't make it the default one. Maybe something like: dotnet new maui --sf and series of prompts to include additional options specific to Syncfusion.

It's not the default one anymore

Unless you're seeing something I missed?

@PureWeen PureWeen merged commit bf4cafb into dotnet:release/9.0.1xx Oct 25, 2024
1 check passed
Redth added a commit that referenced this pull request Oct 29, 2024
### Description of Change

This fixes the toggle for including sample content in the template. In
#25419 some last-minute changes were made to not make the sample content
show up by default, but that introduced a bug where you couldn't get the
sample content to show up at all using Visual Studio.

With this change the sample content can optionally be included again in
Visual Studio by using the checkbox and through the CLI by specifying
either `--sample-content` or `-sc`.

Also the not used `Empty` switch was removed as well as the
`SampleContent` variable which did not serve any additional purpose.
@github-actions github-actions bot locked and limited conversation to collaborators Nov 24, 2024
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-templates Project templates, Item Templates for Blazor and MAUI community ✨ Community Contribution fixed-in-9.0.0 partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.