Skip to content

Mark a drawing's part drawn in a frame on its frame alone - #7439

Merged
max-sixty merged 2 commits into
mainfrom
svg-hover-outline
Nov 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
svg-hover-outline

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

With Alt held over a panel of an inline drawing, every line in the panel turned green: its frame, each box inside, the arrows, and dashed lines made solid. A part whose first child shape shows, isn't a line, and holds the whole part's box is drawn in that frame, as a panel's rect.frame or a box's rect.box is, and its marks (the aim, a comment's mark, the trace, the proxy and location rings) now stand on that frame alone. The shapes inside keep their look, and a named part inside takes a mark of its own. A part without such a frame, such as an arrow with its label, still marks every shape it draws.

markedParts (dom/geometry.ts) names the elements a target's marks stand on, and only the two mark painters use it, so placement and visibility keep reading the whole group. The comment-mark painter joins the states of two targets on one box. lf-diagram's own frame rule for kanban columns is deleted, since the generic rule covers it; class and entity boxes, cylinders and double circles now mark their outer shape only. A marked shape keeps an author's clip-path.

The user asked for this in a comment on a Leaf page; Codex reviewed two rounds and a fresh agent reviewed the before/after captures. Tests: 14 drawing-part and chart aim tests by -k, the runtime suite, check:browser; Chromium and Firefox probes.

This was written by Claude Code on behalf of max-sixty

With Alt held over a panel of an inline drawing, every line in the panel turned
green: its frame, each box inside, the arrows, and dashed lines made solid. The
user asked for only the outer lines, with each shape inside still selectable on
its own.

A part whose first child shape shows, isn't a line, and holds the whole part's
box is drawn in that frame, as a panel's `rect.frame` or a box's `rect.box` is.
Its marks (the aim, a comment's mark, the trace, the proxy and location rings)
now stand on the frame alone, so the shapes inside keep their look and a named
part inside takes a mark of its own. A part without such a frame, such as an
arrow with its label, still marks every shape it draws.

`markedParts` (dom/geometry.js) names the elements a target's marks stand on,
and the two mark painters use it; placement and visibility keep reading
`shownParts`, so a title above a panel still counts as the panel's. The
comment-mark painter joins the states of two targets that stand on one box.
lf-diagram's own rule marking a box that holds other boxes on its frame is
deleted, since the generic rule covers kanban columns; class and entity boxes,
cylinders and double circles now mark their outer shape only. A marked shape
keeps an author's `clip-path` (`revert-layer` in place of `none`), which matters
now that a frame, not its group, wears the mark.

The feature gallery's drawing names its After panel and the note inside it,
with a line saying what to try, and the stills state `drawing-part-aim` holds
Alt over the panel.

Tests: the authored-drawing aim test adds a framed part holding a named part
and a diagonal arrow whose line's box holds its tip; the generic-package,
staged-part and rebuilt-proxy tests find the mark on the diamond or rect the
part is drawn in; the diagram-boxes test reads `markedParts`. Ran those and the
other drawing-part aim tests by -k (10), the chart point-comment tests, the
runtime suite and `check:browser`; checked Chromium and Firefox with probes.

> _This was written by Claude Code on behalf of max-sixty_
# Conflicts:
#	browser/runtime/annotations/visual-mark-paint.js
#	browser/runtime/readings/target-paint.js
@max-sixty
max-sixty merged commit e7b897a into main Nov 27, 2026
6 checks passed
@max-sixty
max-sixty deleted the svg-hover-outline branch November 27, 2026 21:09
leaf-agent added a commit that referenced this pull request Nov 28, 2026
…ws it (#7506)

#7439 put a drawing part's marks on the frame the part is drawn in
(`markedParts` in `dom/geometry.ts`), and the margin entry's trace is
one of those marks. So hovering the margin entry for the thread on
diagram node U now traces the node's `rect`, not its `g[data-id="U"]`.
`test_threads_on_two_parts_of_a_picture_stand_an_entry_each_tracing_its_part`
still expected the group and has failed on `main` since #7439 landed.
The test now expects the node's frame. It still checks what it was
written to protect: one trace, on that node alone, not on the picture.
Nothing changes in the product.

The test fails on current `main` (`AssertionError: flow`, traced element
`<rect … data-lf-traced>`) and passes with this change.

#7497 names a second test,
`test_native_sidebar_is_placed_before_widget_activation`. It passes at
#7439 and first fails at #7447, so it has a different cause and this PR
doesn't touch it. The issue has the diagnosis.

Refs #7497 — automated triage

Co-authored-by: leaf-agent <[email protected]>
This was referenced Nov 28, 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