Skip to content

[Flare] Add event position properties to Hover responder#15819

Merged
trueadm merged 1 commit into
facebook:masterfrom
trueadm:add-position-data-to-hover
Jun 4, 2019
Merged

[Flare] Add event position properties to Hover responder#15819
trueadm merged 1 commit into
facebook:masterfrom
trueadm:add-position-data-to-hover

Conversation

@trueadm
Copy link
Copy Markdown
Contributor

@trueadm trueadm commented Jun 4, 2019

This PR adds mouse event co-ords to Hover responder module events. Specifically, clientX, clientY, pageX, pageY, x and y. These are all taken from the native event object.

@sizebot
Copy link
Copy Markdown

sizebot commented Jun 4, 2019

Details of bundled changes.

Comparing: b63a41d...bd0d066

react-events

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-events-hover.development.js +7.0% +5.1% 8.41 KB 9 KB 2.07 KB 2.17 KB UMD_DEV
react-events-drag.development.js 0.0% -0.1% 5.74 KB 5.74 KB 1.63 KB 1.63 KB UMD_DEV
react-events-hover.production.min.js 🔺+6.2% 🔺+5.9% 3.62 KB 3.85 KB 1.36 KB 1.44 KB UMD_PROD
react-events-drag.production.min.js 0.0% -0.2% 2.54 KB 2.54 KB 1.16 KB 1.16 KB UMD_PROD
react-events.development.js 0.0% -0.4% 1.31 KB 1.31 KB 708 B 705 B UMD_DEV
react-events-focus-scope.development.js 0.0% -0.1% 4.79 KB 4.79 KB 1.45 KB 1.45 KB UMD_DEV
react-events.production.min.js 0.0% -0.5% 682 B 682 B 431 B 429 B UMD_PROD
react-events-focus-scope.production.min.js 0.0% -0.2% 2.01 KB 2.01 KB 1020 B 1018 B UMD_PROD
react-events.development.js 0.0% -0.3% 1.12 KB 1.12 KB 645 B 643 B NODE_DEV
react-events-focus-scope.development.js 0.0% -0.1% 4.6 KB 4.6 KB 1.4 KB 1.4 KB NODE_DEV
react-events.production.min.js 0.0% -0.6% 512 B 512 B 354 B 352 B NODE_PROD
react-events-focus-scope.production.min.js 0.0% -0.2% 1.82 KB 1.82 KB 929 B 927 B NODE_PROD
react-events-focus.development.js 0.0% -0.1% 7.09 KB 7.09 KB 1.83 KB 1.82 KB UMD_DEV
react-events-focus.production.min.js 0.0% -0.2% 3.08 KB 3.08 KB 1.19 KB 1.18 KB UMD_PROD
react-events-focus.development.js 0.0% -0.1% 6.91 KB 6.91 KB 1.77 KB 1.77 KB NODE_DEV
react-events-focus.production.min.js 0.0% -0.3% 2.9 KB 2.9 KB 1.11 KB 1.11 KB NODE_PROD
react-events-hover.development.js +7.2% +5.2% 8.23 KB 8.82 KB 2.02 KB 2.12 KB NODE_DEV
react-events-hover.production.min.js 🔺+6.5% 🔺+6.2% 3.45 KB 3.67 KB 1.3 KB 1.38 KB NODE_PROD
react-events-drag.production.min.js 0.0% -0.1% 3.18 KB 3.18 KB 1.46 KB 1.46 KB NODE_PROD
react-events-press.development.js 0.0% -0.1% 21.31 KB 21.31 KB 4.91 KB 4.9 KB UMD_DEV
react-events-swipe.development.js 0.0% -0.1% 6.19 KB 6.19 KB 1.76 KB 1.76 KB UMD_DEV
react-events-press.production.min.js 0.0% -0.1% 7.84 KB 7.84 KB 2.78 KB 2.77 KB UMD_PROD
ReactEventsHover-dev.js +7.8% +6.3% 8.32 KB 8.97 KB 2.04 KB 2.17 KB FB_WWW_DEV
react-events-swipe.production.min.js 0.0% -0.2% 2.68 KB 2.68 KB 1.25 KB 1.25 KB UMD_PROD
ReactEventsHover-prod.js 🔺+10.7% 🔺+9.0% 7.21 KB 7.98 KB 1.7 KB 1.85 KB FB_WWW_PROD
react-events-press.development.js 0.0% -0.1% 21.13 KB 21.13 KB 4.85 KB 4.85 KB NODE_DEV
react-events-press.production.min.js 0.0% -0.1% 7.66 KB 7.66 KB 2.72 KB 2.71 KB NODE_PROD
react-events-swipe.production.min.js 0.0% -0.1% 3.32 KB 3.32 KB 1.55 KB 1.54 KB NODE_PROD

Generated by 🚫 dangerJS

target: Element | Document,
type: HoverEventType,
timeStamp: number,
clientX: null | number,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we don't need to support existing use of clientX (for hover) at FB maybe we shouldn't include it on the event objects

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

True, but I wasn't 100% sure if it wouldn't be used. I'll leave it in for now, we can take a stab at removing a bunch of these later and using higher level versions possibly.

@trueadm trueadm merged commit 2534c0c into facebook:master Jun 4, 2019
@trueadm trueadm deleted the add-position-data-to-hover branch June 4, 2019 17:10
rickhanlonii pushed a commit to rickhanlonii/react that referenced this pull request Jun 25, 2019
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