Skip to content

[Feature] Add a global toast/notification system replacing ad-hoc inline error messages #38

Description

@grantfox-oss

Getting Started

  1. Fork the repository: https://github.com/JointSave-org/Joint_Save
  2. Clone your fork:
   git clone https://github.com/<your-username>/Joint_Save.git
   cd Joint_Save
  1. Create a new branch:
   git checkout -b feat/global-toast-system

Overview

The project has a toast.tsx, toaster.tsx, and use-toast.ts already scaffolded under components/ui/, but several components (group-actions.tsx, the create-group forms) currently render error and success messages as inline <div> blocks with manually managed local state, rather than using the existing toast system. This is inconsistent and means errors can be missed if they scroll out of view.

Requirements

Audit and Migration

  • Audit group-actions.tsx, flexible-form.tsx, rotational-form.tsx, target-form.tsx, and create-group.tsx for inline success/error message rendering
  • Replace all of them with calls to the existing useToast() hook from hooks/use-toast.ts
  • Standardize toast variants: success, error, info, warning — verify toast.tsx supports distinct visual styling for each (add if missing)

Consistency Rules

  • All blockchain transaction outcomes (success/failure) must use toasts, never inline divs
  • Form validation errors (e.g., "amount must be greater than 0") can remain inline next to the relevant field, but submission-level errors (network failure, contract rejection) must use toasts
  • Toasts for transaction confirmations should include a "View on Explorer" action button linking to the Stellar Expert transaction page

Acceptance Criteria

  • No remaining inline success/error <div> blocks for transaction outcomes in the audited components
  • All 4 toast variants render with visually distinct styling
  • Transaction success toasts include a working "View on Explorer" link
  • Toasts auto-dismiss after a reasonable duration (5-7 seconds) except errors, which require manual dismissal
  • No regression in existing form validation UX

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSOfficial CampaignCampaign: Official CampaignfeatureNew functionality to addgood first issueGood for newcomersmedium-complexityNot too complex, Few files and some planning needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions