mirror of
https://github.com/hiaaryan/sileo.git
synced 2026-04-26 23:45:50 +03:00
[GH-ISSUE #17] [Bug] SVG <rect> receives negative height during toast collapse (hover expand/collapse) #14
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sileo#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @jusolo on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/hiaaryan/sileo/issues/17
Originally assigned to: @hiaaryan on GitHub.
Using sileo@0.1.1, toast collapse can emit SVG errors in console:
Error: attribute height: A negative value is not valid.
This happens after hover expand/collapse cycles (dynamic-island behavior), especially when moving the cursor in/out quickly.
Observed behavior:
UI mostly keeps working, but console gets flooded with errors.
Error appears at the end of collapse animation.
Reproducible with toasts that have description (expandable content).
Likely cause:
Body rect animates with spring to height: 0.
Spring overshoot occasionally generates tiny negative values (e.g. -0.07px).
SVG cannot be negative.
Current local workaround:
Change collapsed target from 0 to 0.5.
Use spring on expand, but tween/easeOut on collapse.
Suggested fix upstream:
Clamp animated height to >= 0 before rendering.
Or avoid spring overshoot on collapse.
Keep spring for expansion only.
Minimal repro:
Render with default options.
Trigger toast with description.
Hover to expand, then move cursor out repeatedly.
Check console for negative errors.
sileo-negative-rect-height-fix.md
@hiaaryan commented on GitHub (Feb 17, 2026):
fixed in v0.1.2