This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Version switching user experience improvements #13921
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes some usability problems with the version selector. You tend to lose your place when you use the search feature or when browsing the APIs looking for stuff. If you switch versions, you don't always end up where you were or get redirected to the home page.
EDIT: It also fixes a search bug for developers that try to use the search feature in their dev versions of the website.
Preview for Search
When you search for something on the website in an older version, don't find it, then switch to a newer version, you are redirected to the root of the website.
For example:
No 🌮 ! What if master has 🌮 ?
You lost your search! 😭 and still no 🌮 .
Now try to search for 🌮 on the preview:
No 🌮 .
Still no 🌮 but 🌤 you didn't get bounced to the home page.
Preview for Anchors
It seems to work now when the page is loaded anew. However, I noticed that using in-page anchors the page didn't provide a new
window.location.hash
to the function indocversion.js
that updates the version dropdown's links, so the when switching versions you don't load the last anchor you were on.ndarray.shape
.If you try this flow in production you see that it is kind of broken.
Comments
The redirects update and overview of intentions and test links are on the wiki: https://cwiki.apache.org/confluence/display/MXNET/Redirects+on+the+Website
The search feature on the website is buggy. Today it shows results in an old version that shouldn't be there. For example "allreduce" shouldn't appear <v1.2.1, but it does today. I'm not trying to fix Sphinx's search in this PR.