-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Version switching user experience improvements #13921
Conversation
This is a rehash of #12689 - but this time the redirects to master or other versions seem to be working well. @safrooze can you take a look and let me know what you think? @ddavydenko this uses your regex's. Thank you! Please take a look at the implementation. |
d801e8e
to
57fddea
Compare
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.
LGTM otherwise!
@ChaiBapchya - IDK, maybe I can fix that. |
Yes, this sounds good. |
LGTM! |
* fix version switching for anchors and search * improved redirects * fix bug for dev previews; remove hardcoded protocol
* fix version switching for anchors and search * improved redirects * fix bug for dev previews; remove hardcoded protocol
* fix version switching for anchors and search * improved redirects * fix bug for dev previews; remove hardcoded protocol
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.