-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix version redirection. #94
Conversation
@@ -1,6 +1,13 @@ | |||
--- | |||
--- | |||
|
|||
<script type="text/javascript"> |
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.
Afraid of the consequence of this - means any documentation broken link will end up at documentation root. Might be confusing for users.
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.
Yeah, that could be a problem, I was trying to fix this situation: when you are looking at older version of a doc, then want to redirect to the same doc in current version only to find there is no such thing. I can remove this Javascript, and show 404 page in this situation, but I just thought this would be a "better" user experience. If you think it's confusing, I can remove it of course, or do you have other ideas to handle this?
Also I think: the user shouldn't manually input a broken url in browser, they should follow the links shown on the index page. And those links shouldn't be broken. Thus the user will never enter a broken link under "/documentation/", except version redirection.
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.
Can't we instead rely on some query param that would be put on the URL by the documentation redirect? This would much reduce the scope of this automatic redirect.
Something like http://ehcache.org/documentation/3.1/expiry.html?source=old
and you would redirect to the documentation root only if the query param is present.
Wdyt?
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.
@ljacomet I reduced the scope of redirection by adding ?redirect=true, for example, http://ehcache.org/documentation/3.1/expiry.html?redirect=true will redirect you to doc root, but without the param, it will show you 404.html
@boyusun Will get into testing this locally and let you know! |
This improves the automatic redirect and aside from the redirect in the 404 page looks good. Next thing in my mind is to improve the visual on this old / new documentation indicator. I would like to have a floating element in the bottom left of the screen that would have this information instead of a small entry at the top of the page. Of course, to be discussed and designed further ... |
This fixes #45 |
On the principle yes, but ideally I want a box with a bit of text saying something like:
where the last bit is a link. I am sure I saw that somewhere and found the visual cool ... but can't find it back ... |
@ljacomet I updated the version indicator, it's now in a box floating at bottom-left corner of the page, with some simple text. I tried my best to pick a background color for the floating box, do you think the current one is acceptable? I personally haven't encountered any similar design, so I couldn't figure out a better visual, but if you have some specific color/design in mind, please tell me. |
Can we merge this now? Or does it need further review? |
@ljacomet I made a temporary floating box, the UI style looks a bit off, but not completely unacceptable, could you have a look and tell me what do you think? If this UI looks bad, could you point me to an example (of an ideal floating box UI)? |
@boyusun Is this still valid? |
@henri-tremblay If it's not merged by now, I think it's irrelevant. We should reject/close this ticket. Thx. |
Ok. Let's close it then. |
@ljacomet This PR fixes the version redirection issue: when you are looking at version 3.0 docs, you can click on the current version link, and redirect to the 3.1 version of the same doc; If the doc doesn't exist in the new version, it will redirect to the documentation index page.
Please ping me if there is any question, I can do a demo if you want.