Skip to content

SmartArt: Convert to SmartArt gallery on Home; Convert to Text keeps the text size - #627

Merged
h-a-n-a-s-h-i merged 10 commits into
storytold:mainfrom
NikitkaRa:smartart-home-convert
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 10 commits into
storytold:mainfrom
NikitkaRa:smartart-home-convert

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

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

Summary

  • Home ▸ Paragraph ▸ Convert to SmartArt: a new button whose menu is a gallery of every layout, grouped by category (List, Process, Cycle, Hierarchy, Relationship, Matrix, Pyramid, Picture), three to a row. Clicking a layout runs smartArt.fromText with that layout on the selected text box or placeholder. The button is enabled only when the command can run. The categories come from the new smartart::category.
  • Convert to Text keeps the text size: top-level paragraphs take the most common title size in the graphic's shapes, and sub-points the most common bullet size. These are the sizes the graphic actually showed, after shrink-to-fit. Before, the text dropped to the default size.
  • Accessibility: icon toggles now carry their tooltip as their accessible name (WidgetInfo), so screen readers and kittest can find them. This changes no behaviour.
  • Text Pane: already in place since SmartArt: Text Pane, add and remove shapes, promote and demote #596 (the outline editor beside the graphic, in the SmartArt pane), so nothing new here.

Test plan

  • cargo xtask ci: all 6 steps pass.
  • New kittest home_convert_to_smartart_gallery_converts_the_text: selects a three-line text box, clicks Home ▸ Convert to SmartArt ▸ Basic Block List, and checks the result is a three-node block list.
  • The engine conversion test now checks that Convert to Text keeps a real font size.
  • Visual: rendered the open gallery through the kittest wgpu renderer and checked it by eye. Also rendered a block list next to its Convert to Text result: the text keeps the size it had in the graphic.

NikitkaRa and others added 10 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>
…uts, convert to and from text and shapes

Name and Title Organization Chart with a title box per node (DiagramNode.title, smartArt.setNodes title; written as the title box's presentation point text and read back). Half Circle Org Chart draws two half rings per node. New layouts: Vertical Box List, Trapezoid List, Table List, Accent Process, Continuous Block Process, Basic Bending Process, Linear Venn, Stacked Venn, Nested Target. smartArt.fromText (Convert to SmartArt), smartArt.toText and smartArt.toShapes, with a Convert menu in SmartArt Design.

Co-authored-by: Cursor <cursoragent@cursor.com>
…the text size

Home > Paragraph gets a Convert to SmartArt button whose menu lists every layout by category (List, Process, Cycle, Hierarchy, Relationship, Matrix, Pyramid, Picture); a click converts the selected text. Convert to Text sets the text box's titles and bullets to the sizes the graphic showed them at. Icon toggles carry their tooltip as their accessible name.

Co-authored-by: Cursor <cursoragent@cursor.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit fd1b62b into storytold:main Oct 14, 2026
h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 14, 2026
#610 #613 #617 #621 #623 #627 #634 #557 #689 #668)

# Conflicts:
#	crates/engine/src/tests.rs
#	crates/ui-egui/src/dialogs.rs
@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
…ytold#627)

* Refs storytold#519: tell the user when PdfCraft draws without a GPU

When wgpu's adapter is a software one (WARP on Windows, llvmpipe on
Linux), show a notice at launch that PdfCraft may be slow. egui-wgpu
only logged it, so the storytold#519 reporter had to find it in pdfcraft.log.

The OpenGL fallback isn't covered: glow reports its renderer only
through unsafe calls. The string is translated in the ten catalogs that
carry the portable-mode notice, with their ATTRIBUTION.toml hashes.

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

* zh-hant: the drawing-without-a-GPU notice

---------

Co-authored-by: Claude Opus 5.5 <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