Skip to content

Conversation

@williaster
Copy link
Owner

🏆 Enhancements

Currently if a user of XYChart or Network passes their own onMouseLeave or onMouseMove props in addition to a renderTooltip prop, the mouse handlers are overwritten by the WithTooltip provided mouse handlers and never invoked.

This PR fixes this by

  • updating @data-ui/shareds WithTooltip to accept onMouseLeave and onMouseMove functions, which are invoked when the provided equivalents are called.
  • updates XYChart and Network to pass along the user-provided onMouseLeave and onMouseMove to WithTooltip

Test plan

  • CI – New unit tests in WithTooltip

@codecov
Copy link

codecov bot commented Dec 18, 2019

Codecov Report

Merging #195 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
+ Coverage   80.47%   80.49%   +0.01%     
==========================================
  Files         109      109              
  Lines        2433     2435       +2     
  Branches      571      573       +2     
==========================================
+ Hits         1958     1960       +2     
  Misses        291      291              
  Partials      184      184
Impacted Files Coverage Δ
packages/network/src/chart/Network.jsx 75.3% <ø> (ø) ⬆️
packages/shared/src/enhancer/WithTooltip.jsx 81.25% <100%> (+1.25%) ⬆️
packages/xy-chart/src/chart/XYChart.jsx 76.51% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b63eb4a...b6384b5. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants