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 events: add onHoverMove support #15388

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Apr 11, 2019

Adds onHoverMove, related test, and documentation.

Ref #15257

Copy link
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

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

I left feedback on hover move being discrete. Also we should probably add onUnmount support to the Hover module to make it unsubscribe from events properly at some point too.

@necolas necolas force-pushed the react-events/add-hover-move branch from 05a5bf6 to 6bf944a Compare April 11, 2019 21:16
@necolas necolas force-pushed the react-events/add-hover-move branch from 6bf944a to bb9988d Compare April 12, 2019 01:36
@sizebot
Copy link

sizebot commented Apr 12, 2019

Details of bundled changes.

Comparing: cdfb06e...bb9988d

react-events

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-events.production.min.js 0.0% 🔺+0.3% 698 B 698 B 399 B 400 B NODE_PROD
react-events.development.js 0.0% +0.1% 1.59 KB 1.59 KB 686 B 687 B UMD_DEV
react-events-press.development.js +0.4% +0.4% 19.94 KB 20.01 KB 4.75 KB 4.77 KB UMD_DEV
react-events-press.production.min.js 🔺+0.2% 🔺+0.4% 7.76 KB 7.78 KB 2.64 KB 2.65 KB UMD_PROD
react-events-press.development.js +0.4% +0.4% 19.77 KB 19.84 KB 4.71 KB 4.73 KB NODE_DEV
react-events-press.production.min.js 🔺+0.2% 🔺+0.4% 7.59 KB 7.61 KB 2.59 KB 2.6 KB NODE_PROD
ReactEventsPress-dev.js +0.5% +0.6% 18.05 KB 18.14 KB 3.99 KB 4.02 KB FB_WWW_DEV
ReactEventsPress-prod.js 🔺+0.4% 🔺+0.6% 14.96 KB 15.02 KB 2.96 KB 2.97 KB FB_WWW_PROD
react-events-hover.development.js +9.2% +5.7% 6.77 KB 7.4 KB 1.8 KB 1.9 KB UMD_DEV
react-events-hover.production.min.js 🔺+9.1% 🔺+6.0% 3.03 KB 3.3 KB 1.17 KB 1.24 KB UMD_PROD
react-events-hover.development.js +9.4% +6.0% 6.6 KB 7.23 KB 1.75 KB 1.86 KB NODE_DEV
react-events-hover.production.min.js 🔺+9.6% 🔺+7.6% 2.87 KB 3.14 KB 1.1 KB 1.19 KB NODE_PROD
ReactEventsHover-dev.js +9.8% +5.9% 6.81 KB 7.47 KB 1.77 KB 1.88 KB FB_WWW_DEV
ReactEventsHover-prod.js 🔺+10.5% 🔺+7.7% 5.98 KB 6.61 KB 1.48 KB 1.59 KB FB_WWW_PROD
react-events-focus.development.js 0.0% +0.1% 3.29 KB 3.29 KB 1.11 KB 1.11 KB UMD_DEV
react-events-focus.production.min.js 0.0% 🔺+0.1% 1.52 KB 1.52 KB 741 B 742 B UMD_PROD
react-events-focus.development.js 0.0% +0.1% 3.12 KB 3.12 KB 1.06 KB 1.06 KB NODE_DEV
react-events-focus.production.min.js 0.0% 🔺+0.3% 1.35 KB 1.35 KB 670 B 672 B NODE_PROD
react-events-swipe.development.js 0.0% 0.0% 8.29 KB 8.29 KB 2.57 KB 2.57 KB UMD_DEV
react-events-swipe.production.min.js 0.0% 🔺+0.1% 3.46 KB 3.46 KB 1.61 KB 1.61 KB UMD_PROD
react-events-swipe.development.js 0.0% +0.1% 8.12 KB 8.12 KB 2.53 KB 2.53 KB NODE_DEV
react-events-swipe.production.min.js 0.0% 🔺+0.1% 3.29 KB 3.29 KB 1.55 KB 1.55 KB NODE_PROD
react-events-drag.development.js 0.0% 0.0% 7.8 KB 7.8 KB 2.44 KB 2.44 KB UMD_DEV
react-events-drag.production.min.js 0.0% 🔺+0.1% 3.3 KB 3.3 KB 1.5 KB 1.5 KB UMD_PROD
react-events-drag.development.js 0.0% 0.0% 7.63 KB 7.63 KB 2.4 KB 2.4 KB NODE_DEV
react-events-drag.production.min.js 0.0% 🔺+0.1% 3.14 KB 3.14 KB 1.44 KB 1.44 KB NODE_PROD

Generated by 🚫 dangerJS

@necolas necolas merged commit 4e59d4f into facebook:master Apr 12, 2019
@thers
Copy link

thers commented Apr 17, 2019

Is it really OK that it does not respect the shape of an element? Suppose we have an element with border-radius: 50%, mouseover event respect it's shape, as in does not fire when mouse is within bounding rectangle but not over content inside border. Current behavior will probably lead to confusion of developers that this particular event does not take into account shape of an element.

@necolas necolas deleted the react-events/add-hover-move branch May 3, 2019 17:35
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.

None yet

5 participants