-
Notifications
You must be signed in to change notification settings - Fork 391
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
Representing specification versions #2877
Comments
Just to chip in that I find the ability to easily switch between releases this way essential. It also really helps with deep links to old versions of the spec as you can quickly see "hey you're on an old version!". Django even throws up a banner for old versions when they're obsolete (which might not make sense for the spec for a while, but is nice): The rest of this proposal pretty much sounds like what ReadTheDocs does for versioning: https://docs.readthedocs.io/en/stable/versions.html Pretty much the repo only knows about a single version, but the generated static assets have different versions by putting them at different paths. |
Thanks for looking @clokep !
There are a couple of different things here:
But maybe it's not necessary to show all versions, and it would be OK for the dropdown to show: (1) the unstable version (2) the latest release (3) and historical releases that existed at the time this version was made. That's what the docs do currently actually, compare 0.6.1: https://matrix.org/docs/spec/client_server/r0.6.1#other-versions-of-this-specification to 0.4.0: https://matrix.org/docs/spec/client_server/r0.4.0#other-versions-of-this-specification. |
Discussing this on a call with @wbamberg & @harrisondean and slightly concerned we'd end up with a strange interstitial UX where you'd land on spec.matrix.org and have to deliberately click/link through to view the latest spec. Exploring an alternative option by storyboarding wireframes where:
|
Most docs sites I've seen do a redirect from |
@clokep can you point us to some references to benchmark? Just want to double check a few implementation details. |
All of the above are built with Sphinx though so maybe it is just due to that. 😄 |
So we should amend the "Deployment" section above to be like:
...and as part of deploying a new major.minor release we update the |
I've been experimenting with ways to represent versions and changelogs. It's easier to show than tell, so:
Content differencesThe content differences between these two versions are: config settings
That is, if you have a setting other than changelog directoryBoth versions have a "changelog" directory.
So again: if you have a setting other than Rendered differencesFirst, the navbar at the top now includes the version, taken from the config settings. Second, unstable releases get a banner on each page pointing to the current release (athough the link doesn't actually go to https://upbeat-swirles-af35c7.netlify.app/ at the moment). Third, we get different changelogs of course:
Version X.Y.Z sectionsEach "version" section includes a table built from the release.yaml, with link to the Git tag and release date. We don't represent release date in the existing spec, but it seems useful enough to me. About Git tags: I wasn't sure why we don't currently refer to Git tags to point people at the commit for this release. Perhaps I'm missing something? Historical releasesBoth "unstable" and "1.1.2" include a section about "Historical releases" - that is, versions that preceded the global versioning system. When we start having not-current releases in the global versioning system (i.e. when "1.2" is released, so 1.1 becomes not current) we will also have a "Previous releases" section that will point to them. |
I ran this past Travis and had some feedback which I've copied below:
|
For the "releases dropdown". To be clear: this is a bit of UI that enables a user to switch between this version of the spec and some other version. I think it's easy to make a "releases dropdown" that includes links to:
What's trickier is making a version of the spec include links to old released versions made after this one. For example: suppose we have shipped versions 1.1, 1.2, 1.3, 1.4 of the spec, and are looking at the 1.2 version. It's easy for this dropdown to contain:
...but it's not so easy for it to contain 1.3, because 1.3 didn't exist at the time 1.2 shipped. If this is an important thing to support, one way to do it (h/t Travis) is to maintain a "releases.json" in the repo, and populate the releases dropdown dynamically using JS. I don't think this is a very important thing to support, and suggest we do the static/easy thing for now. Note that in the current spec we omit links to obsolete versions which are newer than the current one. For example, https://matrix.org/docs/spec/client_server/r0.2.0#other-versions-of-this-specification doesn't link to any released versions after 0.2.0. |
Is this fixed? I'm not really sure what it's asking for. |
I think this is fixed for the time being. There's an action of how we want to show older versions of the spec in the platform, but we have a somewhat natural way of conveying that for the moment - if we end up needing a dropdown, we can add one with a new issue. |
(This is part of #2822)
We need to have a way to represent different versions of the Matrix spec in Hugo-land. This issue is to discuss how we will do that. This whole discussion presupposes that we're moving to a global version number as proposed in #2844.
At any time there are three "statuses" for different versions of the spec.
It's important to represent these, because we want to be able to tell readers "this is an old version of the spec, you probably want the latest one" or "this is the unstable version of the spec, you might want the latest released one".
Given that according to global versioning proposal, "Implementations do not need to worry about the patch version." it feels like it makes sense to manage these statuses at the level of major.minor versioning only - so for instance the current version is "1.1" and stays "1.1" through all the patch versions of 1.1, until 1.2 is released. We should still represent patch versions of course, but maybe just in the changelog and the version name.
So that would mean:
Overview of this proposal
The specification lives inside a static site generator (specifically, Hugo) in a Git repo.
This proposal uses Git branches to represent different versions of the specification. Each branch (and therefore each release) is a separate deployment of the site and is really a self-contained world. The "unstable" version is built from the
main
branch.Repository organization
In Hugo, by default, the
/content/$language
directory is used to contain the pages that will be built. In this repo our/content
directory is like:In Hugo, site-wide settings live in a
config.toml
file. Ourconfig.toml
will contain:We will use this to show the appropriate banners for unstable and historical pages, and to link to “latest”.
Our config.toml will also probably want to contain settings saying which version it is, including patch version.
Deployed
The deployed specification could look like this:
spec.matrix.org
is a hardcoded homepage (not in Hugo/matrix-doc), and links to spec documents using URLs likespec.matrix.org/latest/client-server
. These links redirect to the actual latest version.Under
spec.matrix.org
, we deploy the main branch and all release branches of matrix-doc, independently.Changelogs
In the repo, have a
/changelogs
directory. In the main branch, this could contain anewsfragments
directory containing new changes since the last release:In release branches this could contain at least one changelog named something like “release.md”, which is the changelog for the first version of this release. It may also contain one or more additional one or more built changelogs, which are named after the patch version that contains this set of changes:
The behaviour of the SSG is then:
Making a release
To make a new major/minor release:
To make a patch release:
"Releases" dropdown
It would be nice to have a dropdown on each page listing all releases of the spec. That's tricky in this model because historical releases don't know about subsequent releases. One suggestion Travis made is: we could populate the dropdown dynamically, reading a releases.json file that's maintained in the repo.
The text was updated successfully, but these errors were encountered: