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

Ensure Transition component state doesn't change when it becomes hidden #3372

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

RobinMalfait
Copy link
Member

This was originally introduced in #1519 to fix an issue where some enter transitions where broken: #1503

However, since we refactored the Transition component to make use of the useTransition hook, I can't seem to reproduce this issue anymore.

In fact, removing this code fixes an issue.

The bigger issue here is that when the component becomes hidden, that we always set the state to hidden as well. But if it becomes visible again, we don't show it again.

Right now, since I couldn't reproduce any of the other issue, I opted to just removing the code entirely. But if we ever need it again, we probably have to make sure that it becomes visible in the other scenario as well.

Fixes: #3328

This was originally introduced in
#1519 to fix an issue
where some enter transitions where broken: #1503

However, since we refactored the `Transition` component to make use of
the `useTransition` hook, I can't seem to reproduce this issue anymore.

In fact, removing this code fixes an issue.

The bigger issue here is that when the component becomes hidden, that we
always set the state to hidden as well. But if it becomes visible again,
we don't show it again.

Right now, since I couldn't reproduce any of the other issue, I opted to
just removing the code entirely. But if we ever need it again, we
probably have to make sure that it becomes visible in the other scenario
as well.

Fixes: #3328
Copy link

vercel bot commented Jul 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2024 0:24am
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2024 0:24am

@RobinMalfait RobinMalfait merged commit 13b3100 into main Jul 10, 2024
8 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-3328 branch July 10, 2024 09:28
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.

Transition does not respect responsive display styles from the parent element
2 participants