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

✨ Custom redirects for members after signup #12366

Closed
8 tasks done
allouis opened this issue Nov 16, 2020 · 3 comments
Closed
8 tasks done

✨ Custom redirects for members after signup #12366

allouis opened this issue Nov 16, 2020 · 3 comments
Assignees

Comments

@allouis
Copy link
Contributor

allouis commented Nov 16, 2020

Site owners want to be able to show a custom message after a member has subscribed on their site.

Currently the only way to do this is by modifying the theme to redirect or show content based on the query parameters present after a magic link has been clicked. Our theme Lyra has an example of this here.

Site owners that are less technical want to be able to customise this experience without having to modify the theme.

MVP Solution

  • A new setting for storing paid subscription redirect path (default to "/")
  • A new setting for storing free subscription redirect path (default to "/")
  • After successful sign up or subscribe, redirect to the appropriate path based on the members subscription status

Improvements

  • Support for external redirect URLs, rather than just paths
  • Minimize flickered when redirecting externally

Tasks

@allouis allouis self-assigned this Nov 16, 2020
@Maxszik

This comment has been minimized.

@allouis

This comment has been minimized.

allouis added a commit to allouis/Ghost that referenced this issue Nov 17, 2020
refs TryGhost#12366

Two new settings for redirecting members after signup, based on if
they're paid or free, defaulting to the current redirect of "/"
allouis added a commit that referenced this issue Nov 17, 2020
refs #12366

Adds two new settings for redirecting members after signup, based on if
they're paid or free, defaulting to the current redirect of "/"
allouis added a commit that referenced this issue Nov 19, 2020
refs #12366 

This implements redirection based on the settings for successful member sign up!
- Removes support for redirecting to `req.path` afterwards, this was never used and
  we now have a more configurable implementation.
- Retains redirection to the homepage for unsuccessful sign up (invalid/expired token)
allouis added a commit to TryGhost/Admin that referenced this issue Nov 19, 2020
refs TryGhost/Ghost#12366

- added form fields for redirects
- updated CSS to handle scrolling

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
allouis added a commit that referenced this issue Nov 19, 2020
refs #12366

This means that custom redirects will not trigger the built in notifications handled by Portal.
allouis added a commit to TryGhost/Admin that referenced this issue Nov 20, 2020
refs TryGhost/Ghost#12366

* Displays URL as absolute, but still stores the path relative to the site 
* Allows pasting absolute URL's or relative
* Does not support external URL's
* Removed redundant "Links" section in Portal settings sidebar

Co-authored-by: Peter Zimon <zimo@ghost.org>
allouis added a commit to TryGhost/Admin that referenced this issue Nov 23, 2020
refs TryGhost/Ghost#12366

Adds support for saving external URL's for custom redirects and improves error handling to validate on blur/before saving

Co-authored-by: Fabien O'Carroll <fabien@allou.is>
@allouis
Copy link
Contributor Author

allouis commented Nov 23, 2020

Done! 🎉

All relevant code has been linked to in the body of this issue

@allouis allouis closed this as completed Nov 23, 2020
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