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

Bugfix/toast transition error when triggered/closing at the same tick #2622

Merged

Conversation

VitAndrGuid
Copy link
Contributor

@VitAndrGuid VitAndrGuid commented Apr 17, 2024

Linked Issue

Closes #2407

Description

Whenever transitions are enabled and a second toast is triggered immediately after the first one is closed, the toast wrapper is removed from the DOM and the second toast is not displayed.

This happens because the wrapper depends on a IF block thats only true when theres a toast on the queue, but when a first toast A is removed and a second one B is immediately added it seems the update of the removal of the toast wrapper, scheduled by the removal of A is executed after A outro animation ends, in this case B will be shown for a mere moment and then the wrapper is removed, but it should be visible since B is on the queue.

Changsets

Instructions: Changesets automate our changelog. If you modify files in /packages, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm ci:check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

Copy link

changeset-bot bot commented Apr 17, 2024

🦋 Changeset detected

Latest commit: 2588708

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Apr 17, 2024

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

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Apr 17, 2024 7:54pm

Copy link

vercel bot commented Apr 17, 2024

@VitAndrGuid is attempting to deploy a commit to the Skeleton Labs Team on Vercel.

A member of the Team first needs to authorize it.

@endigo9740
Copy link
Contributor

endigo9740 commented Apr 17, 2024

@VitAndrGuid I've restored the missing portion of the PR template concerning changesets and the checklist. If you could please run down the checklist and verify all conditions are met please.

Note I handle PR reviews periodically, so it may be a couple days before I get to this. But I will review asap.

@VitAndrGuid
Copy link
Contributor Author

@endigo9740
Done

@endigo9740 endigo9740 marked this pull request as ready for review April 19, 2024 21:24
@endigo9740
Copy link
Contributor

endigo9740 commented Apr 19, 2024

@VitAndrGuid the PR was still in a "draft" state, so I wasn't sure if were quite done and ready for review. But assuming so, I've completed an audit and everything looks to meet my expectations. I especially appreciate you adding the test case!

If you would please confirm everything is ready on your end, I'll go ahead and accept and merge this. If we can get this in over the next few day it can go out as part of the new release on Tuesday next week.

Thanks!

@VitAndrGuid
Copy link
Contributor Author

@endigo9740
Things are ok on my end, i think this can be merged if possible.

@endigo9740 endigo9740 merged commit 0020c67 into skeletonlabs:dev Apr 20, 2024
4 of 6 checks passed
@VitAndrGuid VitAndrGuid deleted the bugfix/toast-transition-error branch April 20, 2024 02:09
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.

Toast timeout closing issue
2 participants