Skip to content

feat(ui): replace mock nudges with categorized JSON data#27

Merged
emypeeler merged 1 commit intomasterfrom
26-replace-nudges
Feb 7, 2026
Merged

feat(ui): replace mock nudges with categorized JSON data#27
emypeeler merged 1 commit intomasterfrom
26-replace-nudges

Conversation

@emypeeler
Copy link
Contributor

Summary

This PR replaces the hardcoded mock nudges with a comprehensive categorized dataset from JSON, improving the variety and organization of nudges displayed to users.

Changes

  • Added assets/Nudge_Language_Categorized_Updated.json - New dataset containing 40+ categorized nudges with themes (Regret, Financial, Environmental, Mindfulness) and types (Call to action, Statistic, Question, Statement)
  • Updated components/Nudge.tsx - Replaced MOCK_NUDGES array with import from JSON file, added width styling for better text display
  • Updated style.css - Improved text wrapping with word-wrap and overflow-wrap properties, increased line-height from 1.4 to 1.5
  • Updated guide-style.md - Formatting improvements (Prettier)

Testing Notes

  • Linting passed (npm run lint)
  • Formatting applied (npm run format)
  • Component functionality verified - nudges are randomly selected from the new dataset

Breaking Changes

None - This is a drop-in replacement that maintains the same component interface.

Labels

  • type:feature
  • area:ui

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@emypeeler emypeeler linked an issue Feb 7, 2026 that may be closed by this pull request
@emypeeler emypeeler merged commit 7388cb9 into master Feb 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace hardcoded nudges in Nudge.tsx with JSON file from assets folder

1 participant