Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Clickable Food Entries in Nutrition Tracker#871

Merged
ArdaSaygan merged 1 commit intomainfrom
feat/food-entries-clickable
Dec 16, 2025
Merged

Clickable Food Entries in Nutrition Tracker#871
ArdaSaygan merged 1 commit intomainfrom
feat/food-entries-clickable

Conversation

@berkgoktash
Copy link
Copy Markdown
Contributor

@berkgoktash berkgoktash commented Dec 15, 2025

PR: Clickable Food Entries in Nutrition Tracker

Overview

Food entries in the nutrition tracker are now clickable, opening the FoodDetail modal to show complete food information including nutrition score, macros, micronutrients, dietary tags, and allergens.

Changes

Modified Files

File Changes
frontend/src/components/NutritionTracking.tsx Added click handler, FoodDetail import, and modal state

Implementation

  • Added viewingFood and showFoodDetail state variables
  • Added handleViewFoodDetail() function that fetches full food data via search API
  • Made food entry divs clickable with hover effects and keyboard accessibility
  • Integrated FoodDetail modal component

How to Test

  1. Navigate to Nutrition Tracking page
  2. Log some foods or view existing entries
  3. Click on any food entry
  4. FoodDetail modal opens showing full food information including nutrition score

closes #864

@berkgoktash berkgoktash added this to the Final Release milestone Dec 15, 2025
@berkgoktash berkgoktash self-assigned this Dec 15, 2025
@berkgoktash berkgoktash added pri: urgent Highest priority frontend concerns frontend labels Dec 15, 2025
@ArdaSaygan ArdaSaygan merged commit 5e0f630 into main Dec 16, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frontend concerns frontend pri: urgent Highest priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Food Entries should be clickable in the nutrition tracker

2 participants