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

Starter kits: dotnet new templates not umbraco packages? #53

Closed
LottePitcher opened this issue Jul 3, 2023 · 27 comments
Closed

Starter kits: dotnet new templates not umbraco packages? #53

LottePitcher opened this issue Jul 3, 2023 · 27 comments

Comments

@LottePitcher
Copy link

LottePitcher commented Jul 3, 2023

There has been some discussion on Discord - https://discord.com/channels/869656431308189746/1113091087939158160 - that starter kits make more sense to be released as dotnet new templates, not umbraco packages.

What do we think about the marketplace featuring templates as well as umbraco packages? Otherwise the obvious downside to this approach is they won't be discoverable on the marketplace


This item has been added to our backlog AB#33076

@LottePitcher LottePitcher changed the title Starter kits: dotnet new templates not umbraco packages Starter kits: dotnet new templates not umbraco packages? Jul 3, 2023
@nathanwoulfe
Copy link

Hey @LottePitcher 👋

First impression - I don't hate it, and tend to agree that a template makes more sense than a package as a starter kit is the baseline for a new project, not something added to supplement/extend an existing project.

There would obvs be some changes required to make it work, but ultimately we're still talking about nuget packages, just a different flavour. Ideally I think we'd be considering template-type packages and treating these as we do 'normal' packages, so that we can display both types in the existing categories (we'd likely then have packages, integrations and templates)

Andy is off this week, but we'll discuss when he's back and will update here.

@BoletteKern
Copy link

Hi Lotte,
We have seen "untraditional" packages before and managed to present/fit them into the Umbraco Marketplace setup, e.g. Cookiebot, so I hope we can do something similar here :)

@LottePitcher
Copy link
Author

Thank you @nathanwoulfe and @BoletteKern for your thoughts. I'll be sure to post a link here to any starter kit(s) released as templates so there are real examples to consider. :-)

@ronaldbarendse
Copy link

Everyone that created a local Umbraco project will have used the Umbraco.Templates package, so we can already list that (as HQ 'package').

We could also list .NET tools, which are also distributed as NuGet packages and already have some examples:

@AndyButland
Copy link
Contributor

AndyButland commented Jul 12, 2023

Thanks all... so for now, just listing here the things we'd need to think about:

  • They are all NuGet packages, so that's good. Hence they could be tagged with "umbraco-marketplace" and we'd pick them up.
  • They don't have dependencies on Umbraco though, so this would currently lead to them being rejected. As an attempt to provide some sort of spam gate, we look for a direct or indirect dependency on Umbraco CMS 8+ or Umbraco Commerce, as well as the tag. So that would need thinking about whether we relax that, or require some HQ involvement to "allow list" some templates/tools.
  • We'd want some way to identify them as being "tools" or "templates".
    • I feel they could probably go into existing categories OK - e.g. "Developer Tools", "Starter Kits".
    • But we'd still need to identify them as "templates" or "tools" so we can list the appropriate install instructions, so perhaps that's a new type (so we have "package", "integration", "tool", "template")
    • Maybe that information is available via the NuGet API, but if not, at worst case we could screen-scrape it off the NuGet.org page.

@deanleigh
Copy link

deanleigh commented Aug 18, 2023

Hey all,
with the help of @LottePitcher I now have UmBootstrap as a dotnet project template listed on nuget:
Umbraco.Community.Templates.UmBootstrap

It does, as @AndyButland mentioned, have Umbraco as a dependency and is both a template, starter kit and component library.

Please let me know if there are any steps I can take to help make this the first dotnet project template on Umbraco Marketplace.

@AndyButland
Copy link
Contributor

It is does @AndyButland mentioned, have Umbraco as a dependency and is both a template, starter kit and component library.

Did you mean "doesn't have" here @deanleigh? If you did mean "does", can you elaborate please, as clicking the link to NuGet I don't see anything that would indicate this dependency. If we can find some alternate means of validating that a package does have an Umbraco dependency, we could look to use that. Otherwise as I noted above, perhaps we have to remove or relax this check when importing packages in order to support including templates.

@deanleigh
Copy link

It does, as @AndyButland mentioned, have Umbraco as a dependency and is both a template, starter kit and component library.

Did you mean "doesn't have" here @deanleigh? If you did mean "does", can you elaborate please, as clicking the link to NuGet I don't see anything that would indicate this dependency.

The template is essentially an Umbraco site with content and doctypes added by Usync on first build.
Does that count as having Umbraco as a dependency?

If we can find some alternate means of validating that a package does have an Umbraco dependency, we could look to use that. Otherwise as I noted above, perhaps we have to remove or relax this check when importing packages in order to support including templates.

Happy to add additional tags but not sure if that is a good long term policy.
Please let me know of any way to validate it as I would love to get it in Marketplace a.s.a.p.

@AndyButland
Copy link
Contributor

The template is essentially an Umbraco site with content and doctypes added by Usync on first build. Does that count as having Umbraco as a dependency?

Not in the sense that we consider it for importing packages at the moment. If you click here you can see there are no dependencies listed. For a typical Umbraco package, e.g. here, you will see at least one (or if not, a dependency on something else that depends on Umbraco).

So that's the part we have to consider/modify it allow import of templates or tools.

@deanleigh
Copy link

deanleigh commented Aug 23, 2023

This seems odd as without Umbraco there is no template.
I wonder if that is something we can add when pushing to nuget.org?
e.g in template-pack.csproj add:

<PackageReference Include="Umbraco" Version="10.6.1" />

