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

[UIExplorer] PanResponderExample fix for responding to events #3315

Closed

Conversation

atticoos
Copy link
Contributor

@atticoos atticoos commented Oct 9, 2015

Fixes #3312.

The example was no longer reacting to touch/drag events.

It looks like setNativeProps requires the style property to contain the style rules. It appears that this warning is only in development mode, but after fixing it I am seeing the gestures recognized and properly handled. Running outside of the dev environment yielded the circle to be positioned at the top left of the screen, below the navigation bar, and inaccessible.

Error

### After changes

after

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 9, 2015
});
},

_unHighlight: function() {
this.circle && this.circle.setNativeProps({
backgroundColor: processColor(CIRCLE_COLOR)
style:{
Copy link
Contributor

Choose a reason for hiding this comment

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

space after the colon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ty, I had tried to run the linter (npm run lint) but there were like 100 failures in other files. Is this a legacy method of linting and perhaps a better way to do it? I wasn't sure how to go about the suggested method in CONTRIBUTING.md, as I couldnt find linter.js in the project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reference, after running npm run lint

screen shot 2015-10-09 at 7 05 54 pm

@atticoos atticoos force-pushed the bugfix/pan-responder-example branch from a57bace to b40027a Compare October 9, 2015 23:04
@atticoos
Copy link
Contributor Author

atticoos commented Oct 9, 2015

Lint feedback addressed via #3315 (diff), amended in ef42abb

@atticoos atticoos force-pushed the bugfix/pan-responder-example branch from b40027a to ef42abb Compare October 9, 2015 23:11
@ide
Copy link
Contributor

ide commented Oct 9, 2015

Thanks! We should clean up the lint errors too... will open an issue about that.

@atticoos
Copy link
Contributor Author

atticoos commented Oct 9, 2015

Cool. I thought perhaps I was running some legacy lint rules 😋

@vjeux
Copy link
Contributor

vjeux commented Oct 9, 2015

@facebook-github-bot shipit

@atticoos
Copy link
Contributor Author

atticoos commented Oct 9, 2015

☝️ that is sick.

@vjeux
Copy link
Contributor

vjeux commented Oct 9, 2015

cc @sebmarkbage, your explicit warning is working :)

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1669155743306331/int_phab to review.

@ghost ghost closed this in 7abf8ba Oct 10, 2015
@atticoos atticoos deleted the bugfix/pan-responder-example branch October 10, 2015 01:28
@atticoos atticoos restored the bugfix/pan-responder-example branch October 10, 2015 01:28
MattFoley pushed a commit to skillz/react-native that referenced this pull request Nov 9, 2015
Summary: Fixes facebook#3312.

The example was no longer reacting to touch/drag events.

It looks like `setNativeProps` requires the `style` property to contain the style rules. It appears that this warning is [only in development mode](https://github.com/facebook/react-native/blob/381e2acd184fc4ba80a240ba3d7dda0464c6416b/Libraries/ReactIOS/NativeMethodsMixin.js#L115-L117), but after fixing it I am seeing the gestures recognized and properly handled. Running outside of the dev environment yielded the circle to be positioned at the top left of the screen, below the navigation bar, and inaccessible.

<img src="https://cloud.githubusercontent.com/assets/656630/10407224/1449b1b2-6eb6-11e5-8116-20d08f7721ec.png" width="350" />

![after](http://g.recordit.co/UIbeHcKZUg.gif)
Closes facebook#3315

Reviewed By: @​svcscm

Differential Revision: D2529010

Pulled By: @vjeux

fb-gh-sync-id: 6b79573f42a2520197f77dcb76cd640ea614477f
Crash-- pushed a commit to Crash--/react-native that referenced this pull request Dec 24, 2015
Summary: Fixes facebook#3312.

The example was no longer reacting to touch/drag events.

It looks like `setNativeProps` requires the `style` property to contain the style rules. It appears that this warning is [only in development mode](https://github.com/facebook/react-native/blob/381e2acd184fc4ba80a240ba3d7dda0464c6416b/Libraries/ReactIOS/NativeMethodsMixin.js#L115-L117), but after fixing it I am seeing the gestures recognized and properly handled. Running outside of the dev environment yielded the circle to be positioned at the top left of the screen, below the navigation bar, and inaccessible.

<img src="https://cloud.githubusercontent.com/assets/656630/10407224/1449b1b2-6eb6-11e5-8116-20d08f7721ec.png" width="350" />

![after](http://g.recordit.co/UIbeHcKZUg.gif)
Closes facebook#3315

Reviewed By: @​svcscm

Differential Revision: D2529010

Pulled By: @vjeux

fb-gh-sync-id: 6b79573f42a2520197f77dcb76cd640ea614477f
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UIExplorer] PanResponder example does not respond to touches
4 participants