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

[charts] Allow to skip animation on sparkline bar #12160

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

alexfauquette
Copy link
Member

Fix #12152

The bar animation has been added by error in sparkline with #9926 in the v6.0.0-alpha.16.

For v7 it has been removed by #11311

Since the behavior is here since the beginning of v6.0.0 I propose to add the skipAnimation props to sparkline to keep the same default as before, and keep v7 as it is

@alexfauquette alexfauquette added regression A bug, but worse cherry-pick The PR was cherry-picked from the next branch component: charts This is the name of the generic UI component, not the React module! labels Feb 21, 2024
@mui-bot
Copy link

mui-bot commented Feb 21, 2024

Deploy preview: https://deploy-preview-12160--material-ui-x.netlify.app/

Updated pages:

Generated by 🚫 dangerJS against 3d487df

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

LGTM. 👌
Have you considered adding a section about animation in the docs? 🤔

@@ -101,6 +101,12 @@ export interface SparkLineChartProps
* }
*/
margin?: Partial<CardinalDirections<number>>;
/**
* If `true`, bar animations are skiped.
* @deprecated In v7 animation are skiped for sparkline.
Copy link
Member

@LukasTy LukasTy Feb 21, 2024

Choose a reason for hiding this comment

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

Suggested change
* @deprecated In v7 animation are skiped for sparkline.
* @deprecated In v7 animations are skipped for sparkline.

Copy link
Member Author

Choose a reason for hiding this comment

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

by default.

It's not exactly by default, they are just removed, assuming nobody needs it. We could add a props enableAnimation in v7 but for now it does not exist

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha. Updated the suggestion. 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

It was mostly to make sure you are not choked that v7 removes this feature ;)

@alexfauquette
Copy link
Member Author

Have you considered adding a section about animation in the docs? 🤔

Yes but this feature will be removed in a month, and the feature is in the API of the component

@alexfauquette alexfauquette enabled auto-merge (squash) February 21, 2024 15:19
@alexfauquette alexfauquette merged commit 87e8247 into mui:master Feb 21, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick The PR was cherry-picked from the next branch component: charts This is the name of the generic UI component, not the React module! regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants