I've done a lot of thinking about how we want to show package metadata this weekend, and I'm posting my initial draft designs here for discussion. Even though I'm planning to start implementing some parts of this tomorrow, everything is still up for open and frank review in this thread.
When I started this process, my main goal was to move away from the approach of trying to display all metadata about multiple versions of a package inline in the search results. It's already too much to take in and also doesn't show anywhere near what people need to know to make informed decisions about package quality.
The idea, as discussed previously, was to move to a "page per package" approach giving much more scope for displaying information that people can use to judge the maturity, quality, and maintenance history of a package.
I also rolled back my thinking displaying metadata from multiple package versions as part of this process. The fact that we capture all metadata from multiple versions it critical, but it's only occasionally useful for people to see. When it's useful, it's instrumental, but that tends to only be around the release of new Swift/operating system versions. The fact that we have this data is a huge advantage, but I want to be smart about displaying it.
So, here's my first draft of the per-package page, where I spent most of my time and thinking this weekend.
Some notes:
Display of multiple version metadata
You'll see an example of my idea for dealing with changing metadata between significant versions in the Languages and Platforms section. Most packages will use the same version of Swift/iOS/macOS/etc. for every version. It doesn't change that often. So let's only display it when it changes!
If all three significant versions use the same Swift versions, it just gets displayed once. Only if (in this example) the new beta upgraded Swift version would it be shown like it is here.
Prominence (or lack of) of the Swift version
You'll notice that one of the (seemingly) most essential bits of metadata, the version of Swift that's supported, is quite far down the listing. At first, this worried me too, but I think I'm OK with it after playing with it today. I think if we can get the metadata from git/GitHub about the number of releases, project start date, commits, etc. that gives an excellent indication of how active a project is. Active projects tend to support the latest version of Swift.
The Swift version needs to be there, and it is, but I don't think it's as important as that other metadata.
Contributors
Here's a basic plan that I think will work well for this line of metadata.
- Any contributor with more than 10 commits is eligible to be listed here. This rule will save projects where someone fixes a typo in a README in a newly released project with just an "Initial commit."
- For all eligible contributors, they are listed if they have made more than 5% of the total commits.
- The name should be fetched from the GitHub API for the username
- The link should go to the contributors GitHub profile.
- The name and link should be able to be overridden by our extra metadata file. The list of contributors should be custom at this point, and we should replace the method above with only the names and links in the metadata file. The link may point to any web site, not just their GitHub profile. (Yes, this opens up the possibility of spam, but let's deal with that as it comes up).
Quality Score
- I'm reserving some space with the grey [X] box on the right-hand side of the page for the "package quality index" score or whatever we call it. However, there are lots of decisions to make before we get to the specifics of this design. I'll raise a separate issue with some thoughts on it, maybe not tonight, but at some point.
Missing GitHub data
There metrics the sentences in this design that we're not currently collecting from the GitHub API. I didn't let that limit what I planned, but I realise we won't be able to implement all of this immediately, and that's OK 👍
Dependencies
The most obvious thing missing from this design is dependency details. I want to add this, but I feel it can be after an initial release.
Other interesting metadata
I had a quick chat with a friend of mine about this design earlier today. He mentioned a couple of metrics that he uses when evaluating a dependency. "Does it link against UIKit?" was one interesting one. "Does it swizzle any methods?" is another. I think this kind of metric might be really interesting to play with after an initial release.
I've also done some very preliminary thoughts on the home page. This gets affected by my thoughts on search though, which I'll post next! Here it is for reference though.