ViewsMenu Views

Menu Views

File: Views/Menu/MenuTabView.swift

The main menu browsing view in the Order tab.

Menu Screen

Features

  • Category filter chips: All, Coffee, Tea, Food (horizontal scroll)
  • Search bar: Real-time filtering by name and description
  • Item grid/list: Menu items with name, description, price, stars earned
  • Pull to refresh: Reloads menu data
  • Loading state: Skeleton/progress indicator while loading

Data Flow

  1. MenuViewModel.loadCategories() → category chips
  2. MenuViewModel.loadMenuItems(category:) → filtered item list
  3. Tap item → MenuViewModel.loadItemDetails(id:) → opens ItemDetailSheet

ItemDetailSheet

File: Views/Menu/ItemDetailSheet.swift

A bottom sheet showing full item details with customization options.

Item Detail

Layout

  1. Item image (if available)
  2. Name and description
  3. Base price and stars earned
  4. Modifier groups (each with selection controls):
    • Required groups: Must select (e.g., Size, Milk)
    • Optional groups: Can skip or multi-select (e.g., Extras)
    • Single select: Radio button style
    • Multi select: Checkbox style
  5. Price calculator: Updates live as modifiers change
  6. Quantity selector: +/- buttons
  7. Notes field: Optional special instructions
  8. “Add to Cart” button: Shows total price

Interaction

  • Selecting a modifier updates the displayed price immediately
  • Required groups must have a selection before “Add to Cart” is enabled
  • Adding to cart calls CartViewModel.addItem() and closes the sheet