Skip to content

feat(mobile): migrate Result, Herd, Analytics and Scan to iOS HIG ios tokens#34

Merged
Tcordeir0 merged 4 commits into
mainfrom
feature/migrate-result-herd-analytics-scan
Jun 1, 2026
Merged

feat(mobile): migrate Result, Herd, Analytics and Scan to iOS HIG ios tokens#34
Tcordeir0 merged 4 commits into
mainfrom
feature/migrate-result-herd-analytics-scan

Conversation

@Tcordeir0

@Tcordeir0 Tcordeir0 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Completes the Liquid Health migration. Settings landed in #25; this PR finishes the remaining four screens: Result, Herd, Analytics, Scan. Marked ready for review — all four commits are in.

Strictly additive theme changes from PR #22 (the ios.* namespace). Zero behavioural changes to scan data, storage, navigation, or camera logic.

Progress

Screen Status Commit
Result ✅ Done abb7ef8
Herd ✅ Done 3acfb30
Analytics ✅ Done d87cd86
Scan ✅ Done fe98b99

What changed per screen

Result (abb7ef8)

  • Inline navigation bar (back chevron, animal id as title, share trailing) replacing the custom header — push-view convention, not a large title
  • Demo banner restyled as iOS info strip (amber paper, single line, cloud-offline glyph)
  • Image preview inset 16pt with 18pt corner radius, overlay toggle as translucent black pill
  • Hero card insetGrouped with eyebrow + System rounded 56pt weight, kg unit, sage confidence bar, accuracy note as footer
  • Detection and Measurements sections rendered as native iOS rows (hairline separators), replacing the MetricCard grid
  • Captured-at timestamp moved to the section footer of Measurements
  • Primary New scan in label-black, secondary View herd inline in sage

Herd (3acfb30)

  • Large title Herd with dynamic subtitle showing record count or filter ratio (5 of 23 when searching)
  • Trailing + button in sage navigating to Scan (Notes / Reminders convention)
  • iOS-native search field (light grey rounded inset, clear button while editing, returnKeyType search)
  • Records grouped into three temporal sections (Today / This week / Earlier) via startOfDay bucket
  • Rows in insetGrouped cards with paw (real) or cube outline (demo) tile, ID, breed + timestamp meta, weight in System rounded, chevron
  • Long-press on a row opens a destructive Alert — trash icon dropped (more iOS-native)
  • Empty state distinguishes No matches (filtered) from No scans yet
  • Footer hint teaches the long-press gesture

Analytics (d87cd86)

  • Large title Analytics with dynamic subtitle (23 scans · all time or No data yet)
  • Hero card insetGrouped: mean live weight in System rounded 56pt, range + avg confidence as caption, 3 inline tiles (scans, real animals, breeds)
  • Activity section renders Last 7 days as an SVG bar chart in sage — rounded bars, count labels above non-zero, day letters as x-axis ticks, hairline baseline. Width recomputed via onLayout for responsive scaling
  • Mean weight by breed section uses iOS-style horizontal progress bars (track + sage fill)
  • Summary as native iOS rows (max, min, mean confidence, real/total) with footer caption about local-data scope
  • Uses existing react-native-svg (already a project dependency — no new libs)

Scan (fe98b99)

  • Permission gate: sage circle icon + iOS title bold + descriptive copy + label-black primary Allow camera access + sage secondary Back
  • Top bar over camera: black translucent close pill, animal id + breed centered, flip camera trailing
  • Viewfinder corners switched from Tailwind emerald to sage and slightly larger for thumb visibility. Hint pill Frame the animal from the side, fully visible below the frame
  • Bottom controls evenly spaced: Library | 76pt capture (white ring + white inner) | Edit ID. Spinner in sage during processing
  • Pre-scan modal as iOS bottom sheet: drag handle, New scan + subtle subtitle, Animal section (row ID input), Breed section (horizontal sage chips for 7 Portuguese breeds), Open camera primary in label-black, Cancel inline sage
  • Processing overlay card uses iOS HIG card pattern with Processing header and 4 pipeline rows in English
  • Camera, haptics, image picker, storage and navigation logic untouched

Out of scope (separate follow-ups)

  • Replace Ionicons with SF Symbols via expo-symbols
  • Downgrade @expo/vector-icons to the SDK 54-compatible version (or migrate to expo-symbols)
  • Dark mode (everything stays light-first)
  • SF Pro Rounded via expo-font
  • Tab bar label localisation (currently mixed PT/EN)
  • Delete the MetricCard shared component (no longer used by Result after this PR)

Test plan

All four screens already tested end-to-end on iPhone via Expo Go during development per the test-before-commit convention:

  • npx expo start --clear produces a working bundle
  • Each screen opens in Expo Go on iPhone — verified to match Liquid Health DNA established in Home + Settings (background grouped, inset cards, sage accent, hairlines, iOS row patterns)
  • Navigation in/out of each screen works
  • Visual comparison against the previous version on each commit

Ready for review.

