Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Redirect to article page rather than home after clicking "# or # to add comments on this article" #690

Open
1 of 3 tasks
cirosantilli opened this issue Jun 27, 2021 · 2 comments

Comments

@cirosantilli
Copy link
Contributor

🚀 feature request

Relevant scope

What is the scope of this request?

  • Frontend specs
  • Backend specs
  • Other... Please describe:

Description

A clear and concise description of the problem or missing capability...

Visit an article signed out. It shows "# or # to add comments on this article.". Click # and #. It redirects you to home / instead of the article. Tested on https://demo.realworld.io and https://react-redux.realworld.io/

Describe the solution you'd like

If you have a solution in mind, please describe it.

Redirect to the article you were in, not home.

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?
@plusgut
Copy link

plusgut commented Jul 5, 2021

That's great that you mention that.

How about in the future spec the login and register are not any distinct routes anymore, but buttons which opens modals?
To have modals in the spec, to show of how portaling works is I think a good idea anyway.

Why I dislike having auth as routes:

  • these routes are only valid depending on your current auth-state
  • these are not really sharable url's
  • they pollute the browser history, the back-button will lead you to a page which isn't valid/relevant anymore

Why I think modals for login/register are superior:

  • the user stays on the same page, no weird remembering where the user came from is necessary
  • browser-history only has valid and relevant pages in it
  • showing of how to implement portals in any given tech

@cirosantilli
Copy link
Contributor Author

Yes, that would not be a bad option I think. Notably for me my general concern is to make the logged out website viewable without JavaScript, so no problem with the login URL being a JS-only button. I guess someone would just need to sit down and make a reference POC if there's strong support for it.

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

No branches or pull requests

2 participants