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

[Site Design Revamp] Reset the scroll position every time site designs are shown #18795

Merged

Conversation

twstokes
Copy link
Contributor

Fixes #18794

Before After
Simulator.Screen.Recording.-.iPhone.13.-.2022-05-31.at.16.40.19.mp4
Simulator.Screen.Recording.-.iPhone.13.-.2022-05-31.at.16.39.15.mp4

Testing:

  1. Start the Site Creation flow
  2. Navigate to the Site Design picker screen
  3. Scroll down vertically
  4. Scroll horizontally to the end in any category with multiple designs
  5. Tap "Topic" at the top left to navigate back to the Site Intent screen
  6. Select a vertical or tap "Skip"
  7. Expect the Site Design picker screen to be scrolled to the top
  8. Expect all categories with multiple designs to be horizontally scrolled to their start

Regression Notes

  1. Potential unintended areas of impact
  • None
  1. What I did to test those areas of impact (or what existing automated tests I relied on)
  • Manually tested steps above
  1. What automated tests I added (or what prevented me from doing so)
  • None as these are visual changes

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.

@twstokes twstokes added this to the 20.1 milestone May 31, 2022
@twstokes twstokes requested a review from a team May 31, 2022 20:51
@twstokes twstokes self-assigned this May 31, 2022
@peril-wordpress-mobile
Copy link

Fails
🚫 Podfile: reference to a commit hash

Generated by 🚫 dangerJS

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 31, 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 pr18795-3f6ee94 on your iPhone

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

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 31, 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 pr18795-3f6ee94 on your iPhone

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

Copy link

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Thank you for your work on this @twstokes 🙇
The code change seems reasonable too me but testing the CI build on an iPhone SE 2020 (iOS 14.7.1) I was still able to reproduce the issue. Scrolling back and forth didn't get me at the start of the screen 🤔
I'm attaching a video.

18795.mov

@twstokes
Copy link
Contributor Author

twstokes commented Jun 1, 2022

Thank you for your work on this @twstokes 🙇 The code change seems reasonable too me but testing the CI build on an iPhone SE 2020 (iOS 14.7.1) I was still able to reproduce the issue. Scrolling back and forth didn't get me at the start of the screen 🤔 I'm attaching a video.

18795.mov

Thank you @antonis for spotting this! I'll look into it.

@twstokes twstokes force-pushed the task/site-design-revamp-reset-table branch from 339b8b3 to 3f6ee94 Compare June 1, 2022 17:02
@twstokes twstokes requested a review from antonis June 1, 2022 17:04
@twstokes
Copy link
Contributor Author

twstokes commented Jun 1, 2022

Thank you @antonis for spotting this! I'll look into it.

@antonis would you mind giving this another review when convenient? I believe the superclass was doing some magic with contentSizeWillChange() so I changed the ordering of the calls. I have tested with an iPhone 13 running iOS 15.5 and an iPhone SE 2nd gen running iOS 14.5 and so far so good. Thank you!

@mkevins mkevins self-requested a review June 2, 2022 04:54
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.

Thank you @antonis for spotting this! I'll look into it.

@antonis would you mind giving this another review when convenient? I believe the superclass was doing some magic with contentSizeWillChange() so I changed the ordering of the calls. I have tested with an iPhone 13 running iOS 15.5 and an iPhone SE 2nd gen running iOS 14.5 and so far so good. Thank you!

I tested this on an iPhone 11 (physical device) and it is working well for me. The code changes also look good. I'm not sure what the older code was (I didn't see it before the force-push), but these changes work well now. Nice work Tanner 👍

Copy link

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Thank you for tackling this so quickly @twstokes 🙇

@antonis would you mind giving this another review when convenient?
I've retested on the same device that reproduced the issue and it works now. The code also LGTM 🎉

@antonis antonis merged commit 30d853a into feature/site-design-revamp Jun 2, 2022
@antonis antonis deleted the task/site-design-revamp-reset-table branch June 2, 2022 07:32
@twstokes
Copy link
Contributor Author

twstokes commented Jun 2, 2022

The code changes also look good. I'm not sure what the older code was (I didn't see it before the force-push), but these changes work well now. Nice work Tanner 👍

Thanks! Lines 16 and 17 were swapped.

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.

4 participants