Skip to content

Conversation

@twstokes
Copy link
Contributor

@twstokes twstokes commented Apr 26, 2022

This PR:

  • Removes the mode selector from the nav bar on the Site Design screen
  • Enforces mobile-sized thumbnails for all devices
Before - iPhone After - iPhone
Simulator Screen Shot - iPhone 13 - 2022-04-27 at 17 49 49 image
Before - iPad After - iPad
Simulator Screen Shot - iPad (9th generation) - 2022-04-27 at 16 02 07 image

To test:

Mobile thumbnails - Phone

  1. Using a phone, start the Site Creation Flow and navigate to the Site Design screen
  2. Expect thumbnails to be screenshots of the mobile layout
  3. Select a design and tap the "Preview" button
  4. Expect preview to be in the mobile layout
  5. Tap the device mode picker at the top right and confirm that the mode is set to Mobile
  6. Tap Tablet to switch to the tablet mode
  7. Expect preview to be in the tablet layout
  8. Dismiss the preview
  9. Expect thumbnails to be screenshots of the mobile layout (they did not switch to tablet layout)
  10. Select a design and tap the "Preview" button
  11. Expect preview to be in the tablet layout (the Preview view retained the last layout mode)

Mobile thumbnails - iPad

  1. Using an iPad, start the Site Creation Flow and navigate to the Site Design screen
  2. Expect thumbnails to be screenshots of the mobile layout (not tablet)
  3. Select a design and tap the "Preview" button
  4. Expect preview to be in the tablet layout
  5. Tap the device mode picker at the top right and confirm that the mode is set to Tablet
  6. Tap Mobile to switch to the mobile mode
  7. Expect preview to be in the mobile layout
  8. Dismiss the preview
  9. Expect thumbnails to be screenshots of the mobile layout (they did not switch to tablet layout)
  10. Select a design and tap the "Preview" button
  11. Expect preview to be in the mobile layout (the Preview view retained the last layout mode)

Tracks events - Phone

  1. Using a phone, start the Site Creation Flow and navigate to the Site Design screen
  2. Expect enhanced_site_creation_site_design_viewed to be fired with preview_mode set to mobile
  3. Select a design and tap the "Preview" button
  4. Expect enhanced_site_creation_site_design_preview_viewed to be fired with preview_mode set to mobile and template set to the corresponding design
  5. Expect enhanced_site_creation_site_design_preview_loading to be fired with preview_mode set to mobile and template set to the corresponding design
  6. Expect enhanced_site_creation_site_design_preview_loaded to be fired with preview_mode set to mobile and template set to the corresponding design
  7. Tap the device mode picker at the top right and switch to Tablet
  8. Expect enhanced_site_creation_site_design_preview_mode_button_tapped to be fired with preview_mode set to mobile
  9. Expect enhanced_site_creation_site_design_preview_mode_changed to be fired with preview_mode set to tablet
  10. Expect enhanced_site_creation_site_design_preview_loading to be fired with preview_mode set to tablet and template set to the corresponding design
  11. Expect enhanced_site_creation_site_design_preview_loaded to be fired with preview_mode set to tablet and template set to the corresponding design
  12. Tap "Create Site" (the button may say "Choose" depending on Site Name treatment)
  13. Expect enhanced_site_creation_site_design_selected to be fired with template set to the corresponding design

Tracks events - iPad

  1. Using an iPad, start the Site Creation Flow and navigate to the Site Design screen
  2. Expect enhanced_site_creation_site_design_viewed to be fired with preview_mode set to mobile
  3. Select a design and tap the "Preview" button
  4. Expect enhanced_site_creation_site_design_preview_viewed to be fired with preview_mode set to mobile and template set to the corresponding design
  5. Expect enhanced_site_creation_site_design_preview_loading to be fired with preview_mode set to mobile and template set to the corresponding design
  6. Expect enhanced_site_creation_site_design_preview_loaded to be fired with preview_mode set to mobile and template set to the corresponding design
  7. Tap the device mode picker at the top right and switch to Mobile
  8. Expect enhanced_site_creation_site_design_preview_mode_button_tapped to be fired with preview_mode set to tablet
  9. Expect enhanced_site_creation_site_design_preview_mode_changed to be fired with preview_mode set to mobile
  10. Expect enhanced_site_creation_site_design_preview_loading to be fired with preview_mode set to mobile and template set to the corresponding design
  11. Expect enhanced_site_creation_site_design_preview_loaded to be fired with preview_mode set to mobile and template set to the corresponding design
  12. Tap "Create Site" (the button may say "Choose" depending on Site Name treatment)
  13. Expect enhanced_site_creation_site_design_selected to be fired with template set to the corresponding design

