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

Update template so you can find it under Windows as well #2484

Merged
merged 3 commits into from
Jan 28, 2022

Conversation

dotMorten
Copy link
Contributor

@dotMorten dotMorten commented Sep 14, 2021

Description of Change

When you filter project templates by Windows, it's almost as if MAUI isn't supported:
image

You have to select All platforms to see it, however it still works to filter by iOS, Android and MacOS, so this is inconsistent.

Also the WinUI category is misleading, as this is a MAUI app, and WinUI is just an underlying tech. As a user I'd prefer keeping the WinUI section for actual WinUI apps, and not get the groups too polluted.
image

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

Does this PR touch anything that might affect accessibility?

  • Does this PR introduce a new control? (If yes, add an example using SemanticProperties to the SemanticsPage)
  • APIs that modify focusability?
  • APIs that modify any text property on a control?
  • Does this PR modify view nesting or view arrangement in anyway?
  • Is there the smallest possibility that your PR will change accessibility?
  • I'm not sure, please help me

If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.

WinUI is misleading, as this is a MAUI app, and WinUI is just an underlying tech. As a user I'd prefer keeping the WinUI section for actual WinUI apps.
@Eilon
Copy link
Member

Eilon commented Sep 14, 2021

Should it say both WinUI and MacCatalyst? It's not purely an implementation detail in the sense that you can (and possibly might) write code that is WinUI-specific in that app.

Similarly, what about Mac Catalyst and macOS, for which it says both?

@dotMorten
Copy link
Contributor Author

It's not purely an implementation detail

These categories are to help the user filter and find their templates. From a user workflow perspective, you'd use these dropdowns to look for specific types of project templates. If you're building a MAUI app, you'd pick MAUI, if you're starting a new WinUI app, you'd select that. I agree MacCatalyst is odd - I'd remove that. Seems like the odd one out in this list:
image

@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Eilon
Copy link
Member

Eilon commented Sep 15, 2021

@dotMorten your idea seems quite reasonable to me.

@mattleibow
Copy link
Member

I think that list needs to be organised. You might want to filter by WinUI as that is the tech you want to use. Or the Mac Catalyst. That is different to macOS. Both are macOS, but maccat is a subset.

I suppose the argument for WinUI is that UI kit should be there too. The last drop down is project type and not platform.

@lutzroeder What should we do here? Do we have some set of things? I see Plugin and Other which makes me things everyone just puts what they want willy nilly.

@Eilon Eilon added the area-templates Project templates, Item Templates for Blazor and MAUI label Sep 16, 2021
@lutzroeder
Copy link
Member

Is it possible to have both, and add Desktop and Mobile as well?

@Redth
Copy link
Member

Redth commented Sep 24, 2021

@BretJohnson is there a limit to the classifications a template can have? Is there any guidance on best practices here?

@Redth Redth added the community ✨ Community Contribution label Nov 16, 2021
@hartez hartez assigned Redth and unassigned mattleibow Dec 29, 2021
@hartez hartez added this to the 6.0.200-preview.13 milestone Dec 29, 2021
@phenning
Copy link
Contributor

Instead of putting Windows in the classifications, which would cause it to show up as a "project type" (third combo in VS) rather than as a platform (the second one), it should be added to the ide.host.json as follows:

{
    "tags": [
        {
            "type": "platform",
             "add": [ "Windows" ]
        }
    ]
}

If we want it to show up as "Windows" in the CLI dotnet new list, you could also add it as a classification in template.json but then do the following in the host file to "move" it to the proper drop down within VS:

{
    "tags": [
        {
            "type": "platform",
             "add": [ "Windows" ]
        },
        {
            "type": "projectType",
             "remove": [ "Windows" ]
        }
    ]
}

@phenning
Copy link
Contributor

In regards to my last comment, it looks like the IDE is doing some fix up when the VS template engine host passes what the IDE knows to be are "platforms" in as projectTypes. instead of adding it to the projectType drop down, it just treats the template as though it specified that platform tag instead. This also has the side effect of moving where the tag appears in the template detail.

For example, when using @dotMorten's technique:
image

When using the ide.host.json technique:
image

If specifying it both ways:
image

@Redth Redth merged commit 27380dd into dotnet:main Jan 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants