M12: Mind maps: FigCraft's own starter texts (#2226)

A new map's starter children read "Idea 1", "Idea 2" and "Idea 3", as the design specified,
instead of the incumbent's wording, which the first commit had copied from the measurement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and wrote
This commit is contained in:
Trevor BrownandClaude Opus 5.5 committed 2026-11-10 17:02:28 -05:00
1 parent 0f644195c3
commit 8e5c7d9279
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ fn branches(s: &Session) -> Vec<NodeId> {
fn check_child(s: &Session, root: NodeId, (k, line): (NodeId, NodeId), i: usize) {
let r = bx(s, root);
let td = text_data(s, k);
assert_eq!(td.characters, ["A concept", "An idea", "A thought"][i]);
assert_eq!(td.characters, ["Idea 1", "Idea 2", "Idea 3"][i]);
assert_eq!((td.style.font_size, td.style.font_style.as_str()), (16.0, "Medium"));
assert_eq!((td.style.line_height, td.style.letter_spacing), (LineHeight::Percent(150.0), LetterSpacing::Percent(-1.1)));
let b = bx(s, k);
+1 -1
View File
@@ -181,7 +181,7 @@ pub fn specs() -> Vec<CommandSpec> {
spec!(
"board.mindMap",
"Mind map",
"{x?, y? (the first node's top-left in the parent; default the middle of the view), text? (default Topic), children? (their texts, at most 20; default A concept, An idea, A thought), parent?, edit? (start typing in the first node; default false)} → {id, text, children: [{id, text, connector}...]} a first node with children on its right, joined by branches; the map lays itself out",
"{x?, y? (the first node's top-left in the parent; default the middle of the view), text? (default Topic), children? (their texts, at most 20; default Idea 1, Idea 2, Idea 3), parent?, edit? (start typing in the first node; default false)} → {id, text, children: [{id, text, connector}...]} a first node with children on its right, joined by branches; the map lays itself out",
true,
mindmap::mind_map_cmd
),
+1 -1
View File
@@ -30,7 +30,7 @@ const MIND_NODE_TRACKING: f64 = -1.1;
const MIND_MIN_W: f64 = 8.0;
/// What `board.mindMap` puts in the first node and its children when it isn't told.
const MIND_ROOT_TEXT: &str = "Topic";
const MIND_STARTERS: [&str; 3] = ["A concept", "An idea", "A thought"];
const MIND_STARTERS: [&str; 3] = ["Idea 1", "Idea 2", "Idea 3"];
/// The most children `board.mindMap` makes, and the longest text it puts in a node.
const MIND_MAX_STARTERS: usize = 20;
const MIND_MAX_TEXT: usize = 500;
+1 -1
View File
@@ -491,7 +491,7 @@ one undo step and returns the ids it made:
in the app does both).
- `board.mindMap {x?, y?, text?, children?, parent?, edit?}` → `{id, text, children: [{id, text, connector}]}`:
a mind map: a first node (`mindNode`, bold 24, no box; `text` defaults to `Topic`, `x`/`y` to the
middle of the view) with up to 20 `children` (texts; default `A concept`, `An idea`, `A thought`)
middle of the view) with up to 20 `children` (texts; default `Idea 1`, `Idea 2`, `Idea 3`)
on its right, each joined to it by a curved branch (a connector with `branch: true`: stroke 4,
`#757575`, round caps). The map lays itself out: children stand in one column 88 units right of
the widest node of their parent's column, 48 apart, centred on their parent; a node is its text,