Regression Notes

  1. Potential unintended areas of impact

    • Site Design thumbnails
    • Tracks event sent related to the Site Design view
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • Manual steps above
  3. What automated tests I added (or what prevented me from doing so)

    • Added testSiteDesignPreviewDeviceIsAlwaysMobile

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 27, 2022

You can test the changes in Jetpack from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr18455-49e6b1b on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@twstokes twstokes force-pushed the task/site-design-remove-preview-mode-picker branch from 23f83ba to af51a87 Compare April 27, 2022 19:49
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 27, 2022

You can test the changes in WordPress from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr18455-49e6b1b on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@twstokes twstokes requested a review from a team April 27, 2022 21:43
@twstokes twstokes marked this pull request as ready for review April 27, 2022 21:43
@twstokes twstokes added this to the 19.9 milestone Apr 28, 2022
Copy link
Contributor

@mkevins mkevins left a comment

Choose a reason for hiding this comment

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

The code changes look good, and this works as expected (tested on iPhone 11, and iPad Pro (12.9-inch) simulator). I had a question about the added test, but it isn't a blocker.

One subtle thing I noticed, that could be different from the Android implementation, is that the selected preview mode in the preview screen gets reset every time it is re-opened (on Android, this is "remembered" when back is pressed, since the underlying state is persisted in the thumbnail screen). I think either behavior is fine, fwiw, and I'm just noting this for completeness.

@twstokes
Copy link
Contributor Author

The code changes look good, and this works as expected (tested on iPhone 11, and iPad Pro (12.9-inch) simulator). I had a question about the added test, but it isn't a blocker.

One subtle thing I noticed, that could be different from the Android implementation, is that the selected preview mode in the preview screen gets reset every time it is re-opened (on Android, this is "remembered" when back is pressed, since the underlying state is persisted in the thumbnail screen). I think either behavior is fine, fwiw, and I'm just noting this for completeness.

Thanks @mkevins - that's a good observation and a pattern I hadn't considered. I imagine users will want to stick to the preview mode as they try out different designs, so I'm going to update this PR to match that functionality.

@ovitrif
Copy link
Contributor

ovitrif commented Apr 28, 2022

Just a remark that I can review the additional updates when they are pushed 🙇

@twstokes
Copy link
Contributor Author

twstokes commented Apr 28, 2022

Just a remark that I can review the additional updates when they are pushed 🙇

Thank you @ovitrif! This is ready for review again.

The changes include:

  • The Preview view will retain the last mode it was in.
  • I removed the testSiteDesignPreviewPreviewDeviceCanBeChanged test as I didn't find as much value in it as originally thought.
  • I added steps 10 and 11 to the Thumbnails tests.

@twstokes twstokes requested review from mkevins and ovitrif April 28, 2022 14:41
Copy link
Contributor

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

Great work @twstokes ! 🎉

Works as expected in tests. Let's :shipit:

@ovitrif
Copy link
Contributor

ovitrif commented Apr 29, 2022

A few CI checks failed, seems nothing caused by the changes, thus I retriggered them 🤞

…-screen-ui

[Site Design Revamp] Update title text and remove subtext
@twstokes
Copy link
Contributor Author

A few CI checks failed, seems nothing caused by the changes, thus I retriggered them 🤞

Thanks @ovitrif for the review and for retriggering the tests! Looks like they're all good now. ✅

@twstokes twstokes merged commit 2830846 into feature/site-design-revamp Apr 29, 2022
@twstokes twstokes deleted the task/site-design-remove-preview-mode-picker branch April 29, 2022 13:27
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.

5 participants