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

Align onParentEventType callbacks across XYPlot #857

Merged
merged 6 commits into from
Jul 10, 2018

Conversation

markov00
Copy link
Contributor

@markov00 markov00 commented Jul 4, 2018

This PR integrate and fix the following:

  1. The jsdocs of XYPlot mouse handlers are updated and describe events passed to the handler as SyntheticEvent
  2. Callback of some XYPlot mouseEvents handlers are called directly with the events, some other with an object like {event: event}. I've aligned all the callbacks
  3. Added the onParentMouseLeave and onParentMouseEnter callbacks for series components. Although this is not directly used by components in react-vis I think there are cases where a developer wants to extend an AbstractSeries and needs the onParentMouseUp or onParentMouseLeave events. We are for example on creating our own Crosshair but extending an AbstractSeries so we have the access to all the plot data as props in side the component. Having onParentMouseLeave helps us to hide the crosshair.
  4. Added the onMouseUp prop to XYPlot and relative onParentMouseUp handler
  5. Fixed the wrong callback on onTouchStart handler (was onMouseDown)
  6. Added docs in line of the current documentation
  7. Added tests for the onParentEventTypes series callbacks.

markov00 added 6 commits July 4, 2018 17:25
Mouse handlers in XYPlot receive SyntheticEvents and not Native Events
by defaults.

Aligned all callback to be called with event parameters, and not with
an object like { event: event }
Align the mouseEnter and mouseLeave handler to call respective
onParentEventType callback for every series child
@CLAassistant
Copy link

CLAassistant commented Jul 4, 2018

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@mcnuttandrew mcnuttandrew left a comment

Choose a reason for hiding this comment

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

lgtm! Thanks for getting that

@mcnuttandrew mcnuttandrew merged commit a288f91 into uber:master Jul 10, 2018
markov00 added a commit to elastic/eui that referenced this pull request Jul 13, 2018
* Updated react-vis to 1.10.2

The features we introduced in XYPlot are now merged into react-vis after uber/react-vis#857. The XYPlotExtended class is removed.

The div aroung the XYPlot is also removed since it's not required. All snapshots are updated after this removal.

* Updated CHANGELOG

* Reverting 492d28a to keep the wrapping div around the chart

* Fixed the react-vis version to the stable one.

Check this issue comments to see the status: uber/react-vis#861
ayarcohaila pushed a commit to ayarcohaila/react-vis that referenced this pull request Jun 30, 2021
* Aligned mouse handlers docs and callback format

Mouse handlers in XYPlot receive SyntheticEvents and not Native Events
by defaults.

Aligned all callback to be called with event parameters, and not with
an object like { event: event }

* Add onParentMouseEnter and onParentMouseLeave

Align the mouseEnter and mouseLeave handler to call respective
onParentEventType callback for every series child

* Add onMouseUp calls and handlers

* Updated docs for onMouseUp prop

* Fix wrong callback for onTouchStart

* Add tests for onParentEventType handlers
ayarcohaila added a commit to ayarcohaila/react-vis that referenced this pull request May 30, 2023
* Aligned mouse handlers docs and callback format

Mouse handlers in XYPlot receive SyntheticEvents and not Native Events
by defaults.

Aligned all callback to be called with event parameters, and not with
an object like { event: event }

* Add onParentMouseEnter and onParentMouseLeave

Align the mouseEnter and mouseLeave handler to call respective
onParentEventType callback for every series child

* Add onMouseUp calls and handlers

* Updated docs for onMouseUp prop

* Fix wrong callback for onTouchStart

* Add tests for onParentEventType handlers
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.

3 participants