This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
bundle: new content goes to the spread in view, not to a far-off selection - #12
Merged
Merged
Conversation
…ction A new chart went beside the selection, on the selection's page, and a lowered range went at it, wherever that selection was. The bundle selects everything it places, so the next placement followed the last one: in the editor's showcase the recto's five charts landed on the verso, and a range lowered on page 99 landed on the table selected on page 98. A user who selects a table, scrolls ten pages on and places a chart got it back beside the table, on a page out of view. selectionIsInView: a selection still places new content while it is on the active page's spread, a spread view's other page included; once the view has moved to another spread the active page wins, as InDesign places onto the spread in view. With no active page or no spreadId to compare, the selection counts as before. chartPlacement and placementForContent both use it; with nothing selected the reads are unchanged (perf budgets). 0.1.0-canary.24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
A new chart went beside the selection, on the selection's page, and a lowered range went at it, wherever that selection was. The bundle selects everything it places, so each placement followed the last one.
Where it showed
The rule
selectionIsInView:spreadIdto compare, the selection counts as before.Both
chartPlacementandplacementForContentuse it.Reads: with nothing selected they are unchanged, and the perf budgets pass unchanged. With a selection, the placement adds one
document.metaread. It reads the pages only when the selection is on another page than the active one;chartPlacementalready read them.Tests
chart-placement.spec.ts: four cases forselectionIsInView(same page, no active page, the facing page, another spread, no spread ids).main:object-model.spec.ts,wasm-fresh.spec.tsand onesession-wave9case. My local engine wasm is stale (wasm-freshsays so), so CI's fresh build decides those.Version: 0.1.0-canary.24, with a row in docs/status.md.
🤖 Generated with Claude Code