feat(ui): image map current-image marker, focal-point zoom, auto-recenter - #40
Open
lstein wants to merge 1 commit into
Open
feat(ui): image map current-image marker, focal-point zoom, auto-recenter#40lstein wants to merge 1 commit into
lstein wants to merge 1 commit into
Conversation
lstein
marked this pull request as draft
August 2, 2026 22:23
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 2, 2026 22:38
e01c3ee to
3a5662d
Compare
lstein
force-pushed
the
feat/image-map-06-floating
branch
from
August 3, 2026 01:38
035de15 to
d36b46d
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 3, 2026 01:38
3a5662d to
84be196
Compare
lstein
force-pushed
the
feat/image-map-06-floating
branch
from
August 3, 2026 02:26
d36b46d to
0a64ade
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
2 times, most recently
from
August 3, 2026 18:19
7960b81 to
f15c9c5
Compare
lstein
marked this pull request as ready for review
August 3, 2026 18:28
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 4, 2026 01:43
f15c9c5 to
e55f4db
Compare
lstein
force-pushed
the
feat/image-map-06-floating
branch
2 times, most recently
from
August 4, 2026 05:37
a58e9c7 to
d7e56a7
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 4, 2026 05:37
e55f4db to
3545b1f
Compare
lstein
force-pushed
the
feat/image-map-06-floating
branch
from
August 4, 2026 14:58
d7e56a7 to
925649a
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
2 times, most recently
from
August 4, 2026 22:32
343998e to
cc30d46
Compare
lstein
force-pushed
the
feat/image-map-06-floating
branch
2 times, most recently
from
August 5, 2026 00:31
08aa934 to
ef19bf0
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 00:31
cc30d46 to
16273bb
Compare
lstein
force-pushed
the
feat/image-map-06-floating
branch
from
August 5, 2026 00:38
ef19bf0 to
8666f99
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 00:38
16273bb to
aae9670
Compare
lstein
force-pushed
the
feat/image-map-06-floating
branch
from
August 5, 2026 01:18
8666f99 to
dc89f69
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 01:18
aae9670 to
640ce5a
Compare
…nter
Ports PhotoMapAI's interaction core to the Image Map widget:
- The gold "Current Image" target now tracks the gallery selection live:
selecting anywhere (gallery grid, arrows, the map itself) restyles just
the single-point marker trace, and when the marker drifts within 10% of
a viewport edge the view recenters on it, preserving the zoom width.
Selections that originate from a map click never recenter the map under
the user's cursor.
- Custom focal-point wheel zoom and two-finger pinch (exp gain, ctrl+wheel
treated as trackpad pinch), replacing plotly's scrollZoom for its
long-standing Safari issues. Pinch-end synthetic clicks are suppressed.
- Initial view fits the 1st-99th percentile of coordinates so a few
outliers cannot dwarf the map; `uirevision` preserves the user's pan and
zoom across data refreshes.
All viewport math (percentile ranges, focal-invariant zoom, width-
preserving recenter) lives in a pure module with unit tests; the plotly
host only glues events to it.
Amended during the rebase onto the re-architected webv2:
- The current-selection accessor now comes from the gallery feature's
public interface: `getSelectedGalleryImageFromValues` is imported from
`@features/gallery/contracts` (the same helper PreviewWidgetView uses)
instead of the old `@workbench/image-actions/selectedImage`. It resolves
main's mixed image/video `GalleryItem` selection and already returns
images only, so a video selection simply clears the gold marker.
- `useWidgetValuesSelector('gallery', ...)` from @workbench/
WorkbenchContext is unchanged and keeps feeding the selector; the
map-click suppression handshake with useSelectMapImage still matches by
image name, which survives the GalleryItem round-trip.
- performance/architecture-baseline.json reformatted (one array collapsed
to a single line) to satisfy oxfmt; the drift came in with the earlier
ported baselines. No baseline values changed and the build-time
performance check passes without a recapture — all new code lands in
the lazy plotly widget chunk.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lstein
force-pushed
the
feat/image-map-06-floating
branch
from
August 5, 2026 01:21
dc89f69 to
b3136de
Compare
lstein
force-pushed
the
feat/image-map-07-marker-zoom
branch
from
August 5, 2026 01:21
640ce5a to
d36dbbb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 7 of the Image Map stack — PhotoMapAI's interaction core:
hoverinfo: 'skip'so it never shadows the point beneath it for clicks/hovers.scrollZoom(Safari issues). Coincident-touch pinch starts and zero/negative zoom factors are guarded; pinch-end synthetic clicks are suppressed including held-still pinches.Plotly.react— verified against the bundled plotly source thatuirevisionalone does not preserve ranges set via the publicrelayoutAPI. Percentile ranges (1st–99th) seed only the very first render.An adversarial review of this diff was run (it verified plotly semantics against the bundled source); all five findings — the false uirevision contract, the suppression-ref protocol breaks, pinch collapse, held-pinch click leak, and unhandled rejections — are fixed above, with tightened exact-value tests for the zoom math.
Testing
Pure viewport math fully unit-tested (percentiles incl. outliers/degenerate inputs, focal-invariant zoom + inverse property, exact wheel gains, non-positive factor clamp, width-preserving recenter, pad band). 907-test suite + lint + build pass at the stack top.
🤖 Generated with Claude Code