-
Notifications
You must be signed in to change notification settings - Fork 22
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
Version drop down #91
Comments
I remember we had a versioning switcher in our early versions of cosmos docs. I'm not sure why that was removed. cc: @fadeev @nassdonald |
We were not using it, and it wasn't designed, just added in an ad-hoc fashion. |
We'd always planned to add it back in, since the architecture of the docs was designed to handle version-switching. It just wasn't a huge priority. If we were to have a version switcher, do we want to limit the number of versions at all or just show them all? |
## Description Version docs, unfortunately because there is no dropdown in the theme the way one could go see docs related to v0.32 is through `/master` I am not the biggest fan of this approach but unfortunately it all we have until cosmos/vuepress-theme-cosmos#91 is completed Closes: #XXX
I'd love to see this issue prioritized so we can make use of it in the cosmos SDK as well. We'll definitely be making use of versioning the docs for Cosmos SDK for Stargate, but would be ideal to have this accessible via the UI and be able to set the default to a stable release other than master (which is often pre-release). |
The official vuepress does not support versioning (vuejs/vuepress#1018)
Related:Different implementation:
Next step: |
Usage
|
No… that doesn't look right. @lovincyrus could this be a cross-browser issue?
|
I added a select option disabled Version there instead of showing the version number because of how our versioning deployments were set up. The docs theme is unable to utilize vue router to route to different versions due to the version path prefixes (/master, /v0.34) that are being generated with Makefile. Otherwise, it will go https://docs.cosmos.network/master → https://docs.cosmos.network/master/master In order to make this work, we need to change the version using window.location with each version selection. https://github.com/cosmos/vuepress-theme-cosmos/blob/develop/global-components/TmSelectVersion.vue#L23 That's why we can't show the version text. We're basically refreshing the URL/window history. |
Most likely. Update:
|
Okay in that case, if there's no clean workaround to show the version number, let's just change it to "Version" singular. I think that makes more sense, since it's a version selector. |
Not sure it's possible but is there a way to make it persistent? Right now if you go from master to any version you lose the capability to go back to a different version. edit: i see you mention this above |
If you go from We can fix this by adding this to the other versioned docs.
|
Could this also be solved by an optional persistent header? the header is out of scope of the docs, the docs can change but the header stays on all the pages. Not sure how vuepress works and if this is possible? |
This isn't solved. Having only updated versions display the dropdown makes it unusable. I would propose an entire different direction. Instead of building each version separatly we build them together. We create a script to create folders of versions. This would mean we dont switch branches to build docs but only clone the docs into a specific folder, called versions. Then vuepress builds these docs as a single page. This way the dropdown will persist across versions. root:
|
With the setup of gathering versioned docs in a single branch:
It seems like cosmos/gaia#541 (comment) will solve the persistent issue. 🙏 |
This won't solve the issue at hand. When you change to a version that doesn't have the dropdown version of the theme it disappears prohibiting you from changing versions any further. |
Quick update: Apparently, the version switcher worked this whole time. But we won't be able to see it with the deployments that use for the docs (AWS CloudFront, Netlify, GitHub Pages). All of them would add a trailing slash at the end of the URLs. I just deployed the content from this branch https://github.com/CosmWasm/docs/tree/gh-pages to Vercel. Live site: https://docs.cosmwasm.com e.g. AWS CloudFront, Netlify, GitHub Pages deployments would automatically add a trailing slash at the end of the URL. Vercel doesn’t. Will push a fix asap. #186 |
The version you changed to must have an updated |
This is bad UX IMO. what is the problem with:
This way you avoid needing to update old versions. Would love to have a call to discuss this. |
I have a demo of what I was thinking here: tendermint/tendermint#5932. The only change needed from the theme would be to display what's in the sidebar based off of what version is chosen. Now they all show up, but the version picker displays the correct version when I go to 0.33 or 0.34 |
had a call with cyrus. We agreed the current approach is the best workaround |
Provide a dropdown somewhere on the page for different versions. This dropdown can read from docs/versions
The text was updated successfully, but these errors were encountered: