-
Notifications
You must be signed in to change notification settings - Fork 890
Profile registration #1311
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
Profile registration #1311
Conversation
Since we’re calling them ‘profiles’ now.
This makes the sidebar table of contents more useful imo (for us and, soon, in user-defined profiles).
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.
Haven't had a chance to read it all, but so far this looks great!
@ethanresnick I have a couple general concerns:
|
Is there an alternative to registration by name? The only ones I can think of seem worse (e.g., randomly assigning ids). Moreover, I'm pretty confident that we can decouple whether a profile has a nice URL from whether it seems to carry official approval. Right? After all, the profile's URL isn't shown until the pretty late in the profile discovery process — once the user is on the page for the profile's spec — so there are plenty of UI opportunities before then for us to highlight choice profiles and downplay poor ones. Or, for profiles where we don't want to takes an editorial view about their quality, we could even (if we really wanted to) randomize the order in they appear on the site, e.g.
Are you saying to the URL of the page in this PR should be
I'm not sure I understand this. If we didn't have a top-level menu item, how would people find registered profiles? Are you saying you don't want to show the list of registered profiles on the site? If so, why? |
Great, sounds like we're in agreement 👍
I was just saying that we drop the |
One option here would be to have two classes of profiles - "official" and "community". Each would reflect their "class" in the directory, but not in the URL (otherwise a community profile could never be "promoted"). In this way we could allow profiles to prove themselves as community profiles first, and then eventually promote the most useful and popular ones. Follow up: I think the major weakness to my proposal is that we have to kind of "prejudge" the quality of community profiles to decide if they're solid enough to grab a significant URL. Maybe a good approach here would be to prefix all profile URLs with an index, such as the PR number used to add them. This approach is taken in the emberjs/rfcs repo - the only downside is that it requires a manual edit step upon merging. |
For context, I kept the menu item as "Extensions" because I thought the term "Profiles" would be unfamiliar to someone new to JSON:API. Basically, I wanted someone who'd just discovered the JSON:API site to see "Oh, there's this nice spec that covers common cases, and also all these off-the-shelf extensions". Once people are familiar with the spec and know what a profile is, I don't think label "Extensions" will confuse them — plus, we say as the first sentence on that page "JSON:API can be extended with profiles" — so I figured that directing the label at new users made more sense. Thoughts on this approach?
I'm not necessarily opposed to this, but I don't really understand what problem it would be solving. Can you explain the motivation? My biggest goal is to keep the registration process easy to discover, and I think having the link to it in the main Extensions page's left nav is a pretty prominent place for it.
I think that could work. My one concern is that it could be tricky to author a profile when you don't know what its URL is gonna end up being. E.g., in my cursor pagination example profile, there are hardcoded references to various error URLs in the spec, but those URLs wouldn't exist at spec authoring time with this approach. So either the editors would have to edit all those URLs upon merging too, or encourage authors to use the (Also, as an aside, I'd love for the index to be a different path segment, rather than a hyphen-separated prefix — e.g. Another possible approach would be to use the author's github name as a namespace. So, the URL (and directory structure) would be, e.g., |
+1
I think I agree with @dgeb. The vast majority of users will be searching for applicable profiles and how to use them, not how to register new ones. If you (1) understand profiles (2) want to author one, I think you're already familiar/motivated enough to go looking for a link.
This is where my mind went as well. Having a deterministic namespace prior to authoring the profile is desirable. However, I think it's important that there be a namespace, but not that their be a strict definition of what the namespace must be. The language could be something like this: "a profile URL must take the form For example, I'd like to author profiles that we've developed with lots of community involvement. I would not like to tie that profile to my name because I don't deserve all the credit. So, in my case, I'd like to be able to submit a profile like |
I talked with @ethanresnick and we agree with the basic form of your proposal @gabesullice
We're going to strongly recommend that the author use either their username or an org to which they belong (which are both easy to verify of course) for a namespace. Exceptions can be allowed for unusual cases. We also discussed introducing a new |
Ok y'all, I've updated the PR per the comments above and my discussion with @dgeb. See the most recent commit. |
5687f22
to
4ec0607
Compare
Beautiful. Rebased to keep only the relevant/distinct commits and merged. |
This is (finally!) the PR that will allow people to register profiles and have them showcased on the JSON:API website, with a url on jsonapi.org.
It includes:
On the existing extensions page, submitted profiles are listed, grouped by category, using categories listed in each profile's yaml front-matter. (The list of available categories is set in
_config.yml
.) The extensions page now also has a description of the registration process and a link to a Markdown template, which authors can fill out with their profile's specification and submit with their PR.There's a new
profile.html
layout file, which is used to show off the user-submitted profiles. The profile specs live in the_profiles
directory/collection. (Lots of HTML from thepage.html
was pulled out into files in the_includes
directory so that it could be reused as snippets in this newprofile.html
layout.)There's an example cursor-based pagination profile. (If people are interested in implementing this profile — @wimleers? — I'd love to get implementation/design feedback on it before shipping it. But this feedback isn't blocking 1.1.)