Skip to content

Issue/10189 Clears old data from previous visits to wizard steps#10198

Merged
malinajirka merged 8 commits intowordpress-mobile:developfrom
cameronvoell:issue/10189-wizard-backwards-clears-site-creation-state
Jul 16, 2019
Merged

Issue/10189 Clears old data from previous visits to wizard steps#10198
malinajirka merged 8 commits intowordpress-mobile:developfrom
cameronvoell:issue/10189-wizard-backwards-clears-site-creation-state

Conversation

@cameronvoell
Copy link
Copy Markdown
Contributor

Fixes #10189

To test:

Steps to reproduce the behavior

  1. My Site
  2. Switch Site
  3. Click on plus sign icon in the top right corner
  4. Select "Create WordPress.com site"
  5. Choose a site type
  6. Enter some custom vertical type, click next
  7. Enter site title and tagline, click next
  8. On the choose a domain screen, hit the back arrow
  9. On the title/tagline screen, hit the back arrow
  10. On the vertical screen, hit the back arrow
  11. Choose a site type
  12. Press skip for site vertical
  13. Press skip for title/tagline
  14. Search a domain, select, and press create (before you search you can verify you do not see the previously entered title)
  15. Verify that the previously entered verticalId, title, and tagline are gone because you skipped on your second pass through the wizard.

*Note if you can not create sites in test build like me, you may need to verify through the debugger (and through the lack of old title searches appearing like they were before the fix)

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

@cameronvoell
Copy link
Copy Markdown
Contributor Author

Just want to mention, I cleared segmentId on the segment step and domain on the domain step even though it is currently impossible to reproduce the issue on those steps. I coded defensively here in case restrictions on requiring those fields are lifted in the future. Let me know if that was overzealous and it is preferred that we only clear title, tagline, and verticalId for now.

@cameronvoell
Copy link
Copy Markdown
Contributor Author

looking at failed tests now

…o that we do not go straight back to segment step and clear our state
…e is not null, in order to limit unnecessary updates to the state and to simplify testing while retaining default data class equality
@cameronvoell
Copy link
Copy Markdown
Contributor Author

Ready for review (can't change labels :-P, but I can comment!)

@shiki shiki requested a review from malinajirka July 12, 2019 20:58
@shiki shiki added this to the 12.9 milestone Jul 12, 2019
@shiki
Copy link
Copy Markdown
Contributor

shiki commented Jul 12, 2019

Thank you, @cameronvoell!

@malinajirka it looks like you are the most knowledgeable on Site Creation. Would you be able to review this? 🙂

@malinajirka
Copy link
Copy Markdown
Contributor

Thanks @cameronvoell ! It looks and works great - good job. I've left two nitpicking comments!

@loremattei loremattei modified the milestones: 12.9 ❄️, 13.0 Jul 15, 2019
@cameronvoell
Copy link
Copy Markdown
Contributor Author

cameronvoell commented Jul 15, 2019

Did a git rebase for the better commit ordering, but forgot it would make the PR so hard to read. Force pushed to fix it :-P

@cameronvoell cameronvoell force-pushed the issue/10189-wizard-backwards-clears-site-creation-state branch from 28b3d39 to 1c8d8e7 Compare July 15, 2019 17:49
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢 ! Thank you ;)

@malinajirka malinajirka merged commit abb29e7 into wordpress-mobile:develop Jul 16, 2019
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.

siteCreationState data payloud out of synch with UI when moving backwards then skipping forwards through site creation wizard

4 participants