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

Framework: Remove react-tap-event-plugin #7724

Merged
merged 12 commits into from
Jan 16, 2017
Merged

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Aug 29, 2016

facebook/react#436 (comment) indicates that it's no longer needed.

Consequently, this PR also replaces all occurrences of onTouchTap (which is no longer available without the plugin) with onClick.

This is straight-forward in almost all cases except for the Site block which was already using both for apparently different purposes. Turns out that only one consumer -- reader/stream/post was using onClick, which was introduced by 6973c70. I've removed it and modified the consuming code correspondingly -- hopefully correctly. cc @blowery

To test: Check that tap works as expected on mobile Chrome and Safari with the following blocks and components (links go to corresponding devdocs pages on calypso.live where available). (Actually, we should probably also check that click still works as before in desktop browsers.)

cc @mtias because of affected generic components

@ockham ockham added Framework [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Aug 29, 2016
@ockham ockham self-assigned this Aug 29, 2016
@ockham ockham force-pushed the remove/react-tap-event-plugin branch from 80d2e63 to 16a0ea5 Compare October 7, 2016 13:16
@gwwar
Copy link
Contributor

gwwar commented Dec 2, 2016

Tested this on my iPad, looks like tap events work on both. Could you rebase + fixup the test? I can take another 👀

@ockham ockham force-pushed the remove/react-tap-event-plugin branch from 16a0ea5 to 1061b8e Compare December 3, 2016 01:20
@ockham
Copy link
Contributor Author

ockham commented Dec 3, 2016

17 more occurrences of onTouchTap. Some more work ahead here 😄

@ockham
Copy link
Contributor Author

ockham commented Dec 3, 2016

Okay, should be ready for another look. Has indeed grown a bit in size 😕

@ockham ockham force-pushed the remove/react-tap-event-plugin branch from ce548c5 to 3430827 Compare December 3, 2016 03:15
@gwwar
Copy link
Contributor

gwwar commented Dec 8, 2016

I can test next week when I get back from the Stark meetup. Maybe some other folks could help test in the meantime? cc @hoverduck

@hoverduck
Copy link
Contributor

I checked it out on Android Chrome and iOS Safari (iPad only) and didn't see any problems. I tried to hit all of the components listed in the original post, but the Reader wasn't loading any entries on https://calypso.live/?branch=remove/react-tap-event-plugin so I wasn't able to verify any of those.

I also ran the e2e test suite against this branch on desktop Chrome at mobile screen width and didn't see any issues.

@blowery
Copy link
Contributor

blowery commented Dec 8, 2016

Testing this out.

@blowery
Copy link
Contributor

blowery commented Dec 8, 2016

@hoverduck yeah, looks like the comment button is busted. Checking.

@blowery
Copy link
Contributor

blowery commented Dec 8, 2016

fixed busted reader in b593a98

@aduth
Copy link
Contributor

aduth commented Dec 12, 2016

From facebook/react#436 (comment):

Since Chrome and Safari have both removed their tap delays for mobile pages

Is this true by default, or does this apply only with touch-action: manipulation; styling?

This article seems to indicate that iOS is smart about how it determines when to apply fast tapping (based on whether page is scaled well for mobile viewports), which is pretty neat: https://webkit.org/blog/5610/more-responsive-tapping-on-ios/

@gwwar
Copy link
Contributor

gwwar commented Dec 12, 2016

Did some more tests and looks pretty good. Let's resolve conflicts and get a few more folks to 👀 for regressions.

@ockham ockham force-pushed the remove/react-tap-event-plugin branch from b593a98 to 561fc2d Compare December 13, 2016 02:10
@ockham ockham force-pushed the remove/react-tap-event-plugin branch 2 times, most recently from 2f20f82 to 74dd8d6 Compare January 11, 2017 21:56
@ockham
Copy link
Contributor Author

ockham commented Jan 11, 2017

Rebased, again. This has been cooking for too long, so I'm aiming for a merge tomorrow.

@blowery Reader seems to have diverged the most (b/c Reader Refresh), maybe you could give this a quick spin to see if nothing's broken?

@ockham ockham force-pushed the remove/react-tap-event-plugin branch from 74dd8d6 to 8953899 Compare January 16, 2017 20:45
@ockham ockham merged commit 1ca3a61 into master Jan 16, 2017
@ockham ockham deleted the remove/react-tap-event-plugin branch January 16, 2017 21:10
ockham added a commit that referenced this pull request Jan 16, 2017
This was specifically for touchTap events, which were removed by #7724. Keeping the timeout would cause a regression when transitioning from a single-tree layout here, as the transition unmounts `wpcom`, and the component is gone by the time the callback is invoked.
@samouri samouri removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 17, 2017
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.

7 participants