Skip to content

Add support for goal icons via emoji picker#179

Open
anshikasri8304 wants to merge 1 commit into
fencer-so:mainfrom
anshikasri8304:feature/goal-icons
Open

Add support for goal icons via emoji picker#179
anshikasri8304 wants to merge 1 commit into
fencer-so:mainfrom
anshikasri8304:feature/goal-icons

Conversation

@anshikasri8304

Copy link
Copy Markdown

Summary

Adds the ability for users to add and change an icon (emoji) on their goals, with changes persisting via the backend.

Changes

  • Added optional icon field to the Goal model (src/api/types.ts)
  • GoalCard now displays the goal's icon when one is set
  • GoalManager integrates the emoji-mart picker (v3.0.1):
    • Shows an "Add icon" button when no icon is set
    • Shows the current icon (click to change it) when one is set
  • pickEmojiOnClick updates Redux state and calls the updateGoal PUT request, so icon changes persist after a client refresh

Testing

Verified via Postman that PUT requests to /api/Goal/{goalId} with an updated icon persist correctly and are reflected after a client refresh.

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