-
-
Notifications
You must be signed in to change notification settings - Fork 50
Add custom collection page, linked from package page #3457
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
Conversation
.forEach(customCollections, { collection in | ||
.a( | ||
.href(collection.url), // FIXME: link to custom collection page | ||
.href(SiteURL.collections(.value(collection.name)).relativeURL()), |
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.
Using the name to build the URL works fine but generates URLs like
http://localhost:8080/collections/SSWG%20Graduated
We could make the slug configurable in the custom-package-collections.json
by adding another field but I've kept it simple for now:
{
"name": "SSWG Graduated",
"description": "SSWG packages that are in 'graduated' state",
"badge": "SSWG",
"url": "https://raw.githubusercontent.com/finestructure/sswg-package-lists/refs/heads/main/graduated.json",
"slug": "sswg-graduated" // or maybe "id": "sswg-graduated"
},
The query cost for
The additional query cost for the collections fetch in async let customCollections = customCollections(on: database, package: packageResult.package) is minuscule cost-wise (~2) but of course brings some extra latency because the additional query needs to be run. |
e955e85
to
357a813
Compare
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.
Just a couple of points of general feedback:
- We’re using the term “collections” for these but we use “collections” for package collections elsewhere on the site. I don’t dislike the name, but do think it’s confusing as it stands. Off the top of my head, I could think of a couple of a couple of other terms that might work: “Package Suite” might work, “Package Group” is dull but might work, “Package Set” also might work.
- There should probably be a package collection for them at some point, but even if each “collection” had a package collectionI don’t think it fixes the issue with the naming.
- We should echo the description out under the title and make sure that markdown links are parsed in the description. I can see the SSWG wanting to link back to their page on Swift.org.
- We should also add another paragraph under the description that explains what this is. Something like: “Package collections/suites/groups/sets are human-curated lists of packages controlled by groups affiliated with Swift.org. Find out more in the [launch blog post].”
Regarding 1+2: I think of them exactly as package collections - it's a list of packages - and in fact I was planning to add the same package collection link we have on the author's page in a follow up :) Re 4: We've done this a couple of times (link to launch posts) but I wonder if we should rather create a more "timeless" page explaining things than blog posts. We don't typically go back and update them when things change. With the I'd suggest we leave that to a follow up where we create that page and add the link back from the list. |
Apologies, I didn't realise I had left this unapproved.
I think that works 👍
I'm all in favour of this. We will want to do a blog post about this so I was just trying to reduce work, but we can do both. |
357a813
to
f2fd092
Compare
93f60fd
to
3e0e3e8
Compare
To do: