Skip to content

Add design-system form, Modal, and Toast primitives (#1317, #1318, #1319) - #1457

Open
Young850 wants to merge 1 commit into
solutions-plug:mainfrom
Young850:feat/design-system-form-modal-toast
Open

Add design-system form, Modal, and Toast primitives (#1317, #1318, #1319)#1457
Young850 wants to merge 1 commit into
solutions-plug:mainfrom
Young850:feat/design-system-form-modal-toast

Conversation

@Young850

Copy link
Copy Markdown

Summary

None of these paths existed before this change. No existing consumers were migrated to the new primitives — that's out of scope for this PR, which builds the primitives the issues asked for.

Test plan

  • Verified brace/paren balance on all new files via static analysis (no build/test/install commands run)
  • Cross-checked design tokens (--surface-2, --border, --destructive, --radius-sm, etc.) against frontend/src/styles/tokens.css and existing sibling components (components/admin/Form.tsx, components/admin/Modal.tsx, components/Modal.tsx) for visual/API consistency

Closes #1317
Closes #1318
Closes #1319

, solutions-plug#1318, solutions-plug#1319)

solutions-plug#1317: added TextInput.tsx, Select.tsx, and Textarea.tsx under
components/ui/ — self-contained accessible form primitives (own
label/hint/error rendering, aria-invalid/aria-describedby wiring,
forwardRef) so market creation, admin content editing, and the
wallet/bet form can share one validation-state-styled implementation
instead of each rolling their own. Styling follows the existing
inline-style + CSS-token convention already used by
components/admin/Form.tsx's Input/Textarea/Select (the closest prior
art for this pattern in the repo).

solutions-plug#1318: added Modal.tsx under components/ui/, consolidating the two
existing ad-hoc implementations (components/Modal.tsx and
components/admin/Modal.tsx — the former's own header comment notes it
exists only because this shared primitive didn't yet). Combines both:
focus trap + Tab-cycling, Escape-to-close, backdrop click-to-close
(each independently disable-able for confirmation-gated destructive
actions), body-scroll lock while open, and focus restoration on close.

solutions-plug#1319: added Toast.tsx (ToastContainer) and lib/hooks/useToast.ts under
components/ui/ — a module-level toast store with an imperative
`toast.success/error/warning/info(...)` API callable from anywhere
(API mutation handlers included, not just components), rendered by a
single `<ToastContainer />` mounted near the app root. Color tokens
match the existing StatusAlert component's success/error/warning/info
convention.

None of these paths existed before this change; no existing consumers
were migrated to the new primitives (out of scope for this PR — the
issues asked for the primitives themselves).

Closes solutions-plug#1317
Closes solutions-plug#1318
Closes solutions-plug#1319

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014jDDop7frnew1xcCJDSKEw
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@Young850 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant