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

Improve the WinUI C# templates #6

Open
66 tasks
mrlacey opened this issue Jan 28, 2022 · 2 comments
Open
66 tasks

Improve the WinUI C# templates #6

mrlacey opened this issue Jan 28, 2022 · 2 comments
Labels
Milestone

Comments

@mrlacey
Copy link
Owner

mrlacey commented Jan 28, 2022

As part of the move to support VS2022, it would be good to review what's actually generated as making any substantial changes in the future will become much more difficult in terms of maintaining backward compatibility.

This is a list for my own reference and items below may or may not make it into the Microsoft version. Any feedback, comments, or suggestions are welcome. Points created here will likely become separate issues on the Microsoft repo.

The C++ templates are out of scope for discussion here as I'm not able to provide suitably informed comments.

Changes to consider:

  • Remove "standard" project templates
  • Remove "standard" item templates
  • Remove "Blank" option.
  • Rename "Blank Advanced" option.
  • Update to C# v10 and use the latest syntax where applicable (esp. when prompted by default analyzers to use a newer syntax.)
  • Ensure standardization of generated code.
  • Change to use version 8.0 of the MVVM Toolkit (preview available)
  • Add a "proper" code-behind option. This should use standard event handlers and not be a hybrid MVVM-CodeBehind option simply because it makes authoring templates easier.
  • Remove the need for packaging project
  • Add option to the wizard to include another language (as a reference) #NTH
  • Update all the NuGet dependencies
  • Update readmes in generated projects
  • Add "better" docs for ActivationService & Activation Handlers! (rather than just say step through the code)
  • Understand IPageService (& use) is it really needed? Should the config go with the other DI config?
  • Why does "Blank" (advanced) have a navigation service? Isn't the purpose of this option to let the end-developer build navigation how they want?
  • "developer TODOs" need better explaining
  • Don't mention "SplitView" in public-facing docs. Or at all?
  • Don't mention ShellPage when the generated project doesn't have one
  • Why are interfaces called "Contracts"? Could they be confused with "Code Contracts"? Need real user feedback!
  • Really need to establish how "basic" the Blank project type needs to be.
  • fix broken links to docs from generated code
  • Make sure docs have the information in them that they should.
  • Be consistent on where interfaces are placed in the folder structure.
  • Ensure activation is documented as it's understandable for someone with no experience
  • Add another activation handler as an example.
  • Target .NET6
  • Set (latest number) version of C# in the project file. So it's clear what is/should be used.
  • Is "Helpers" the best name? Get feedback!
  • Theme service settings key has a "weird" name that doesn't seem to represent what it is used for.
  • Review webview2 distribution guidance and make any necessary updates to code & docs
  • Use more interesting default page for the webview (aka.ms/wts??? or one of our docs pages?)
  • Add consideration for Launcher.LaunchUriAsync failing (an error?) or returning false;
  • Resources: All entries need a comment (that is useful and consistent)
  • Resources: be consistent "Setting_..." and "SettingsPage_...."
  • Review Settings page layout and spacing
  • MenuBar Menu entries need hotkeys (and tooltips?)
  • Should disabled-buttons still have tooltips?
  • Update all the dates in the sample data so they don't feel SOOOOOOOOOO old
  • Multiple left margin sizes: main, list, list detail
  • ListDetails page title is inconsistent at best
  • Back button position is inconsistent (ListDetail & ContentGrid
  • Review DataGrid right margin when very narrow.
  • Why not put metadata from WTS.ProjectConfig.xml inside the project file?
  • Review minimum supported version of Win10 & remove anything specifically done to accommodate below that?
  • Include a default editorconfig file?
  • Don't call CanGoBack before calling GoBack when this is already done internally.
  • OnNavigatedTo should include error handling if doing a lookup on passed parameters
  • Review comments to remove sample data. Are they all needed?
  • BaseViewModel? that also implements INavigationAware and allows overriding if needed.
  • Include more default error handling in view models????
  • EnsureItemSelected needs a comment explaining it's purpose
  • Can we remove the hardcoded strings passed to GetLocalized?
  • Avoid passing nulls to NavigationService.NavigateTo
  • Why are the Helper.Json methods async when they don't need to be? Make them not! unless there's a good reason I'm missing.
  • Add a note about exception handling to the SampleDataService
  • Having both INavigationService & INavigationViewService is confusing. Expose INS from INVS to simplify ShellViewModel in NavPane projects.
  • Styles!!!
  • thickness, use shorter syntaxes where appropriate
  • why not use implicit page style as a default?
  • Styles: Use appropriately named styles
  • Styles: Don't define values the same as defaults
  • Styles: Use sensible inheritence.
  • Styles: Don't define app-level resources that are only used on one page
  • Styles: Don't use generic names (eg. DetailPage) when not used by/on all such controls/pages
  • Styles: Don't have an inconsistent type size ramp.
  • Styles: Don't mix hardcoded values and named ones (for text size)
@mrlacey mrlacey added the WinUI label Jan 28, 2022
@mrlacey mrlacey self-assigned this Jan 28, 2022
@mrlacey
Copy link
Owner Author

mrlacey commented Mar 3, 2022

See more about the above points at https://youtu.be/5_gF0fAp1Qk

@mrlacey
Copy link
Owner Author

mrlacey commented Jul 5, 2022

Leaving this open for reference but removing my assignment as I don't have plans for progressing WinUI3 support here.
Microsoft have their own plans regarding Template Studio for WinU3

@mrlacey mrlacey removed their assignment Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant