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

Remove translateStyle function and export #82

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

PavelVanecek
Copy link
Contributor

@PavelVanecek PavelVanecek commented Oct 17, 2023

This was necessary in 2017 but is not needed anymore - all browsers now support CSS transforms and transitions without prefixes.

This is a breaking change. The function export was not documented but I guess if it's exported from index then it's part of the public API. Recharts will break for example :)

https://caniuse.com/?search=transforms

Also discussed on Slack: https://recharts.slack.com/archives/C042Q5K5UDC/p1697529536898929

This was necessary in 2017 but is not needed anymore - all browsers now support CSS transforms and transitions without prefixes.

This is probably a breaking change. The function export was not documented but I guess if it's exported from index then it's part of the public API?
Copy link
Member

@ckifer ckifer left a comment

Choose a reason for hiding this comment

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

Nice, huge chunk of unneeded code removed!

Even though this is 'breaking' the solution is straightforward - update your browser (which should be done anyways). Not going to worry too much about the consequences of this

@ckifer
Copy link
Member

ckifer commented Oct 17, 2023

Although... in the spirit of semver we could just do a major version release of react-smooth for consumers and accept it as 'non-breaking' for recharts

@PavelVanecek
Copy link
Contributor Author

I'm not fussed about browser support but in this PR I have removed a function export - that's the breaking part.

import AnimateGroup from './AnimateGroup';

export { configSpring, configBezier, AnimateGroup, translateStyle };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing this export will break when recharts imports it: https://github.com/recharts/recharts/blob/master/src/component/Tooltip.tsx#L5

which is why I would do a major release.

@ckifer
Copy link
Member

ckifer commented Oct 18, 2023

Oh yeah makes sense, we can do that

@ckifer ckifer merged commit 0eb277d into recharts:master Oct 18, 2023
1 check passed
@PavelVanecek PavelVanecek deleted the translateStyle-remove branch October 18, 2023 07:04
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