Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Jun 26, 2019

This PR fixes a bunch of issues and removes some dead code from Press. Specifically, the event object we returned to the user wasn't always return the right co-ords if multiple events were being used at once (it only got the properties from the first even object). Also, pointer events that are touch events always have the same target as the original press start, so we now only use the logic for checking targets within targets for mouse events. To improve code, we now also leverage touchEvent on state to make things a bit saner.

@sizebot
Copy link

sizebot commented Jun 26, 2019

Details of bundled changes.

Comparing: dd93357...2dd34a2

react-events

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-events-drag.development.js 0.0% +0.1% 5.93 KB 5.93 KB 1.67 KB 1.67 KB UMD_DEV
react-events-drag.production.min.js 0.0% 🔺+0.1% 2.56 KB 2.56 KB 1.16 KB 1.16 KB UMD_PROD
react-events.development.js 0.0% +0.1% 1.31 KB 1.31 KB 707 B 708 B UMD_DEV
ReactEventsPress-dev.js -1.6% -1.7% 28.27 KB 27.82 KB 6.57 KB 6.46 KB FB_WWW_DEV
react-events-focus-scope.production.min.js 0.0% 🔺+0.1% 1.82 KB 1.82 KB 956 B 957 B UMD_PROD
ReactEventsPress-prod.js -3.9% -3.5% 21.49 KB 20.66 KB 4.54 KB 4.38 KB FB_WWW_PROD
react-events-focus-scope.development.js 0.0% +0.1% 4.06 KB 4.06 KB 1.27 KB 1.27 KB NODE_DEV
react-events-scroll.development.js 0.0% +0.1% 3.92 KB 3.92 KB 1.22 KB 1.22 KB UMD_DEV
react-events-scroll.production.min.js 0.0% 🔺+0.1% 1.78 KB 1.78 KB 875 B 876 B UMD_PROD
react-events-scroll.production.min.js 0.0% 🔺+0.1% 1.59 KB 1.59 KB 796 B 797 B NODE_PROD
react-events-hover.development.js 0.0% -0.0% 8.61 KB 8.61 KB 2.06 KB 2.06 KB NODE_DEV
react-events-hover.production.min.js 0.0% 🔺+0.1% 3.64 KB 3.64 KB 1.34 KB 1.34 KB NODE_PROD
react-events-press.development.js -1.7% -1.4% 28.87 KB 28.39 KB 6.79 KB 6.7 KB UMD_DEV
react-events-press.production.min.js -0.5% -2.7% 9.01 KB 8.97 KB 3.27 KB 3.18 KB UMD_PROD
react-events-swipe.production.min.js 0.0% 🔺+0.1% 2.65 KB 2.65 KB 1.19 KB 1.2 KB UMD_PROD
react-events-press.development.js -1.7% -1.5% 28.68 KB 28.21 KB 6.74 KB 6.64 KB NODE_DEV
react-events-press.production.min.js -0.5% -2.7% 8.82 KB 8.78 KB 3.2 KB 3.12 KB NODE_PROD

Generated by 🚫 dangerJS

Tidy up of Flow

Further fix

More fixes
@trueadm trueadm force-pushed the press-refinements branch from ac30ae2 to a5a0b08 Compare June 26, 2019 19:46
@trueadm trueadm merged commit 824e9be into facebook:master Jun 26, 2019
@trueadm trueadm deleted the press-refinements branch June 26, 2019 21:25
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