Skip to content

feat: add @script-development/fs-toast package#9

Merged
Goosterhof merged 1 commit into
mainfrom
fs-toast
Apr 2, 2026
Merged

feat: add @script-development/fs-toast package#9
Goosterhof merged 1 commit into
mainfrom
fs-toast

Conversation

@Goosterhof

Copy link
Copy Markdown
Contributor

Summary

  • New @script-development/fs-toast package — component-agnostic toast queue service for Vue 3
  • Generic factory (createToastService<C>) manages a FIFO queue; consumer provides their own toast component and mounts the container
  • Zero fs-* dependencies — only peer dep is Vue 3.5+
  • 15 tests, 100% coverage, 90% mutation score

Design decisions

  • "Mount it yourself" — returns a ToastContainerComponent the consumer places wherever they want (no global DOM manipulation)
  • No auto-dismiss — timeouts are the component's responsibility via the exposed hide(id) method
  • No HTTP middleware — territory-specific concern, stays local

Package API

const toastService = createToastService(MyToastComponent, 4);
toastService.show({ message: "Saved", variant: "success" });
toastService.hide(id);
// Mount <component :is="toastService.ToastContainerComponent" /> in template

Test plan

  • All 8 CI gates pass (format, lint, build, typecheck, lint:pkg, coverage, mutation)
  • 15 unit tests covering creation, show, hide, FIFO eviction, maxToasts clamping, onClose, isolation
  • 100% line/branch/function/statement coverage
  • 90% mutation score (3 equivalent mutants survived — acceptable)

🤖 Generated with Claude Code

Component-agnostic toast queue service for Vue 3.
Generic factory manages FIFO queue — consumer provides
the toast component, mounts the container, handles dismiss.
Zero fs-* dependencies. Only peer dep is Vue 3.5+.
@Goosterhof Goosterhof merged commit 67ee992 into main Apr 2, 2026
1 check passed
@Goosterhof Goosterhof deleted the fs-toast branch April 2, 2026 11:12
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.

1 participant