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

fix: slot prevents out transition for non-modal dropdown and select components #801

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

MellKam
Copy link
Collaborator

@MellKam MellKam commented Mar 31, 2024

resolves: #800

The main change that brought the out transition back was:

if (childrens.length === 1)
	return cloned

Basically unwrap the vnodes array if it only has one element. Idk why this is fixed, but it works XD. I'd like others to look at this, because I'm not really sure about it.

I should probably write a story to showcase this, but I'm lazy right now. I'll get back to it tomorrow.

@zernonia
Copy link
Member

zernonia commented Apr 1, 2024

Tested out and indeed was the array of vnodes causing the out animation to be missing.
Thanks for the fix and improvement here @MellKam ! That's a brilliant solution! 💚

Not sure what kind of story can we write here, and writing test for animation/transition part is still something I need to figure out lol 😂

@MellKam
Copy link
Collaborator Author

MellKam commented Apr 1, 2024

I updated the DropdownMenu story with out animation using tailwindcss-animate plugin.

2024-04-01.15.58.15.mov

I have also tried to come up with some test that would check that animation is going as it should, but no success.

@MellKam
Copy link
Collaborator Author

MellKam commented Apr 1, 2024

@zernonia Why do we have the require in the tailwind configs? Is this necessary? If not, I would like to open the separate PR and update all configs to esm only.

@MellKam MellKam marked this pull request as ready for review April 1, 2024 15:36
@zernonia
Copy link
Member

zernonia commented Apr 1, 2024

Nice @MellKam ! I thought of adding the tailwind-animate plugin to histoire too!
We can change tailwind.config to esm version 😁

@zernonia zernonia merged commit 94d09a7 into unovue:main Apr 1, 2024
2 checks passed
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.

[Bug]: Out animation doesn't work for Select and DropdownMenu with :modal="false"
2 participants