svelte-toast icon indicating copy to clipboard operation
svelte-toast copied to clipboard

Bug in the last item animation

Open Iuriy-Budnikov opened this issue 3 years ago • 4 comments

last but one item shifts to the right side

ScreenFlow

Iuriy-Budnikov avatar Nov 17 '22 15:11 Iuriy-Budnikov

Yes, I noticed this too but I'm not sure if it's fixable. This happens when 2 or more toasts are removed at about the same time. svelte-toast actually delegates all animation work to be handled by Svelte, so it feels like it's a Svelte issue.

zerodevx avatar Nov 17 '22 15:11 zerodevx

Yes, I noticed this too but I'm not sure if it's fixable. This happens when 2 or more toasts are removed at about the same time. svelte-toast actually delegates all animation work to be handled by Svelte, so it feels like it's a Svelte issue.

Does it make sense to add some delay?

Iuriy-Budnikov avatar Nov 18 '22 08:11 Iuriy-Budnikov

Normally I'd rather let Svelte do the heavy lifting re animations and batching - but I guess it's possible to place pop requests into a rate-limiting queue. I'll test this out once I have some time.

zerodevx avatar Nov 18 '22 16:11 zerodevx

Setting "toastContainerLeft" to a fixed value seems to fix the position, items removed at the same time are still on top of one another.

I just used this: --toastContainerLeft: calc(100vw - 350px);

A bit stuck on the overlapping issue, tough.

Peek 2023-01-06 06-39

dontWatchMeCode avatar Jan 06 '23 05:01 dontWatchMeCode