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

[react-ui/events] Tap responder API changes #16827

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Sep 19, 2019

This patch limits the onTap* callbacks to the primary pointer button. Auxiliary button and modified primary button interactions call onAuxiliaryTap, cancel any active tap, and preserve the native behavior.

This makes it easier to use Tap for primary pointer interactions while providing a basic way to record auxiliary taps for analytics, etc.

@necolas necolas requested a review from trueadm September 19, 2019 01:16
@necolas necolas force-pushed the react-ui/events/tap-api-changes branch 3 times, most recently from eb7d5d3 to 8c8e412 Compare September 19, 2019 01:26
@sizebot
Copy link

sizebot commented Sep 19, 2019

Details of bundled changes.

Comparing: e8c7dde...00aaea2

react-ui

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-ui-events/focus.development.js 0.0% -0.0% 10.92 KB 10.92 KB 2.35 KB 2.35 KB UMD_DEV
react-ui-events/press.development.js +10.6% +8.3% 4.37 KB 4.83 KB 1.3 KB 1.41 KB UMD_DEV
react-ui-events/tap.development.js +6.7% +2.3% 16.39 KB 17.49 KB 3.66 KB 3.74 KB UMD_DEV
react-ui-events/press.production.min.js 🔺+6.8% 🔺+3.0% 2.02 KB 2.16 KB 931 B 959 B UMD_PROD
react-ui-events/tap.production.min.js 🔺+6.6% 🔺+4.0% 5.8 KB 6.18 KB 2.24 KB 2.33 KB UMD_PROD
react-ui-events/scroll.development.js 0.0% +0.1% 6.29 KB 6.29 KB 1.65 KB 1.65 KB UMD_DEV
react-ui-events/scroll.production.min.js 0.0% 🔺+0.1% 2.62 KB 2.62 KB 1.14 KB 1.14 KB UMD_PROD
react-ui-events/context-menu.development.js 0.0% +0.1% 2.48 KB 2.48 KB 953 B 954 B NODE_DEV
react-ui-events/input.development.js 0.0% +0.1% 4.33 KB 4.33 KB 1.39 KB 1.39 KB NODE_DEV
react-ui-events/scroll.development.js 0.0% +0.1% 6.11 KB 6.11 KB 1.6 KB 1.6 KB NODE_DEV
react-ui-accessibility/tab-focus.development.js 0.0% -0.1% 4.38 KB 4.38 KB 1.21 KB 1.21 KB NODE_DEV
react-ui-accessibility/tab-focus.production.min.js 0.0% -0.1% 1.66 KB 1.66 KB 833 B 832 B NODE_PROD
react-ui-events/hover.development.js 0.0% +0.1% 7 KB 7 KB 1.55 KB 1.55 KB UMD_DEV
react-ui-events/press-legacy.development.js 0.0% -0.0% 20.73 KB 20.73 KB 4.83 KB 4.83 KB UMD_DEV
react-ui-events/press-legacy.production.min.js 0.0% -0.1% 6.97 KB 6.97 KB 2.62 KB 2.62 KB UMD_PROD
react-ui-events/hover.development.js 0.0% +0.1% 6.81 KB 6.81 KB 1.5 KB 1.5 KB NODE_DEV
react-ui-events/press-legacy.development.js 0.0% -0.0% 20.54 KB 20.54 KB 4.78 KB 4.78 KB NODE_DEV
react-ui-accessibility/focus-table.development.js 0.0% -0.1% 6.83 KB 6.83 KB 1.62 KB 1.62 KB NODE_DEV
react-ui-events/press-legacy.production.min.js 0.0% -0.1% 6.79 KB 6.79 KB 2.57 KB 2.56 KB NODE_PROD
react-ui-events/press.development.js +11.3% +8.9% 4.1 KB 4.56 KB 1.22 KB 1.33 KB NODE_DEV
react-ui-events/tap.development.js +6.8% +2.4% 16.21 KB 17.31 KB 3.6 KB 3.69 KB NODE_DEV
react-ui-events/focus.production.min.js 0.0% 🔺+0.1% 3.92 KB 3.92 KB 1.32 KB 1.32 KB NODE_PROD
react-ui-events/press.production.min.js 🔺+7.9% 🔺+3.8% 1.75 KB 1.89 KB 841 B 873 B NODE_PROD
react-ui-events/tap.production.min.js 🔺+5.6% 🔺+2.5% 5.7 KB 6.02 KB 2.22 KB 2.28 KB NODE_PROD
react-ui-events/swipe.development.js 0.0% -0.1% 5.99 KB 5.99 KB 1.62 KB 1.62 KB UMD_DEV
react-ui-events/keyboard.production.min.js 0.0% -0.1% 2.79 KB 2.79 KB 1.39 KB 1.39 KB UMD_PROD
ReactEventsPress-dev.js +11.3% +9.3% 4.08 KB 4.55 KB 1.2 KB 1.31 KB FB_WWW_DEV
react-ui-events/swipe.production.min.js 0.0% -0.1% 2.44 KB 2.44 KB 1.1 KB 1.1 KB UMD_PROD
ReactEventsTap-dev.js +7.1% +2.5% 16.08 KB 17.23 KB 3.61 KB 3.71 KB FB_WWW_DEV
ReactEventsPress-prod.js 🔺+8.7% 🔺+4.0% 3.54 KB 3.85 KB 1.02 KB 1.06 KB FB_WWW_PROD
ReactEventsTap-prod.js 🔺+6.7% 🔺+2.3% 12.89 KB 13.76 KB 2.91 KB 2.98 KB FB_WWW_PROD
react-ui-events/drag.development.js 0.0% 0.0% 6.97 KB 6.97 KB 2.2 KB 2.21 KB NODE_DEV
react-ui-events/keyboard.development.js 0.0% 0.0% 6.73 KB 6.73 KB 2.34 KB 2.34 KB NODE_DEV
react-ui-events/swipe.production.min.js 0.0% -0.1% 2.26 KB 2.26 KB 1.04 KB 1.04 KB NODE_PROD

Generated by 🚫 dangerJS against 00aaea2

This patch limits the `onTap*` callbacks to the primary pointer button.
Auxiliary button and modified primary button interactions call
`onAuxiliaryTap`, cancel any active tap, and preserve the native behavior.
@necolas necolas force-pushed the react-ui/events/tap-api-changes branch from 8c8e412 to 00aaea2 Compare September 19, 2019 16:16
@necolas necolas merged commit fd870e6 into facebook:master Sep 19, 2019
@necolas necolas deleted the react-ui/events/tap-api-changes branch December 20, 2019 15:34
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