Skip to content

Frontend: favourites UI #1146

Open
Open

Description

@dgee2

Goal

Add a favourite toggle to the recipe detail page and list cards.

Spec reference

docs/specs/recipe-creation-target-architecture.md — §"Frontend target architecture"

Implementation notes

  • Favourite toggle button (heart icon) on RecipeDetailPage.vue and recipe list/search result cards
  • useFavorite(recipeId) composable wrapping PUT/DELETE /api/recipe/{recipeId}/favorite
  • Optimistic UI update with error rollback
  • Regenerate OpenAPI types: pnpm generate-openapi

Acceptance criteria

  • Toggle button state reflects current favourite status
  • Clicking toggles and calls correct endpoint

Testing

  • Vitest: useFavorite composable (add, remove, optimistic update)

Part of#1105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjavascriptPull requests that update Javascript code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions