BL-16822 Extract the canvas control menu rendering from the canvas component - #8318
Draft
hatton wants to merge 1 commit into
Draft
BL-16822 Extract the canvas control menu rendering from the canvas component#8318hatton wants to merge 1 commit into
hatton wants to merge 1 commit into
Conversation
This was referenced Sep 7, 2026
…mponent CanvasElementContextControls owned both the decision of which controls to show and the rendering of the menu that shows them. Inline (Word-style) images need the second without the first: the picture's menu is the canvas element menu, item for item, but the picture is not a canvas element and the canvas element manager knows nothing about it. So the rendering moves to its own module, canvasControlMenuRendering.tsx, and the canvas component calls it. No behaviour changes and no inline-image code appears here; this is the seam the rest of the stack builds on. Two small things the same need turned up: - getImageContainer treated an element whose img is a direct child, with no bloom-imageContainer, as having no container. That is the shape of a legacy image and of an inline image, and it is already the fallback buildCanvasElementControlRegistryContext uses for hasImage, so the two now agree. - IControlContext gains an optional deleteThisObject, for an object that is not a canvas element and whose deletion means more than removing one element. Left out, Delete removes the page's active canvas element as it always has. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014DCBGajN5YyAYPBenEf1yy
hatton
force-pushed
the
BL-16822-inline-1-menu-refactor
branch
from
September 7, 2026 19:41
c3c2161 to
c39d126
Compare
hatton
commented
Sep 7, 2026
hatton
commented
Sep 7, 2026
Member
Author
|
[Claude Opus 5 (1M context) from Hatton's machine during devin-review] Consulted Devin on 2026-09-07 12:46 MDT up to commit It raised 2 things. Each has its own review thread with the reasoning and the outcome; in short:
The fixes were amended into this branch after the review, so the commit above is not the current head; a fresh review is running against the new one. The only GitHub check on this PR is |
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.
CanvasElementContextControls owned both the decision of which controls to show and
the rendering of the menu that shows them. Inline (Word-style) images need the second
without the first: the picture's menu is the canvas element menu, item for item, but
the picture is not a canvas element and the canvas element manager knows nothing
about it.
So the rendering moves to its own module, canvasControlMenuRendering.tsx, and the
canvas component calls it. No behaviour changes and no inline-image code appears
here; this is the seam the rest of the stack builds on.
Two small things the same need turned up:
bloom-imageContainer, as having no container. That is the shape of a legacy image
and of an inline image, and it is already the fallback
buildCanvasElementControlRegistryContext uses for hasImage, so the two now agree.
canvas element and whose deletion means more than removing one element. Left out,
Delete removes the page's active canvas element as it always has.
Card: https://issues.bloomlibrary.org/youtrack/issue/BL-16822
🤖 Generated with Claude Code
https://claude.ai/code/session_014DCBGajN5YyAYPBenEf1yy
Devin review
This change is