-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Quick hacky version dropdown #1131
Conversation
I emulated the
|
Will leave this parked for now, but can come back to it if there's interest. |
I'm interested. Can you give it a newsfragment so that the CI runs and we can see what it looks like? |
Part of the trouble is that Netlify only builds one version of the spec, rather than all the versions ( |
Here's a demo I recorded locally. Unfortunately OBS studio wasn't capturing the dropdown menu that pops up, but it's hopefully convincing enough. demo.mp4 |
that video looks good enough imo, and the code is good enough too. What are the concerns keeping this in draft? |
Nothing as such, other than it being a big hack. It could use some hands-on testing from others too. I'm not sure how the spec gets deployed (i.e. is this feasible? It's not just a case of "merge and it's done"). This would need a new version of v1.1 and v1.2 (and now v1.3) to be built which includes the selector. |
We can try to build v1.1, v1.2, and v1.3 again though if it ends up not working out then ohwell.jpg - we already don't have links for r0.5.0 (for example). |
Correct me if I'm wrong, but does this mean that old spec versions will not include newer spec versions on the dropdown, unless we rebuild all previous spec versions on each release? That doesn't sound entirely tenable. Can we populate the list of of versions from a separate |
That's correct. FWIW I think that's what Python's docs seem to do, at least when I had a quick look at it last. |
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.
ok, I don't think rebuilding all past versions of the spec on each release is something we particularly want to do.
Can you make the javascript populate the dropdown from a json file at /versions.json
or something?
Very rough prototype. Corners cut everywhere. Bad javascript habits. I learned babby's first web development back when the
<font>
tag was cool.Closes #951. (Sort of. We'd need to regenerate /v1.1 and /v1.2 to include the switcher.
select
element in the navbar.noscript
fallback without the selector./v1.1/
or/latest/
.r0.x.y
versions.Somewhat cribbed from what
docs.python.org
does, but written from scratch. (And much less robust.) The machinery for that lives here, but I haven't dug too hard into their setup.Preview: https://pr1131--matrix-spec-previews.netlify.app