fix(ui): hold info toast ~1s before it rises and fades #181
Reference in New Issue
Block a user
Delete Branch "feature/toast-hold-before-fade"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Third in a linear stack: #179 → #180 → this (branched off #180). Until those merge, this PR's diff also shows their commits
c1805e5/fb7490f; review the top commit400b6ac(onlyToast.svelte+app.svelte.ts). No file overlap with #179/#180 — stacked only to keep the test contour coherent. Merge #179 → #180 → this.What
The info toast began drifting up and fading the instant it finished appearing (the CSS keyframes jumped from the 12% appeared-stop straight to the 100% risen-and-faded stop), so a glanced message was already leaving.
Change
Insert a ~1s hold at rest before the rise-and-fade:
Toast.svelte: animation 2s → 3s, keyframe stops at 8% (appeared, ~240ms) and 41% (end of the ~1s hold); the rise-and-fade tail keeps its original pace. Reduced-motion variant gets the same appear/hold/fade timing (fade only, no travel).app.svelte.ts:showToastdismissal timer 2000 → 3000ms, in lockstep with the animation. The error toast (4s dwell, Svelte fly/fade) is unchanged.Cosmetic animation-timing only — no logic branch and no non-brittle test layer for it (an e2e timing assertion would be flaky), so no test added; eyeball on the contour.
Verification (local)
pnpm check— 0 / 0pnpm test:unit— 396 passedpnpm test:e2e— 190 passed (Chromium + WebKit) — confirms the 1s-longer-lived toast does not intercept any bottom-control tappnpm build— ok