Skip to content

LRC-MAP-PINS: a hover card for map pins that steps through their photos - #1540

Closed
tyhwer wants to merge 3 commits into
emmertex:mainfrom
tyhwer:map/pin-hover-card
Closed

tyhwer wants to merge 3 commits into
emmertex:mainfrom
tyhwer:map/pin-hover-card

Conversation

@tyhwer

@tyhwer tyhwer commented Nov 27, 2026 •

Copy link
Copy Markdown

Problem

Hovering a pin on Chromaforge's Map shows a picture of its first photo and a count ("5 photos"). The other photos at that pin can't be seen without selecting the pin and looking in the filmstrip, and the preview goes away as soon as the pointer leaves the pin, so nothing on it can be clicked. Lightroom Classic shows a card instead: the photo, its capture date and exposure, and for a pin of several photos "1 of N" with arrows to step through them.

Change

All in crates/ui-egui/src/map/:

  • The card (view.rs): an egui::Area over the map with the photo, its file name, capture time (display_time) and exposure line (exposure_line, as grid cells show it). A pin of several photos gets ‹ "2 of 5" ›; the arrows wrap round at both ends. A click on the photo selects it.
  • Staying open (next_hover_card): the card stays while the pointer is on the pin, on the card or crossing the gap between them, and follows the pin. It closes when the pointer leaves, and while the map is dragged or zoomed or a pin, location or photo drag is under way, as the old preview did.
  • State (mod.rs): MapUi::hover_card, the pin's photos, the one shown, the pin's position and the card's rectangle last frame.
  • It replaces hover_preview; the map:hover widget id stays, so the existing zoom-suppression test still covers it.
  • 1 new format string in every fork catalog ("{i} of {n}"); "Previous", "Next" and "No date" were already translated.

How it was checked

  • cargo xtask ci --quick (all 16 steps) passes on this branch, up to date with main
  • map::tests::a_pin_hover_card_steps_through_the_pins_photos_and_selects_one fails without this change: hovering a pin of three photos opens the card on the first; clicking › (the pointer moves onto the card) keeps it open and shows the second; ‹ twice wraps to the last; a click on the photo selects it; moving away closes it; a pin of one photo has no arrows. zooming_over_a_pin_keeps_zooming_and_suppresses_hover_preview still passes
  • User-visible change: ran the app (demo library) and stepped through a multi-photo pin

Screenshots

Headless renders of the demo library on a plain tile server (attached below): (1) the card over a pin of three photos: photo, file name, capture time, exposure, ‹ 1 of 3 ›; (2) after › : the second photo, 2 of 3.

4a-hover-card-1-of-3 4b-hover-card-after-next-2-of-3

Merging

  • Overlap: none found among open pull requests. Companion Map pull requests add a MapUi field next to hover_card, append to map/tests.rs and edit the same manual lines; keep both
  • Existing edits and libraries: unchanged; no catalog or format change
  • Shared numbers taken: none
  • Where it came from: own design, behaviour modelled on Lightroom Classic's Map module (observed, no assets)
  • New dependencies, unsafe, build scripts, network access, spawned processes, deleted files, CI or xtask gate changes: none

Checklist

  • No new panic path in non-test code
  • New text on screen goes through tr() / tr_format! with its key in every fork catalog; no new shortcut
  • docs/parity-checklist.md LRC-MAP-PINS updated (stays ✅)
  • Manual updated (library/map.mdx, output/map.mdx), What's New and changelog entries added
  • New code has a caller
  • No new assets
  • Ready to merge

🤖 Generated with Claude Code

As in Lightroom Classic, hovering a pin opens a card with the photo, its file
name, capture time and exposure line; a pin of several photos gets "1 of N"
with arrows that step through them, rounding the ends. The card is an
egui Area, so it takes clicks: it stays while the pointer is on the pin, the
card or the gap between them, follows the pin and closes when the pointer
leaves, the map is dragged or zoomed, or a drag is under way. A click on the
photo selects it. It replaces the thumbnail-and-count preview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@emmertex emmertex left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and it reads sound (CI was green), but it now conflicts with main after #1538 landed (map/tests.rs appends, map manual pages). Please merge origin/main; note #1540 and #1541 also touch the same spots (MapUi fields, end of map/tests.rs, map.mdx lines), so whichever lands second will need one more merge. I'll approve and merge on a later pass once the new head is green.

# Conflicts:
#	crates/ui-egui/src/map/tests.rs
@emmertex
emmertex enabled auto-merge November 27, 2026 05:39
auto-merge was automatically disabled November 27, 2026 05:42

Head branch was pushed to by a user without write access

@tyhwer

tyhwer commented Nov 27, 2026

Copy link
Copy Markdown
Author

Merged origin/main. The only conflict was the map/tests.rs appends (main's file is kept as is, with this branch's test after it); the manual and parity lines merged cleanly. cargo xtask ci --quick passes on the new head. Whichever of #1540 and #1541 lands second will need one more merge, as you said; I can do that as soon as the first one lands.

@emmertex

Copy link
Copy Markdown
Owner

Reviewed earlier and CI is green, but #1539 just merged and this branch now conflicts with main. Please merge main and push; I'll approve and merge on the next run if CI stays green.

# Conflicts:
#	crates/ui-egui/src/map/tests.rs
@tyhwer

tyhwer commented Nov 27, 2026

Copy link
Copy Markdown
Author

Merged main again after #1539 (the same map/tests.rs append conflict, resolved the same way); cargo xtask ci --quick passes on the new head.

@tyhwer

tyhwer commented Nov 27, 2026

Copy link
Copy Markdown
Author

This change landed on main through #1547 (merged 2026-11-27 09:04 UTC), which merged an earlier head of this branch with the conflicts resolved. GitHub still shows this PR as open because of the later main-merge push here, so it can be closed.

@emmertex emmertex closed this Nov 27, 2026
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