Skip to content

Feat/notification toast system - #479

Open
Jumongweb wants to merge 12 commits into
Bitcoindefi:mainfrom
Jumongweb:feat/notification-toast-system
Open

Feat/notification toast system#479
Jumongweb wants to merge 12 commits into
Bitcoindefi:mainfrom
Jumongweb:feat/notification-toast-system

Conversation

@Jumongweb

Copy link
Copy Markdown

Adds in-app toast notifications for XP level-ups and quest completions, giving users immediate feedback when progression events occur.
Closes #197

Changes
Added a NotificationProvider and useNotifications() hook with a public push() method.
Wrapped the application with NotificationProvider.
Added automatic level-up notifications:Level up! You're now Level N

Added automatic quest-completion notifications:Quest complete: [Quest Name] (+N XP)

Added a custom toast queue with no external notification library.
Displays up to three notifications in the top-right corner.
Queues additional notifications and promotes them as visible toasts dismiss.
Automatically dismisses each visible toast after four seconds.
Added CSS-based entrance transitions.
Added tests for event-to-toast conversion and five-toast queue behavior.
Testing
Verified five simultaneous notifications result in three visible toasts and two queued toasts.
Verified queued notifications are promoted after dismissal.
Verified level-up events create the expected notification.
Verified XP awards that do not cross a level boundary do not create level-up notifications.
Verified quest-completion events include the quest name and XP reward.
Notes
The project uses Vitest rather than Jest, so the requested queue test is implemented with Vitest while covering the same acceptance criteria.

@sonarqubecloud

Copy link
Copy Markdown

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.

Notifications: in-app toast alerts for XP gains and quest completions

1 participant