Optimized data type detail views by replacing table-heavy layouts with graphics-based visual indicators. Emphasis on deduplication, symbol-driven transitions, and evolution visualization rather than textual data rows.
Views/DataTypes/MetricComparisonCard.swift)Visual metric comparison between current and previous snapshot with: - Side-by-side value boxes for "Now" vs "Before" - Delta indicator with directional arrow (↑ ↓ -) - Percentage change display - Color-coded severity badge - Deduplicates textual row-based comparison
Views/DataTypes/TypeEvolutionTimeline.swift)Timeline visualization across multiple snapshots showing: - Bar chart of count evolution over time - Current snapshot highlighted - Vertical connectors showing increase/decrease transitions (▲ ▼) - Compact stats row (Min/Max/Latest) - Deduplicates redundant date/count rows
Views/DataTypes/RecordChangeIndicator.swift)Visual record change summary with: - Two interactive buttons: "Added" (green) and "Gone" (red) - Percentage breakdowns - Stacked progress bar visualization - Navigates to detail lists on tap - More compact than section-based rows
Views/DataTypes/DataTypeRangeIndicator.swift)Data range visualization showing: - Earliest and latest date with calendar icons - Day span counter in center - Gradient timeline bar - Quality badge for incomplete captures - Single card replaces 3 rows (Earliest, Latest, Quality)
DataTypeSnapshotDetailView (Snapshots folder)Before:
- List-based layout with 8+ sections
- summarySection: repeated count values in rows
- rangeSection: 2 separate date rows + quality row
- changeSummarySection: 5 rows of comparison data
- recordNavigationSection: navigation links as rows
After:
- ScrollView with VStack layout
- Uses 4 optimized components:
- MetricComparisonCard (replaces summary + comparison rows)
- TypeEvolutionTimeline (replaces implicit count history)
- DataTypeRangeIndicator (replaces 3 date/quality rows)
- RecordChangeIndicator (replaces navigation rows)
- 220 lines removed (40% reduction)
- Empty state graphics instead of generic text
DataTypesView (DataTypes folder)Before:
- TypeDiffRow: dense text-only row
- Stacked metrics with labels and values
- Hard to scan visually
- Minimal visual hierarchy
After:
- Enhanced TypeDiffRow with:
- Color-coded metric boxes (Now / Before)
- Directional delta indicator (↑ green, ↓ red, - gray, ✨ new)
- Severity badge on same row
- Better visual rhythm and scanability
- Added navigation to detail view
- Compact metrics display with proper typography hierarchy
| File | Change | Impact |
|---|---|---|
DataTypeSnapshotDetailView.swift |
Replaced List + sections with ScrollView + cards | -220 lines, more visual |
DataTypesView.swift |
Enhanced row design + navigation | Better scannability |
MetricComparisonCard.swift |
NEW | Shows current vs previous at a glance |
TypeEvolutionTimeline.swift |
NEW | Visualizes count trends over time |
RecordChangeIndicator.swift |
NEW | Visual record diff summary |
DataTypeRangeIndicator.swift |
NEW | Compact date range + quality display |
MetricComparisonCard preview renders in Light/Dark modesTypeEvolutionTimeline handles 2+ snapshots correctlyRecordChangeIndicator buttons navigate to record listsDataTypeRangeIndicator shows complete state with/without datesDataTypeSnapshotDetailView displays all 4 cards in correct order