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

replace react-transition-group animations with maintained alternative #1071

Open
setchy opened this issue Apr 29, 2024 · 6 comments
Open

replace react-transition-group animations with maintained alternative #1071

setchy opened this issue Apr 29, 2024 · 6 comments
Assignees
Labels
dependency Dependency updates refactor Refactoring of existing feature

Comments

@setchy
Copy link
Member

setchy commented Apr 29, 2024

📝 Provide a description of the new feature

Started seeing this in the dev logs when interacting with notification rows

"Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference.

I believe this is coming from our limited use of https://github.com/reactjs/react-transition-group

➕ Additional Information

No response

@setchy setchy added enhancement New feature or enhancement to existing functionality help-wanted Extra attention is needed dependency Dependency updates refactor Refactoring of existing feature and removed enhancement New feature or enhancement to existing functionality labels Apr 29, 2024
@afonsojramos
Copy link
Member

I can take a look at this 👀

@afonsojramos afonsojramos self-assigned this Apr 29, 2024
@setchy
Copy link
Member Author

setchy commented Apr 29, 2024

I did a quick search around for alternatives, and framer/motion seemed to stand out as a maintained alternative.

Long shot, but with react-transition-group being under reactjs, they may address it, or take the leap to formally archive the repo

@setchy setchy removed the help-wanted Extra attention is needed label May 1, 2024
@afonsojramos
Copy link
Member

@setchy I was trying to look into a more leaner approach, so in this case, css animations using tailwind, but for that I'd need to mess around with the remove notification.

This is because react-transition-group seems to work by monitoring react changes. This means that we would potentially need to add a delay, either before the rerender or before the removal, to give time for the animation to finish. Thoughts?

@afonsojramos
Copy link
Member

However, it does seem that framer/motion have some leaner alternatives as well.
image

image

Which would give us what we want for just 19kb.

@setchy
Copy link
Member Author

setchy commented May 9, 2024

I have little (ie: no) experience here haha. Happy to go with whichever you think is best.

Is there any other animations/transitions we'd add in future? If so, perhaps the framer route would open up more possibilities 🤷

@afonsojramos
Copy link
Member

Yeah, you're right! I just wasn't aware of this leaner alternative using framer (as it is a heavy library by default - which to us isn't that big of a deal as we just send everything to the user using a binary, but we still don't want bloat if possible)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Dependency updates refactor Refactoring of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants