Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Fix version redirection. #94

wants to merge 3 commits into from

Conversation

boyusun
Copy link

@boyusun boyusun commented Sep 30, 2016

@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.

@@ -1,6 +1,13 @@
---
---

<script type="text/javascript">
Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

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?

Copy link
Author

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

@ljacomet
Copy link
Member

ljacomet commented Oct 5, 2016

@boyusun Will get into testing this locally and let you know!

@ljacomet
Copy link
Member

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 ...

@boyusun boyusun changed the title Fix version redirection. This closes #45 Fix version redirection. Nov 15, 2016
@boyusun
Copy link
Author

boyusun commented Nov 15, 2016

This fixes #45

@boyusun
Copy link
Author

boyusun commented Nov 15, 2016

@ljacomet About the visual of the indicator, do you mean something like this ?

@ljacomet
Copy link
Member

On the principle yes, but ideally I want a box with a bit of text saying something like:

You are browsing (future|older) documentation.
Go to version X.Y.Z (latest).

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 ...

@boyusun
Copy link
Author

boyusun commented Nov 17, 2016

@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.

@fossf
Copy link
Contributor

fossf commented Feb 3, 2017

Can we merge this now? Or does it need further review?

@boyusun
Copy link
Author

boyusun commented Feb 6, 2017

@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)?

@henri-tremblay
Copy link
Contributor

@boyusun Is this still valid?

@boyusun-SAG
Copy link
Contributor

@henri-tremblay If it's not merged by now, I think it's irrelevant. We should reject/close this ticket. Thx.

@henri-tremblay
Copy link
Contributor

Ok. Let's close it then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants