Skip to content

feat: implement emoji icon picker for goals#141

Open
HarikaPokalakari wants to merge 1 commit intofencer-so:mainfrom
HarikaPokalakari:feature/add-goal-icon
Open

feat: implement emoji icon picker for goals#141
HarikaPokalakari wants to merge 1 commit intofencer-so:mainfrom
HarikaPokalakari:feature/add-goal-icon

Conversation

@HarikaPokalakari
Copy link
Copy Markdown

Summary

Implemented emoji icon picker feature
allowing users to add, change and remove
icons on their savings goals.

Changes Made

src/api/types.ts

  • Added icon field to Goal interface:
    icon: string | null

src/api/lib.ts

  • Added updateGoal PUT request function
  • Connects frontend to backend for
    persistent icon storage

src/ui/pages/Main/goals/GoalCard.tsx

  • Added Icon styled component
  • Displays emoji icon on each goal card

src/ui/features/goalmanager/GoalManager.tsx

  • Added icon and emojiPickerIsOpen state
  • Added addIconOnClick function
  • Added pickEmojiOnClick function
  • Added deleteIconOnClick function
  • Added EmojiPicker component
  • Added GoalIcon component
  • Icons persist after page refresh ✅

New Files

  • src/ui/components/EmojiPicker.tsx
    Reusable emoji picker using emoji-mart
  • src/ui/features/goalmanager/GoalIcon.tsx
    Displays goal icon with click handler

How to Test

  1. npm run start
  2. Click any goal card
  3. Click smile icon → emoji picker appears
  4. Pick any emoji → shows on goal card ✅
  5. Refresh page → emoji still showing ✅
  6. Click icon → change emoji ✅
  7. Click Remove icon → icon deleted ✅

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