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

Don't save paths starting with /start, since they cannot be resumed #84

Merged
merged 1 commit into from
Feb 15, 2016

Conversation

scruffian
Copy link
Member

The signup flow can't be resumed in the desktop app, so we shouldn't save these routes in LAST_LOCATION.

The original idea was to exclude all routes when logged out. I couldn't find a way to determine if the user was logged in, and I noticed that the signup flow couldn't be resumed when the use was logged in either, so this fix seems better.

Fixes #82

Testing instructions - Logged out

  1. Run git checkout fix/82-dont-save-signup-routes and start your server
  2. Run git checkout add/signup-in-desktop from within /calypso
  3. Ensure you are logged out of the app
  4. Navigate part way though the signup flow
  5. Close the app
  6. Reopen the app and assert that you see the login page

Testing instructions - Logged in (in signup)

  1. Run git checkout fix/82-dont-save-signup-routes and start your server
  2. Run git checkout add/signup-in-desktop from within /calypso
  3. Ensure you are logged in to the app
  4. Navigate part way though the signup flow
  5. Close the app
  6. Reopen the app and assert that you are taken to the last page you had open (before the signup flow)

Testing instructions - Logged in (not in signup)

  1. Run git checkout fix/82-dont-save-signup-routes and start your server
  2. Run git checkout add/signup-in-desktop from within /calypso
  3. Ensure you are logged in to the app
  4. Navigate to a page in Calypso that isn't in the signup flow
  5. Close the app
  6. Reopen the app and assert that you are taken to the last page you had open

Reviews

  • Code
  • Product

@drewblaisdell
Copy link
Contributor

When testing, we need to check out the add/signup-in-desktop branch from within calypso/, right?

The code looks good to me, and it works as expected. I'll leave 'Product' unchecked for now.

@scruffian
Copy link
Member Author

When testing, we need to check out the add/signup-in-desktop branch from within calypso/, right?

I updated the test description.

@scruffian
Copy link
Member Author

@mjangda suggested in Automattic/wp-calypso#3221 that we should fix the problem and resume signup rather than just not save it...

@fabianapsimoes
Copy link

Reopen the app and assert that you are taken to the last page you had open (before the signup flow)

I'm actually taken to the Reader instead of the last page. I think that's fine, but wanted to point it out.

The other two cases work well. Product 👍

@scruffian scruffian force-pushed the fix/82-dont-save-signup-routes branch from a99c7e6 to 32cf75d Compare February 15, 2016 14:45
scruffian added a commit that referenced this pull request Feb 15, 2016
Don't save paths starting with /start, since they cannot be resumed
@scruffian scruffian merged commit 2457d69 into master Feb 15, 2016
@scruffian scruffian deleted the fix/82-dont-save-signup-routes branch February 15, 2016 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants