Category for uploaded package

Dec 3, 2010 at 1:28 AM

If I upload a package using the WCF service, I see that it makes its way into the Orchard DB when the Sync task kicks in, but it never shows up in the UI.  I think the reason is that uploaded packages are not in any taxonomy Category, and the gallery only displays those that are.  Should the gallery display uncategorized packages?  Is there a way today that I can upload a package through the WCF service and have it show up in the gallery?

Dec 3, 2010 at 12:48 PM

I'm not sure if we want to display uncategorized packages. The way we're handling the taxonomy hierarchy, the top level terms are considered the Package Type (for Orchard that would be Module and Theme). The second level terms are Categories (we're going to allow a primary and secondary category to be selected in Orchard). When a package is uploaded through the gallery UI, the user is taken to an edit form where they have to choose the Package Type and Category before they can submit and publish the package to the feed.

For NuGet packages that are uploaded through the command line, I assume you want them to become visible on the feed immediately (without requiring a visit to the website)? My thought for that is NuGet will most likely have only one Package Type (i.e. top level) term defined in the taxonomy, probably just "Package" or something like that. In the synchronizer, we could add logic such that if there is only one top level term defined, we automatically assign sync'ed packages to that Package Type. What do you think about that?

Dec 3, 2010 at 3:59 PM

Sounds good to me. We do want packages to show up automatically when published via the command line. Later on though, we'll need to think about publishing workflows. For example, do we want to enable someone to upload a package via the command line that isn't displayed into the gallery until the developer publishes it?

For now, I think we can get by with packages that are pushed are immediately published. But we may want to consider adding a -published flag. So when packages are pushed without the flag, they are in the gallery, but don't show up anywhere. This gives authors a chance to login and apply categorization first etc.

Dec 3, 2010 at 4:49 PM

Our client tool already has a -publish flag to do this, but I think the 'published' status is orthogonal to this issue.  The 'published' concept only exists in the gallery server, while this issue is on the Orchard side.

Kevin, about "For NuGet packages that are uploaded through the command line, I assume you want them to become visible on the feed immediately": note that they are available on the feed right away (if we do the publish step).  It's on the Orchard Gallery that they are nowhere to be found.  So the question is: what is the workflow for the package author to go to the gallery and categorize their packages if they didn't have a category (or Package Type) in the first place?

Though as you suggest, for the main NuGet gallery, we will indeed want everything to be a 'package', so I'm fine with th idea of it being promoted automatically to that 'package type' on upload since that's the only one.

Dec 3, 2010 at 5:46 PM

Right, that was my mistake. You would control whether they appear on the feed based on calling the Publish method. Since you're going to do that at the time they push the package, we should go ahead and automatically assign the Package Type when it gets synced into Orchard (since there will be only one). The Categories are more of an optional thing. The Orchard Gallery will display anything that is assigned to a top-level taxonomy term so if we handle assigning that, then a package author won't have to go to the website to get their package to show up.

Dec 3, 2010 at 7:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.