Skip to content

docs(odf): plan the drawing work #771 asks for, in the order the corpus argues for - #795

Merged
andiwand merged 1 commit into
mainfrom
odf-drawings/plan
Aug 31, 2026
Merged

docs(odf): plan the drawing work #771 asks for, in the order the corpus argues for#795
andiwand merged 1 commit into
mainfrom
odf-drawings/plan

Conversation

@andiwand

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

First of a six-PR stack closing #771. Docs only: src/odr/internal/odf/PLAN.md,
plus the links to it from the root AGENTS.md and odf/AGENTS.md.

#771 lists four sub-topics and nine unparsed shape tags. This writes down which
of them are worth building, in what order, and what the test corpus says about
each — the same shape as iwork/PLAN.md and rtf/PLAN.md.

What the corpus argued for

Occurrences over the 124 ODF files in test/data/input, counted across every
.xml part:

markup occurrences files
draw:enhanced-geometry 350 10
draw:object 1122 21
draw:transform= 25 4
draw:measure 27 1
draw:path 6 4
draw:polygon, draw:polyline, draw:caption, draw:regular-polygon, dr3d:scene 0 0

Five of the nine unparsed tags occur nowhere, and draw:enhanced-geometry is
by far the most common — which is what puts the enhanced path ahead of the
shape list, and what argues against inventing an ElementType per tag.

The two decisions every later stage depends on

  • No new ElementType. custom_shape becomes the general "geometry given
    rather than named" type, the way draw:g already collapses onto frame.
    Adding one type costs 14 files across four binding layers.
  • A transform is an element accessor, not a GraphicStyle field.
    get_intermediate_style overrides down the element parent chain, so a style
    field would leak a group's transform onto every child.

The stack

  1. draw:transform — this PR's successor
  2. the missing shape elements
  3. draw:enhanced-path and draw:equation, parser only
  4. enhanced geometry, rendered — closes support odf custom-shape #159
  5. draw:object charts — closes ods chart missing #179

No consumer-visible change, so no CHANGELOG.md entry.

…us argues for

The umbrella issue lists four sub-topics and nine unparsed shape tags; this
writes down which of them are worth building, in what order, and what the test
corpus says about each. Five of the nine tags — `draw:polygon`, `draw:polyline`,
`draw:caption`, `draw:regular-polygon`, `dr3d:scene` — occur in none of the 124
odf files under `test/data/input`, and `draw:enhanced-geometry` occurs 350 times,
which is what puts the enhanced path ahead of the shape list.

Two decisions are taken up front because every later stage depends on them: no
new `ElementType` (`custom_shape` becomes the general "geometry given rather than
named" type, the way `draw:g` already collapses onto `frame`), and a transform is
an element accessor rather than a `GraphicStyle` field, since
`get_intermediate_style` would otherwise leak a group's transform onto each of
its children.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017XABfEapaADjFQCt1vjmDF
@andiwand
andiwand merged commit f58d44f into main Aug 31, 2026
36 checks passed
@andiwand
andiwand deleted the odf-drawings/plan branch August 31, 2026 06:45
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.

ods chart missing support odf custom-shape

1 participant