Tcordeir0 added 4 commits June 1, 2026 16:04
Continues the Liquid Health migration started in #22 and #25.

- Inline navigation bar (back chevron, animal id as title, share
  trailing) replacing the custom header. Push view convention,
  not a large title.
- Demo banner restyled as an iOS info strip (amber paper, single
  line, cloud-offline glyph) instead of the previous bordered
  warning bar.
- Image preview inset 16pt with 18pt corner radius, overlay toggle
  rendered as a translucent black pill.
- Hero card insetGrouped with eyebrow + System rounded 56pt weight
  value, kg unit, confidence bar in sage, accuracy note as footer
  caption.
- Detection and Measurements sections rendered as native iOS rows
  with hairline separators, replacing the MetricCard grid for
  visual consistency with Settings and Home.
- Captured-at timestamp moved to the section footer of Measurements.
- Primary action New scan in label-black, secondary View herd inline
  in sage, replacing the side by side button row.
- Copy translated to English for codebase consistency.

No changes to navigation, storage, or scan data shape.
Continues the Liquid Health migration.

- Large title Herd with a dynamic subtitle showing record count
  or filter ratio (5 of 23 when searching)
- Trailing plus button in sage accent navigating to Scan, matching
  Apple Notes / Reminders / Mail convention
- iOS native search field (light grey rounded inset, clear button
  while editing, returnKeyType search) replacing the bordered
  custom input
- Records grouped into three temporal sections (Today / This week
  / Earlier) using a startOfDay bucket
- Rows in insetGrouped cards with paw icon (real) or cube outline
  (demo) tile, animal id, breed and timestamp meta in iOS style,
  weight in System rounded, chevron
- Long-press on a row opens a destructive Alert sheet to remove
  the scan, matching native iOS list pattern; trash icon dropped
- Empty state distinguishes No matches (with active filter) from
  No scans yet (cold start) with copy guidance
- Footer hint Long-press a row to remove it. teaches the gesture
- Copy in English for codebase consistency

No changes to navigation, storage shape, or scan data flow.
Continues the Liquid Health migration with a chart-aware redesign.

- Large title Analytics with a dynamic subtitle showing total
  scans or No data yet on cold start
- Hero card insetGrouped with mean live weight in System rounded
  56pt, range and average confidence as meta caption, and three
  inline tiles (scans, real animals, breeds) sharing the same card
- Activity section renders Last 7 days as an SVG bar chart in
  sage with rounded bars, count labels above non-zero bars, day
  letters as the x-axis ticks, and a hairline baseline. Chart
  width is recomputed via onLayout so it scales to any viewport.
- Mean weight by breed section uses iOS-style horizontal progress
  bars (track + sage fill) with breed label, sample count in
  tertiary, and mean weight in System rounded
- Summary section as native iOS rows (max, min, mean confidence,
  real animals ratio) with hairline separators and a footer
  caption explaining the local-data scope
- Empty state redesigned with copy that points the user toward
  the scan flow
- Copy in English for codebase consistency

Uses the existing react-native-svg dependency for charts, no new
libraries added.
Completes the Liquid Health migration. Camera capture flow, haptics,
image picker, storage and navigation are untouched. Only the chrome
is redesigned around ios tokens.

- Permission gate uses a sage iconography card, label black primary
  Allow camera access, sage secondary Back, instead of the previous
  bare warning layout
- Top bar over the camera: black translucent close pill, animal id
  and breed label centered, flip camera trailing
- Viewfinder corners switched from tailwind emerald to sage and
  bumped slightly for thumb visibility. Frame the animal from the
  side hint moved into a black translucent pill below the frame
- Bottom controls evenly spaced as Library, 76pt capture button
  (white ring + white inner), Edit ID. Spinner during processing
  uses sage
- Pre-scan modal redesigned as an iOS bottom sheet: drag handle,
  New scan title with subtle subtitle, Animal section with row
  ID input, Breed section with horizontal sage chips for seven
  Portuguese breeds (Unspecified, Minhota, Alentejana, Barrosa,
  Maronesa, Cachena, Mirandesa). Open camera primary in label black,
  Cancel inline in sage
- Processing overlay card uses iOS HIG card pattern with Processing
  header and four pipeline rows (Detecting animal, Segmenting
  contour, Extracting measurements, Estimating weight) in English
- All user-facing copy in English for codebase consistency

Camera logic and dependencies are unchanged: expo-camera,
expo-image-picker, expo-haptics. No new dependencies.
@Tcordeir0 Tcordeir0 marked this pull request as ready for review June 1, 2026 15:20
@Tcordeir0 Tcordeir0 requested a review from nicole-gomes June 1, 2026 15:21
@Tcordeir0 Tcordeir0 self-assigned this Jun 1, 2026
@Tcordeir0 Tcordeir0 added the feat label Jun 1, 2026
@Tcordeir0 Tcordeir0 merged commit d3830ca into main Jun 1, 2026
7 checks passed
@Tcordeir0 Tcordeir0 deleted the feature/migrate-result-herd-analytics-scan branch June 1, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants