Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented May 8, 2019

This PR adds some Press responder event properties that are missing in relation to:

  • clientX
  • clientY
  • screenX
  • screenY
  • pageX
  • pageY
  • timeStamp

We attempt to get these from the nativeEvent object, except in the case of delayed events, where we calculate the values based on nativeEvent's timeStamp value.

This PR depends on #15587.

@necolas
Copy link
Contributor

necolas commented May 8, 2019

Do you mind if we split this PR into separate PR's? The two changes aren't really related.

@trueadm trueadm changed the title Experimental Event API: Press event properties and code size fixes Experimental Event API: Press event properties May 8, 2019
@sizebot
Copy link

sizebot commented May 8, 2019

Details of bundled changes.

Comparing: 51e66cf...78fce1a

react-events

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-events.development.js 0.0% -0.2% 1.16 KB 1.16 KB 617 B 616 B UMD_DEV
react-events.development.js 0.0% -0.2% 996 B 996 B 555 B 554 B NODE_DEV
react-events-press.development.js +6.9% +5.8% 18.97 KB 20.27 KB 4.3 KB 4.55 KB UMD_DEV
react-events-press.production.min.js 🔺+5.8% 🔺+5.5% 7.11 KB 7.52 KB 2.47 KB 2.61 KB UMD_PROD
react-events-press.development.js +6.9% +5.8% 18.78 KB 20.08 KB 4.25 KB 4.49 KB NODE_DEV
react-events-press.production.min.js 🔺+6.0% 🔺+5.6% 6.93 KB 7.34 KB 2.41 KB 2.54 KB NODE_PROD
ReactEventsPress-dev.js +9.8% +7.6% 19.23 KB 21.11 KB 4.36 KB 4.69 KB FB_WWW_DEV
ReactEventsPress-prod.js 🔺+10.8% 🔺+8.9% 16.33 KB 18.1 KB 3.32 KB 3.62 KB FB_WWW_PROD
react-events-hover.development.js 0.0% 0.0% 8.4 KB 8.4 KB 2.05 KB 2.06 KB UMD_DEV
react-events-hover.production.min.js 0.0% -0.1% 3.57 KB 3.57 KB 1.32 KB 1.31 KB UMD_PROD
react-events-hover.development.js 0.0% -0.0% 8.22 KB 8.22 KB 2 KB 2 KB NODE_DEV
react-events-hover.production.min.js 0.0% -0.2% 3.4 KB 3.4 KB 1.26 KB 1.25 KB NODE_PROD
react-events-focus.development.js 0.0% -0.1% 5.96 KB 5.96 KB 1.56 KB 1.56 KB UMD_DEV
react-events-focus.production.min.js 0.0% -0.1% 2.67 KB 2.67 KB 1.04 KB 1.04 KB UMD_PROD
react-events-focus.development.js 0.0% -0.1% 5.77 KB 5.77 KB 1.5 KB 1.5 KB NODE_DEV
react-events-focus.production.min.js 0.0% -0.1% 2.48 KB 2.48 KB 981 B 980 B NODE_PROD
react-events-focus-scope.development.js 0.0% -0.1% 4.72 KB 4.72 KB 1.41 KB 1.41 KB UMD_DEV
react-events-focus-scope.production.min.js 0.0% -0.2% 1.96 KB 1.96 KB 977 B 975 B UMD_PROD
react-events-focus-scope.development.js 0.0% -0.2% 4.54 KB 4.54 KB 1.35 KB 1.35 KB NODE_DEV
react-events-focus-scope.production.min.js 0.0% -0.2% 1.77 KB 1.77 KB 891 B 889 B NODE_PROD
react-events-swipe.production.min.js 0.0% -0.1% 2.64 KB 2.64 KB 1.22 KB 1.22 KB UMD_PROD
react-events-swipe.development.js 0.0% -0.0% 7.87 KB 7.87 KB 2.37 KB 2.37 KB NODE_DEV
react-events-swipe.production.min.js 0.0% -0.1% 3.27 KB 3.27 KB 1.51 KB 1.51 KB NODE_PROD
react-events-drag.development.js 0.0% -0.1% 5.66 KB 5.66 KB 1.6 KB 1.6 KB UMD_DEV
react-events-drag.production.min.js 0.0% -0.2% 2.5 KB 2.5 KB 1.13 KB 1.13 KB UMD_PROD
react-events-drag.development.js 0.0% -0.0% 7.42 KB 7.42 KB 2.26 KB 2.26 KB NODE_DEV
react-events-drag.production.min.js 0.0% -0.1% 3.14 KB 3.14 KB 1.43 KB 1.43 KB NODE_PROD

Generated by 🚫 dangerJS

@trueadm trueadm merged commit 05d0850 into facebook:master May 8, 2019
@trueadm trueadm deleted the add-coords-and-timestamp branch May 8, 2019 19:29
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