-
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
Add New .NET MAUI Template with Syncfusion Toolkit Integration #25419
Add New .NET MAUI Template with Syncfusion Toolkit Integration #25419
Conversation
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. |
@dotnet-policy-service agree |
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. |
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.
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", |
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.
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", |
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.
"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?
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.
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.", |
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.
Will it be located later? only the main description seems to be localized.
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.
@rmarinho I think a follow-up pr comes to localize, correct?
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.
yap when is merged to main it will trigger the localization steps, we can then backport if we get the translations in time
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 |
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. |
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,
|
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.
I like this new template, but I don't think it should be default one.
I also, have some suggestions
src/Templates/src/templates/maui-mobile/PageModels/ManageMetaPageModel.cs
Show resolved
Hide resolved
src/Templates/src/templates/maui-mobile/PageModels/ManageMetaPageModel.cs
Show resolved
Hide resolved
src/Templates/src/templates/maui-mobile/PageModels/ProjectDetailPageModel.cs
Outdated
Show resolved
Hide resolved
src/Templates/src/templates/maui-mobile/PageModels/ProjectDetailPageModel.cs
Outdated
Show resolved
Hide resolved
src/Templates/src/templates/maui-mobile/PageModels/ProjectDetailPageModel.cs
Outdated
Show resolved
Hide resolved
src/Templates/src/templates/maui-mobile/PageModels/TaskDetailPageModel.cs
Outdated
Show resolved
Hide resolved
src/Templates/src/templates/maui-mobile/PageModels/TaskDetailPageModel.cs
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
public class ChipDataTemplateSelector : DataTemplateSelector |
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.
can this class have its own file?
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.
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) |
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.
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
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/ |
Yeh, that's something we could do in the future. There are other VS extensions that provide this kind of experience today. |
This is great, but don't make it the default one. Maybe something like: |
It's not the default one anymore Unless you're seeing something I missed? |
### 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.
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.
The libraries that are included in the sample content are:
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 dodotnet new maui --empty
or, when using Visual Studio, you can uncheck the box.