to

  <ItemGroup>
    <Content Include="Umbootstrap.Web\**\*" Exclude="Umbootstrap.Web\**\bin\**;Umbootstrap.Web\**\obj\**" />
    <Compile Remove="**\*" />
    <None Include="assets\README_nuget.md" Pack="true" PackagePath="\"/>
    <None Include="assets\icon_nuget_umbootstrap.png" Pack="true" PackagePath="\"/>
  </ItemGroup>

Perhaps one for @LottePitcher ?

@deanleigh
Copy link

Is there anything I can do to make this happen?
I am getting great feedback from people using UmBootstrap as a starter kit and for rapid app dev but I can't let people know about it on Marketplace?

@AndyButland
Copy link
Contributor

AndyButland commented Sep 19, 2023

Did you try your suggestion in the comment above? I believe if you do that - i.e. add a dependency to Umbraco CMS, and also add the usual umbraco-marketplace tag, that should should list the template on the Marketplace.

If that works that'll at least get you the listing up.

I'd still like to do a bit more to display templates and tools differently from normal packages - not least so we can display correct install instructions. But that will need work on our side - which we are talking about, but haven't yet planned in.

@deanleigh
Copy link

Hi Andy,
yes I took a look at Umbraco.Forms as suggested and whilst it has depenencies listed as follows:
Umbraco.Forms.Core.Providers (>= 12.1.1)
Umbraco.Forms.Examine (>= 12.1.1)
Umbraco.Forms.StaticAssets (>= 12.1.1)
It does not specifically have Umbraco listed as a dependency.

UmBootstrap is quite literally an Umbraco site i.e. without Umbraco it couldn't exist, so are there any instructions as to how I would go about adding Umbraco as a dependency in a way that Marketplace will recognise?

@AndyButland
Copy link
Contributor

I've made a PR to your repo to show you the idea.

The important thing is that currently Umbraco CMS or Commerce must be in the dependency chain of the package, so although Umbraco.Forms doesn't depend on Umbraco.Cms.*, if you follow the dependency chain you'll see that it does (Umbraco.Forms --> Umbraco.Forms.Core.Providers -->Umbraco.Forms.Core --> Umbraco.Cms.Web.BackOffice).

For background. the general instructions for listing packages are here.

@deanleigh
Copy link

deanleigh commented Sep 19, 2023

Thanks @AndyButland
funnily enough I followed this article:
https://learn.microsoft.com/en-us/dotnet/core/tools/dependencies#add-a-dependency-by-editing-the-project-file
and went to add the code to csproj and found this was already in the project csproj:

  <ItemGroup>
    <PackageReference Include="Our.Umbraco.UmbNav.Web" Version="2.0.8" />
    <PackageReference Include="System.Drawing.Common" Version="7.0.0" />
    <PackageReference Include="Umbraco.Cms" Version="10.6.1" />
  </ItemGroup>

I think I know how to do this manually now but I'll check your PR first

@deanleigh
Copy link

Updated template-pack.csproj and all seems right in nuget.org.
Are you able to test in Marketplace please?

@nul800sebastiaan
Copy link
Member

@deanleigh We have tools for you! 🙌 https://marketplace.umbraco.com/validate and if it passes, you can request a sync too.

@deanleigh
Copy link

image

@AaronSadlerUK
Copy link

I can confirm my starterkit is now visible on the marketplace by adding the umbraco-marketplace tag and umbraco cms dependency

So it is confirmed that a dotnet template starterkit can be seen in the marketplace

https://marketplace.umbraco.com/package/umbcheckout.starterkit.stripe

@deanleigh
Copy link

deanleigh commented Sep 19, 2023

I have released another version, this time with umbraco-marketplace.json completed @nul800sebastiaan

@deanleigh
Copy link

Thank you so much @AndyButland and @nul800sebastiaan for making this live.
I have a question related to the installation buttons, they seem to be pre-configured for nuget packages therefore will not work.
So instead of:
dotnet new umbootstrap
They are:
dotnet add package Umbraco.Community.Templates.UmBootstrap
and:
Install-Package Umbraco.Community.Templates.UmBootstrap

@AndyButland
Copy link
Contributor

Yes, that's noted...

I'd still like to do a bit more to display templates and tools differently from normal packages - not least so we can display correct install instructions. But that will need work on our side - which we are talking about, but haven't yet planned in.

... we'll hopefully get chance to have a look at this in the upcoming weeks.

@deanleigh
Copy link

deanleigh commented Sep 21, 2023

One for Umbraco Hacktoberfest 2023?
Also my category is not appearing, do I need to encode the ampersand?
"Category": "Themes & Starter Kits",

@AndyButland
Copy link
Contributor

We've released an update today that now displays the appropriate install instructions depending on the type of package.

We decided to combine what we previously had as "package type" (i.e. "Package" or "Integration") with the new detail which is the "NuGet package type" (i.e. "Package", "Tool" or "Template"). Which gives us 4 options we display on the front-end.

  • If the NuGet package type is a "Tool" or a "Template" we use that.
  • Otherwise if the package owner has marked their package in the umbraco-marketplace.json file as an "Integration" we use that.
  • Otherwise we use "Package".

There's a template example here, but more will update as the synchronisation runs.

@deanleigh
Copy link

Amazing @AndyButland thank you so much.
I feel more confident promoting it in Marketplace now.

@AaronSadlerUK
Copy link

@AndyButland It looks like the validator needs updating

"PackageType": "Template",

image

@AndyButland
Copy link
Contributor

I think it's actually OK, though perhaps getting a bit confusing given we have these two definitions of "package type" now that we are combining into one in the UI.

But for the package owner data provided in umbraco-marketplace.json, this can remain as either "Package" or "Integration". We use the NuGet package type in preference, so if this is set to "Tool" or "Template" we'll use that irrespective of what's in the umbraco-marketplace.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants