[TS] Add onTouchMoveCapture and onTouchStartCapture for web touch#1089
Merged
erictraut merged 3 commits intomicrosoft:masterfrom May 24, 2019
Merged
Conversation
797c3b2 to
fe49cb1
Compare
Contributor
Author
|
rebased on master |
berickson1
reviewed
May 22, 2019
| onMouseMove: this.props.onMouseMove, | ||
| // Weird things happen: ReactXP.Types.Touch is not assignable to React.Touch | ||
| onTouchStart: this.props.onResponderStart as React.HTMLAttributes<any>['onTouchStart'], | ||
| onTouchStartCapture: this.props.onTouchStartCapture as React.HTMLAttributes<any>['onTouchStartCapture'], |
Collaborator
There was a problem hiding this comment.
What happens on native platforms?
Contributor
Author
There was a problem hiding this comment.
This code acts only for web. I am not sure to understand.
Collaborator
There was a problem hiding this comment.
If you're exposing a common prop, a RN implementation should also be provided. If not possible, it should be documented to noop and have good justification why it's needed
Contributor
Author
There was a problem hiding this comment.
Ok, I will add some context and test first.
Contributor
Author
|
I added some context in the PR description, doc and test for the QA. The implementation on the RN part is not necessary as the props are passed down directly to the QA
|
Collaborator
|
Validated on Android physical device and iOS emulator using new RXP test |
berickson1
approved these changes
May 24, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Following PR #1082 and #1079 effort for bringing iso functionality on web touch and native touch platforms.
This PR does the following:
This PR focus on the the touch event capture phase which is not exposed for the web platform.
To keep the API surface lean, as the previous PR, the compatible RN props will be used.
This PR does not expose all the capture phase handlers. The rest may be part of a later PR.
WiewTouchTestQA
Do the last
WiewTouchTesttest on browser desktop in mobile device simulation or in real device browser (withnpm run web -- --host xxx.xxx.xxx.xxx) .View captured touch inshould turn greenView captured touch moveshould turn greenDo the last
WiewTouchTesttest in React Native test appView captured touch inshould turn greenView captured touch moveshould turn green