Files
honeyDueKMP/iosApp/iosApp/Subviews
Trey t 2baf5484e0 Add task completion history feature and UI improvements
- Add CompletionHistorySheet for viewing task completion history (Android & iOS)
- Update TaskCard and DynamicTaskCard with completion history access
- Add getTaskCompletions API endpoint to TaskApi and APILayer
- Update models (CustomTask, Document, TaskCompletion, User) for Go API alignment
- Improve TaskKanbanView with completion history integration
- Update iOS TaskViewModel with completion history loading

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 12:01:56 -06:00
..
2025-11-05 17:15:17 -06:00

iOS Subviews

This folder contains all reusable SwiftUI view components, organized by feature area. Each file contains exactly one view with its own preview.

📁 Folder Structure

Subviews/
├── Common/          (Shared UI components)
├── Auth/            (Login/Register components)
├── Residence/       (Property-related components)
└── Task/            (Task-related components)

📋 Component List

Common (2 components)

  • ErrorView.swift - Full-screen error display with retry button
  • ErrorMessageView.swift - Inline error message with dismiss button

Auth (2 components)

  • LoginHeader.swift - App logo and title for login screen
  • RegisterHeader.swift - Icon and welcome text for registration

Residence (7 components)

  • SummaryCard.swift - Overview card with property/task statistics
  • SummaryStatView.swift - Individual stat display (icon, value, label)
  • ResidenceCard.swift - Property card with address and task summary
  • TaskStatChip.swift - Small chip showing task count by status
  • EmptyResidencesView.swift - Empty state for no properties
  • PropertyHeaderCard.swift - Detailed property header with address
  • PropertyDetailItem.swift - Small property detail (beds, baths, sqft)

Task (6 components)

  • TaskPill.swift - Small colored pill showing task counts
  • StatusBadge.swift - Task status badge (pending, in progress, etc.)
  • PriorityBadge.swift - Task priority badge (high, medium, low)
  • EmptyTasksView.swift - Empty state for no tasks
  • TaskCard.swift - Full task card with all details and actions
  • TasksSection.swift - Complete tasks section with cancelled tasks

🎨 Preview Support

Every component includes a #Preview for easy testing in Xcode Canvas.

Adding to Xcode Project

IMPORTANT: These files need to be added to the Xcode project to compile.

Steps:

  1. Open iosApp.xcodeproj in Xcode
  2. Right-click the iosApp folder in Project Navigator
  3. Select "Add Files to 'iosApp'..."
  4. Navigate to and select the entire Subviews folder
  5. Make sure:
    • "Create groups" is selected (NOT "Create folder references")
    • "Add to targets: iosApp" is checked
    • "Copy items if needed" is UNchecked
  6. Click "Add"

Verify

Build the project (⌘+B). All 17 subview files should compile successfully.

🗑️ Old Files to Delete

Delete these consolidated files from the root iosApp directory:

  • AuthSubviews.swift
  • CommonSubviews.swift
  • ResidenceSubviews.swift
  • TaskSubviews.swift
  • DELETE_THESE_FILES.txt

These were temporary files and have been replaced by the individual files in this Subviews folder.

📝 Usage

All main views (LoginView, ResidencesListView, ResidenceDetailView, etc.) have already been updated to use these subviews. The components are automatically available once added to the Xcode project.

Example:

import SwiftUI

struct MyView: View {
    var body: some View {
        VStack {
            LoginHeader()  // Automatically available
            ErrorMessageView(message: "Error", onDismiss: {})
        }
    }
}

Total Components: 17 individual view files Total Previews: 17 (one per file) Organization: Feature-based folder structure