Skip to content

SmartArt: organisation charts with assistants, segmented/multidirectional cycles, cycle matrix, segmented pyramid, pie - #621

Merged
h-a-n-a-s-h-i merged 8 commits into
storytold:mainfrom
NikitkaRa:smartart-cycles-org
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 8 commits into
storytold:mainfrom
NikitkaRa:smartart-cycles-org

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Stacked on #617 (→ #613 → #610 → #606 → #601 → #596). Review/merge those first; the diff here includes them until they land.

Summary

  • Organization Chart (orgChart1) and Half Circle Organization Chart (HalfCircleOrganizationChart): the tree with elbow connectors.
    • Assistant nodes: new DiagramNode.assistant. smartArt.addNode takes position: "assistant" (also in the Add Shape menu as "Add Assistant").
    • Assistants sit beside their parent's trunk, on their own row between the parent and its other children, and alternate right and left.
    • They're written as type="asst" points in the data model and read back.
    • Imported org chart layout ids (orgChart1, Name and Title, Horizontal, etc.) now open as Organization Chart instead of Hierarchy.
  • Segmented Cycle (cycle8): a ring cut into one arc per node.
  • Basic Pie (chart3): wedges.
  • Multidirectional Cycle (cycle7): nodes around a circle with double-headed arrows between them.
  • Cycle Matrix (cycle4): four quarter wedges with the top-level text, and each one's sub-points in a corner box.
  • Segmented Pyramid (pyramid4): rows of 1, 3, 5… triangles. The upside-down ones are polygons so their text stays upright.
  • Venn: labels move further out, so the third circle's label ("Process") no longer runs into the overlap.

Test plan

  • cargo xtask ci: all 6 steps pass.
  • New tests:
    • assistants_sit_beside_their_parent (engine): assistant insertion and placement.
    • assistants_survive_the_data_model (pptx).
  • Extended tests: the layout-id round trip covers the new kinds, and the org chart id mapping is checked. The every-layout bounds test covers the new layouts.
  • Visual: rendered to PNG and checked by eye: Venn, Segmented Cycle, Multidirectional Cycle, Organization Chart with an assistant, Half Circle Org Chart, Cycle Matrix, Segmented Pyramid, Pie. The .pptx converts through LibreOffice.
  • Not done: opening in PowerPoint (needs a human).

NikitkaRa and others added 8 commits October 14, 2026 01:22
A SmartArt group now keeps its outline (Shape.diagram: layout + nodes with
levels) and its shapes are regenerated from it inside the group's child
rectangle. New commands: smartArt.nodes, setNodes, addNode (after, before,
above, below), removeNode, promote, demote and layout. Sub-points become
bullets in their parent's shape; the hierarchy layout is a real tree with
connector lines. Text typed into a diagram shape is read back first.

UI: a SmartArt Design contextual tab and a Text Pane (Enter adds a line,
Tab/Shift+Tab demote/promote, Backspace on an empty line removes it).

Co-authored-by: Cursor <cursoragent@cursor.com>
…the data model

Export: a group with a diagram becomes a graphicFrame naming ppt/diagrams
data, layout, quickStyle and colors parts, plus the group's shapes as the
cached drawing (dsp). The data model is built from the outline (doc, node,
parTrans/sibTrans points and parOf links). A diagram read from a file keeps
its own layout, quick style and colour parts until its layout is switched.

Import: the outline is rebuilt from the data model's parOf tree, so
PowerPoint diagrams get the Text Pane. Their shapes stay the file's drawing
until the first outline edit (typed text isn't mapped back to nodes then).

Co-authored-by: Cursor <cursoragent@cursor.com>
Layouts now include Vertical and Horizontal Bullet List, Basic Block List,
Basic/Chevron/Vertical/Step Up Process, Basic and Block Cycle, Basic Radial,
Basic and Inverted Pyramid (bands drawn as polygons so the slope and the
text stay right), Basic and Titled Matrix, and Hierarchy. Each layout says
which nodes each shape shows, so typed text maps back for any layout.

SmartArt Styles (flat, subtle, intense, white outline) and Change Colors
(colourful or one accent) are kept on the diagram, offered in the SmartArt
Design tab, and written to .pptx as quick style / colour definition ids
(and read back from them).

Co-authored-by: Cursor <cursoragent@cursor.com>
Inset each pyramid band's text past the band's mid width so bullets no longer hang over the sloped sides; capped so the tip band still has room.

Co-authored-by: Cursor <cursoragent@cursor.com>
…lours

Each shape's text shrinks so its longest word fits on a line (the pyramid tip no longer breaks words). Three picture layouts (Vertical Picture List, Picture Caption List, Picture Accent Process) with a picture placeholder per node and smartArt.picture to fill it. Five 3-D SmartArt Styles (Polished, Inset, Cartoon, Powder, Brick Scene) drawn with lit bevels, and Colorful Range and Gradient Range colours; all written to and read from the .pptx quickStyle and colors parts.

Co-authored-by: Cursor <cursoragent@cursor.com>
… more layouts

Node pictures are written on the data model's presentation points (blip through the data part's rels) and read back into the outline on import. Picture Accent Process is hProcess10, not pList2 (checked against PowerPoint's layout list); pList2 is now Horizontal Picture List. Brick Scene looks through an isometric camera. New layouts: Horizontal Picture List, Basic Timeline, Basic Venn, Basic Target.

Co-authored-by: Cursor <cursoragent@cursor.com>
…e Accent Process files

Text Cycle, Continuous Cycle, Horizontal Hierarchy, Grid Matrix, Gear and Funnel. Venn labels sit further out, clear of the overlaps. Files where Picture Accent Process was written as pList2 (with DeckCraft's process-category layout part) import as Picture Accent Process again. Round shapes' text shrinks to the inscribed width.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ectional cycles, cycle matrix, segmented pyramid, pie

Organization Chart and Half Circle Organization Chart with elbow connectors; assistant nodes (Add Assistant, written as asst points and read back) sit beside their parent on a row of their own. Segmented Cycle, Multidirectional Cycle, Cycle Matrix, Segmented Pyramid and Basic Pie. Venn labels move further out so the third circle's no longer runs into the overlap.

Co-authored-by: Cursor <cursoragent@cursor.com>
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @NikitkaRa! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

anishguduru pushed a commit to anishguduru/deckcraft that referenced this pull request Oct 16, 2026
…rytold#621)

* M9: validate a document timestamp that sits in a signature field

Documenso (and others) store the document timestamp as an AcroForm signature
field (`Timestamp_1`) whose /V is a /Type /DocTimeStamp dictionary. Field
values only went through the signature validator, which read the RFC 3161
token as a CMS signature, compared its TSTInfo with the document digest and
reported "altered or corrupted since the signature was applied" for an
untouched file.

- A field value with /SubFilter /ETSI.RFC3161 is validated as a timestamp.
- Standalone timestamps are found with /Type /DocTimeStamp (ISO 32000-2
  12.8.5) as well as the /Type /Sig older writers used; our own
  timestamp_document now writes /DocTimeStamp. The discovery cache (storytold#419)
  selects its candidates with the same test, so it sees both.
- The discovery test that lists a signature field holding a timestamp used to
  assert `doc_timestamp == false`, which is the bug above; it asserts true now.
  What that test is about (the field is listed once, not also as a standalone
  timestamp) is unchanged.

Regression tests build the same structure with a test TSA; no third-party
file is needed, and they fail without the fix.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* M9: a trusted TSA whose certificate wasn't valid when it stamped leaves a document timestamp Unknown, never Valid

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
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.

3 participants