Repository navigation
0.1.0-beta.20: pin another feature's card in place - #37
Merged
Merged
Conversation
…from a kept card action
…d in place on the new shape
…o-op; README test covers pin
…used row's drawn place
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.
0.1.0-beta.20: a host can open another feature's card in place from a button inside a pinned card, with no camera pan and without releasing a held lens. Also: a hover lens's section card shows its tooltip body,legendDisplayon shapes, and the legend's unavailable row.Spec:
docs/superpowers/specs/2026-11-17-pin-in-place-design.md(with its addenda). Plan:docs/superpowers/plans/2026-11-17-pin-in-place.md.New API
MapContext.pin(pluginId, refKey): booleanpins a listed feature's card from host code (a section card's "In township"). It replaces the open card and stays exactly where that card was when that point lies on the new feature's shape (pinned.inPlace); otherwise it goes to the feature's point in view. No camera move, no list focus, no selection change, nofeatureclick. Returnsfalsewhilecardis off, for a plugin not on the map or withhoverable: false, or for an unlisted feature. Pinning the feature already pinned changes nothing.MapPlugin.itemFor(refKey)(optional): the item for a feature a plugin draws but doesn't list.shapesLenssets it.legendDisplay?: "gradient" | "blocks"onshapesPluginandshapesLens, as onpointsPlugin.DataStatusunavailablegains an optional, already-translatedmessage. New message keymapsdk_unavailable_line.Behaviour
shapesLens: a hover lens held by a section's or notice's card stays held when the card is swapped for its centre township's, for as long as that card is open. A township's card pinned any other way (list focus, a tap) still doesn't hold it.shapesLens: a drawn section's tooltip and pinned card show the lens'stooltipbody under a hover lens too (until beta.19, only the name and the card's actions). They sit at the section's point in view, as a listed shape's do. The list still lists sections only while the lens is pinned.pinfrom elsewhere, or after anawait, leaves focus alone.messageor "Isn't available right now", then the plugin'slegendNote(hidden until now). Every unavailable row gains the heading; error rows are unchanged.Hosts that set nothing see no change, apart from the legend's new heading on unavailable rows.
Checks
check,lint,npm test(1307),test:bundle,test:licenses, and e2e on Chromium and Firefox (86) pass locally.taskset -c 0,1).