-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[charts] Move interaction state in store #15426
Conversation
Deploy preview: https://deploy-preview-15426--material-ui-x.netlify.app/ |
CodSpeed Performance ReportMerging #15426 will degrade performances by 10.77%Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice extraction, everything seems to work nicely.
I've left some comments for possible improvements.
I would also argue that everything new created inside the internals/
folder could either be in a root store/
folder or inside internals/store/
.
Since the internals
is quite bloated already without specific access patterns 😓
Co-authored-by: Jose C Quintas Jr <[email protected]> Signed-off-by: Alexandre Fauquette <[email protected]>
About renaming files, I would prefer to do that in a dedicated PR after merging this one and #15154 |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Extracted from #15154 focusing only on the introduction of the store.
The PR can be read commit by commit.
The performances gain for the tooltip are not interesting in this PR, because I tried to keep it without breaking change. And the props of the axis tooltip are too generous. They provide the state for x and y axis. So as soon a the mouse move I need to update the state either for x or y. The performances of the tooltip will be done in the breaking change of #15154
The axis highlight get some performances improvement by having a component for the x-axis and another for the y-axis. Such that they re-render only if the correct value is updated.
@JCQuintas I noticed your concern about the naming of
InteractionProvider
. The plan is to go one provider per PR, and move all the typing and the logic into thepluggin
folder. At the end it will be namedChartsDataProvider
or whatever you name the component in your PR to split the ChartContainer