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

Improve the behaviour of clicking "view in new version" button when new version doesn't have the same guide path #17

Open
2 tasks
mansona opened this issue Mar 28, 2019 · 1 comment

Comments

@mansona
Copy link
Member

mansona commented Mar 28, 2019

When viewing an old guide you always see a link to "view the current guide in latest version" at the top of the page:

Screenshot 2019-03-28 at 08 35 17

If you click the link in a guide that has been deleted in the latest verison (i.e. the path is not valid any more) then you will see a 404 page error:

Screenshot 2019-03-28 at 08 37 45

Interestingly, because this is not a 404 path and just the error template clicking back in the browser does not get you out of this situation 🙈 you need to instead refresh.

Steps to recreate

Todo

  • make this experience "better" for people
    • There is a full discussion of this problem in an issue on guides-source
    • this issue probably reuquires some experimentation and discussion with the @ember-learn/learning-core-team
  • improve the experience of using the back button when this situation happens
    • this could be a guidemaker concern so might need to be done "upstream"
    • ember used to have the concept of eager transitions but it seems to have been removed in 1.12 🙈 (makes me feel old). Fixing this will require research and discussion
    • If this is too hard for now we can pull it out into a separate issue so it doesn't block the work 👍
@anotheredward
Copy link
Contributor

anotheredward commented Mar 28, 2019

My intended fix was to make this functionality consistent with the version picker from the previous guides app.
I implemented logic to avoid resetting the path when switching versions here:
https://github.com/ember-learn/guides-app/blob/master/app/controllers/version.js#L21

I'm not sure how this is handled in the new project, but it does appear to function similarly.

A discussion of that functionality can be found here:
ember-learn/guides-app#200

One consideration was making this redirect more global, so that any attempt to navigate to an invalid path (like the one that the button generates) would do a best-effort redirect, but I'm not sure about all of the consequences of that change.

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

No branches or pull requests

2 participants