Skip to content

feat(history): expandable cards for multiple location results - #26

Merged
neteinstein merged 1 commit into
mainfrom
copilot/make-results-cell-expandable
Jul 25, 2026
Merged

feat(history): expandable cards for multiple location results#26
neteinstein merged 1 commit into
mainfrom
copilot/make-results-cell-expandable

Conversation

Copilot AI commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

History entries already stored all ranked locations but the UI only surfaced the top result with a static "+N more" label. This makes cards with multiple locations expandable so every result is accessible with its own Maps CTA.

Changes

feature:history — UI

  • Extracted LocationRow composable: place icon + name/address + "Open in Google Maps" button — reused for every location slot
  • HistoryEntryCard gains expanded state via rememberSaveable(entry.id) (survives scroll/recomposition)
    • 1 location: unchanged layout
    • 2+ locations: top location always visible; TextButton with chevron toggles AnimatedVisibility over remaining entries, each separated by HorizontalDivider and with its own Maps button

Strings (EN + PT)

  • history_more_locations: "+%1$d more""Show %1$d more" (action-oriented)
  • Added history_show_less: "Show less" / "Mostrar menos"

No data-layer changes — ProcessSharedUrlWorker already maps the full List<ResolvedLocation>List<HistoryLocation> when recording history.

- Extract LocationRow composable (name + address + Maps button)
- HistoryEntryCard shows top location + animated expand/collapse
  for additional locations when entry.locations.size > 1
- Uses rememberSaveable(entry.id) so state survives recomposition
- Update EN/PT strings: 'history_more_locations' → 'Show N more',
  add 'history_show_less'
@neteinstein
neteinstein marked this pull request as ready for review July 25, 2026 22:21
@neteinstein
neteinstein merged commit 88fe02f into main Jul 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants