From d0379dc70d571ec57af259336131adab4b659ad7 Mon Sep 17 00:00:00 2001 From: Trevor Brown Date: Tue, 10 Nov 2026 03:02:09 -0500 Subject: [PATCH] M8: Rotation field shows and sets the rotation on the page (node.set absoluteRotation) The Design panel's Rotation field now reads and writes the layer's rotation on the page (its own angle plus its parents'), as measured in Figma's web app, 2026-11-10. A new additive node.set key, absoluteRotation, does the work (one call for every selected layer, so one undo step and the moved rotation origin still apply); rotation stays the angle to the parent for scripts, inspect, codegen and the formats. Closes #2196. Co-Authored-By: Claude Sonnet 5.5 Model-Effort: Opus 5.5 drove; Fable 5.1 briefed; Sonnet 5.5 wrote at medium --- crates/engine/src/cmd/edit/props.rs | 8 +++- crates/engine/src/cmd/props.rs | 25 ++++++++++- crates/engine/src/rotation_origin_tests.rs | 11 +++++ .../engine/src/transform_behaviour_tests.rs | 42 ++++++++++++++++++ crates/mcp/src/tools.rs | 2 +- crates/ui-egui/src/field_tests.rs | 44 +++++++++++++++++++ crates/ui-egui/src/panels/right.rs | 13 +++--- docs/control-protocol.md | 1 + docs/mcp.md | 1 + docs/ui-parity.md | 5 ++- 10 files changed, 139 insertions(+), 13 deletions(-) diff --git a/crates/engine/src/cmd/edit/props.rs b/crates/engine/src/cmd/edit/props.rs index fb8a1c17f..819632a82 100644 --- a/crates/engine/src/cmd/edit/props.rs +++ b/crates/engine/src/cmd/edit/props.rs @@ -113,8 +113,12 @@ pub(super) fn set(s: &mut Session, p: &Value) -> Result { // A new rotation for the selection turns it about its moved rotation origin: each layer's // point under the origin stays put. let ds = s.ds()?; - let pivot = - ds.moved_origin().filter(|_| props.contains_key("rotation") && !props.contains_key("x") && !props.contains_key("y") && ds.selection == ids); + let pivot = ds.moved_origin().filter(|_| { + (props.contains_key("rotation") || props.contains_key("absoluteRotation")) + && !props.contains_key("x") + && !props.contains_key("y") + && ds.selection == ids + }); let pinned: Vec<(NodeId, figcraft_geom::Point)> = match pivot { Some(o) => roots(&ds.doc, &ids) .into_iter() diff --git a/crates/engine/src/cmd/props.rs b/crates/engine/src/cmd/props.rs index 2e5da37bd..4ff4b9bb1 100644 --- a/crates/engine/src/cmd/props.rs +++ b/crates/engine/src/cmd/props.rs @@ -16,7 +16,7 @@ use crate::{Result, bad}; pub const STROKE_SIDES: [&str; 4] = ["strokeTopWeight", "strokeRightWeight", "strokeBottomWeight", "strokeLeftWeight"]; /// Keys `node.set` understands (documented for agents). -pub const KEYS: &str = "name, visible, locked, opacity (0-1 or \"50%\"), blend, x, y (relative to the parent frame; groups don't count), width, height, rotation (degrees), \ +pub const KEYS: &str = "name, visible, locked, opacity (0-1 or \"50%\"), blend, x, y (relative to the parent frame; groups don't count), width, height, rotation (degrees), absoluteRotation (degrees on the page: the layer's angle plus its parents', what the Design panel's field shows; one of the two per call), \ fills (paints or colours; gradients as {type: linearGradient|radialGradient|angularGradient|diamondGradient, stops: [\"#hex\", ...], from?, to?} too), fill (colour, {$var: variable id or name}, or \"none\"/null: no fill), strokes, stroke (colour, {$var: variable id or name}, or \"none\"/null: no stroke), strokeWeight, strokeAlign (inside|center|outside), strokeSides [t,r,b,l], strokeTopWeight / strokeRightWeight / strokeBottomWeight / strokeLeftWeight (one side; turns on individual strokes), \ strokeCap / startCap / endCap, strokeJoin, miterAngle (degrees: sharper joins bevel; or miterLimit as a ratio), dashes [..], dashCap (none|round|square; null: dashes take startCap and endCap), widthProfile (preset uniform|wedge|taper|eye|rounded|pinch, [[t, scale], ...] or null), brush (preset id, {preset, spacing, sizeJitter, rotationJitter, scatter, seed} or null), cornerRadius (n or [tl,tr,br,bl]), cornerSmoothing (0-1), effects, \ clip, isMask, layout (null|horizontal|vertical|grid|{...}), gap, crossGap, padding (n or [t,r,b,l]), paddingTop/Right/Bottom/Left, \ @@ -456,7 +456,7 @@ fn apply_order(k: &str, v: &Value) -> u8 { match k { "path" | "width" | "height" | "w" | "h" => 0, "layout" | "layoutMode" => 1, - "rotation" => 3, + "rotation" | "absoluteRotation" => 3, "x" | "y" => 4, "fillStyle" | "strokeStyle" | "effectStyle" | "textStyle" | "gridStyle" => 5, "boundVariables" => 6, @@ -595,6 +595,27 @@ fn apply_geometry( let n = doc.get_mut(id)?; n.transform = figcraft_geom::set_rotation_about_center(n.transform, n.width, n.height, deg); } + "absoluteRotation" => { + let deg = f64_of(v).ok_or_else(|| bad(cmd, "`absoluteRotation` must be degrees"))?; + if props.contains_key("rotation") { + return Err(bad(cmd, "give one of `rotation` and `absoluteRotation`")); + } + let (w, h) = { + let n = doc.get(id)?; + (n.width, n.height) + }; + let world = figcraft_geom::set_rotation_about_center(doc.world_transform(id), w, h, deg); + let parent = doc.get(id)?.parent; + let pw = parent.map(|p| doc.world_transform(p)).unwrap_or(figcraft_geom::Affine::IDENTITY); + let local = pw.inverse() * world; + if local.as_coeffs().iter().all(|c| c.is_finite()) { + doc.get_mut(id)?.transform = local; + } else { + // A degenerate parent can't be inverted: turn the local angle instead. + let n = doc.get_mut(id)?; + n.transform = figcraft_geom::set_rotation_about_center(n.transform, n.width, n.height, deg); + } + } _ => return Ok(false), } Ok(true) diff --git a/crates/engine/src/rotation_origin_tests.rs b/crates/engine/src/rotation_origin_tests.rs index 38878a0f0..181559a05 100644 --- a/crates/engine/src/rotation_origin_tests.rs +++ b/crates/engine/src/rotation_origin_tests.rs @@ -90,6 +90,17 @@ fn rotation_field_and_rotate_commands_turn_about_a_moved_origin() { assert!(s.execute("transform.setRotationOrigin", &json!({"x": 1})).is_err(), "x without y"); } +#[test] +fn the_absolute_rotation_key_turns_about_a_moved_origin_too() { + let mut s = Session::new(); + let r = rect(&mut s); + s.execute("transform.setRotationOrigin", &json!({"x": 100, "y": 100})).unwrap(); + s.execute("node.set", &json!({"ids": [r], "props": {"absoluteRotation": 30}})).unwrap(); + let doc = s.doc().unwrap(); + assert!(near(doc.world_transform(r) * Point::new(100.0, 100.0), Point::new(100.0, 100.0))); + assert!((figcraft_geom::rotation_degrees(doc.world_transform(r)) - 30.0).abs() < 1e-6); +} + #[test] fn origin_lasts_as_long_as_its_selection() { let mut s = Session::new(); diff --git a/crates/engine/src/transform_behaviour_tests.rs b/crates/engine/src/transform_behaviour_tests.rs index e22eb0418..96b753d6d 100644 --- a/crates/engine/src/transform_behaviour_tests.rs +++ b/crates/engine/src/transform_behaviour_tests.rs @@ -466,6 +466,48 @@ fn design_panel_edits_reach_every_selected_layer() { assert!(near(rotation(&s, a), 30.0) && flipped(&s, a), "{}", rotation(&s, a)); } +#[test] +fn absolute_rotation_sets_the_rotation_on_the_page_keeping_the_centre() { + let mut s = session(); + let page = |s: &Session, i: NodeId| rotation_degrees(s.doc().unwrap().world_transform(i)); + let f = id(&ex(&mut s, "frame.create", json!({"x": 0, "y": 100, "width": 400, "height": 400}))); + set(&mut s, &[f], json!({"rotation": 10})); + let r = rect(&mut s, 100.0, 100.0, 120.0, 80.0, Some(f)); + assert!(near(page(&s, r), 10.0) && near(rotation(&s, r), 0.0)); + let centre = s.doc().unwrap().world_transform(r) * Point::new(60.0, 40.0); + set(&mut s, &[r], json!({"absoluteRotation": 7})); + assert!(near(page(&s, r), 7.0), "{}", page(&s, r)); + assert!(near(rotation(&s, r), -3.0), "{}", rotation(&s, r)); + let c = s.doc().unwrap().world_transform(r) * Point::new(60.0, 40.0); + assert!((c - centre).hypot() < 1e-6, "the centre stays put"); + set(&mut s, &[r], json!({"absoluteRotation": 0})); + assert!(near(page(&s, r), 0.0) && near(rotation(&s, r), -10.0)); + // `node.get` still reports the local angle. + let got = ex(&mut s, "node.get", json!({"id": r})); + let rot = got["rotation"].as_f64().unwrap_or(f64::NAN); + assert!(near(rot, -10.0), "{got}"); + // Groups: a child reads and sets the page angle, its sibling keeps its own. + let a = rect(&mut s, 0.0, 600.0, 50.0, 50.0, None); + let b = rect(&mut s, 100.0, 600.0, 50.0, 50.0, None); + let g = id(&ex(&mut s, "object.group", json!({"ids": [a, b]}))); + set(&mut s, &[g], json!({"rotation": 10})); + assert!(near(page(&s, a), 10.0)); + set(&mut s, &[a], json!({"absoluteRotation": 7})); + assert!(near(page(&s, a), 7.0) && near(page(&s, b), 10.0)); + // Several layers: one value on the page for all, one undo step. + let top = rect(&mut s, 800.0, 0.0, 50.0, 50.0, None); + let steps = undo_steps(&s); + set(&mut s, &[r, top], json!({"absoluteRotation": 45})); + assert!(near(page(&s, r), 45.0) && near(page(&s, top), 45.0)); + assert_eq!(undo_steps(&s), steps + 1); + // A flip is kept. + ex(&mut s, "object.flipH", json!({"ids": [r]})); + set(&mut s, &[r], json!({"absoluteRotation": 30})); + assert!(near(page(&s, r), 30.0) && flipped(&s, r), "{}", page(&s, r)); + // One of the two keys per call. + assert!(s.execute("node.set", &json!({"ids": [r], "props": {"rotation": 1, "absoluteRotation": 2}})).is_err()); +} + #[test] fn constrain_proportions_keeps_the_other_side_in_ratio() { let mut s = session(); diff --git a/crates/mcp/src/tools.rs b/crates/mcp/src/tools.rs index 9e901f5bb..4b4cc7e1d 100644 --- a/crates/mcp/src/tools.rs +++ b/crates/mcp/src/tools.rs @@ -208,7 +208,7 @@ fn tools() -> Vec { tool( "set_properties", "Set properties", - "Set properties on one or more layers as one undo step (engine `node.set`). Keys: name, visible, locked, opacity (0-1), blend, x, y (relative to the parent frame; groups don't count), width, height, rotation (degrees), fill (colour) / fills (array of paints: \"#hex\" or {\"type\":\"solid\",\"color\":\"#hex\"} or {\"type\":\"linearGradient\",\"stops\":[\"#hex\",\"#hex\"]} or stops [{\"position\":0..1,\"color\":\"#hex\"}], optional from/to handles in the unit box; radialGradient too), stroke / strokes, strokeWeight, strokeAlign (inside|center|outside), cornerRadius (n or [tl,tr,br,bl]), effects (array, e.g. {\"type\":\"dropShadow\",\"color\":\"#00000040\",\"offset\":[0,4],\"radius\":8}), clip, layout (null|horizontal|vertical|grid), gap, padding (n or [t,r,b,l]), mainAlign (min|center|max|spaceBetween|spaceAround|spaceEvenly), crossAlign, wrap, contentAlign (auto|spaceBetween: wrapped lines), sizingH / sizingV (fixed|hug|fill), constraints {horizontal, vertical}, characters, fontFamily, fontStyle, fontSize, lineHeight, letterSpacing, textAlign, textAutoResize. Auto layout keys (gap, padding, mainAlign, crossAlign, wrap, …) apply to frames, components and instances only: other layers among the ids are skipped and named in `warnings`, and with none that can take them the call is an error. A fontStyle draws in the family's nearest face; `warnings` says when that face has another weight or slant than the name asks for. Run list_commands with filter \"node.set\" for the full list. Unknown keys are an error. Returns the updated layers.", + "Set properties on one or more layers as one undo step (engine `node.set`). Keys: name, visible, locked, opacity (0-1), blend, x, y (relative to the parent frame; groups don't count), width, height, rotation (degrees), absoluteRotation (degrees on the page), fill (colour) / fills (array of paints: \"#hex\" or {\"type\":\"solid\",\"color\":\"#hex\"} or {\"type\":\"linearGradient\",\"stops\":[\"#hex\",\"#hex\"]} or stops [{\"position\":0..1,\"color\":\"#hex\"}], optional from/to handles in the unit box; radialGradient too), stroke / strokes, strokeWeight, strokeAlign (inside|center|outside), cornerRadius (n or [tl,tr,br,bl]), effects (array, e.g. {\"type\":\"dropShadow\",\"color\":\"#00000040\",\"offset\":[0,4],\"radius\":8}), clip, layout (null|horizontal|vertical|grid), gap, padding (n or [t,r,b,l]), mainAlign (min|center|max|spaceBetween|spaceAround|spaceEvenly), crossAlign, wrap, contentAlign (auto|spaceBetween: wrapped lines), sizingH / sizingV (fixed|hug|fill), constraints {horizontal, vertical}, characters, fontFamily, fontStyle, fontSize, lineHeight, letterSpacing, textAlign, textAutoResize. Auto layout keys (gap, padding, mainAlign, crossAlign, wrap, …) apply to frames, components and instances only: other layers among the ids are skipped and named in `warnings`, and with none that can take them the call is an error. A fontStyle draws in the family's nearest face; `warnings` says when that face has another weight or slant than the name asks for. Run list_commands with filter \"node.set\" for the full list. Unknown keys are an error. Returns the updated layers.", obj( json!({"ids": ids_schema("Layer ids (default: the selection)"), "props": {"type": "object", "description": "Property values to set"}}), &["props"], diff --git a/crates/ui-egui/src/field_tests.rs b/crates/ui-egui/src/field_tests.rs index e3bdad1dd..23570a1fe 100644 --- a/crates/ui-egui/src/field_tests.rs +++ b/crates/ui-egui/src/field_tests.rs @@ -441,6 +441,50 @@ fn the_arrow_keys_step_by_the_nudge_amounts_and_fractional_fields_by_their_own() assert!((rot.abs() - 11.0).abs() < 1e-6, "rotation {rot}: the steps stay after Escape"); } +#[test] +fn the_rotation_field_shows_and_sets_the_rotation_on_the_page() { + let mut s = Session::new(); + let f = id(s.execute("frame.create", &json!({"x": 0, "y": 100, "width": 400, "height": 400})).unwrap()); + s.execute("node.set", &json!({"ids": [f], "props": {"rotation": 10}})).unwrap(); + let r = id(s.execute("shape.rectangle", &json!({"x": 100, "y": 100, "width": 120, "height": 80, "parent": f})).unwrap()); + s.execute("node.set", &json!({"ids": [r], "props": {"rotation": -10}})).unwrap(); + let b = id(s.execute("shape.rectangle", &json!({"x": 600, "y": 0, "width": 50, "height": 50})).unwrap()); + s.execute("select.set", &json!({"ids": [r]})).unwrap(); + let mut u = Ui::new(s); + u.ctx.enable_accesskit(); + u.frame(vec![]); + let page = |u: &Ui, n: NodeId| figcraft_geom::rotation_degrees(u.app.session.doc().unwrap().world_transform(n)); + let local = |u: &Ui, n: NodeId| figcraft_geom::rotation_degrees(u.app.session.doc().unwrap().node(n).unwrap().transform); + assert_eq!(field(&mut u, "Rotation").1, "0°"); + type_into(&mut u, "Rotation", "7", Key::Enter); + assert!((page(&u, r) - 7.0).abs() < 1e-6 && (local(&u, r) + 3.0).abs() < 1e-6, "{} {}", page(&u, r), local(&u, r)); + assert_eq!(field(&mut u, "Rotation").1, "7°"); + // Arrows step the shown value. + let shift = Modifiers { shift: true, ..Modifiers::NONE }; + let (p, _) = field(&mut u, "Rotation"); + click(&mut u, p); + key(&mut u, Key::ArrowUp, Modifiers::NONE); + key(&mut u, Key::ArrowUp, shift); + key(&mut u, Key::Escape, Modifiers::NONE); + assert!((page(&u, r) - 18.0).abs() < 1e-6, "{}", page(&u, r)); + assert_eq!(field(&mut u, "Rotation").1, "18°"); + // Scrubbing is one undo step. + let steps = undo_steps(&u); + scrub(&mut u, "Rotation", 15.0, Modifiers::NONE); + assert!((page(&u, r) - 33.0).abs() < 1e-6, "{}", page(&u, r)); + assert_eq!(undo_steps(&u), steps + 1); + // Mixed: layers in differently turned parents agree when their page angles do. + u.app.session.execute("node.set", &json!({"ids": [b], "props": {"rotation": 33}})).unwrap(); + u.app.session.execute("select.set", &json!({"ids": [r, b]})).unwrap(); + assert_eq!(field(&mut u, "Rotation").1, "33°"); + u.app.session.execute("node.set", &json!({"ids": [b], "props": {"rotation": 20}})).unwrap(); + assert_eq!(field(&mut u, "Rotation").1, "Mixed"); + let steps = undo_steps(&u); + type_into(&mut u, "Rotation", "+10", Key::Enter); + assert!((page(&u, r) - 43.0).abs() < 1e-6 && (page(&u, b) - 30.0).abs() < 1e-6, "{} {}", page(&u, r), page(&u, b)); + assert_eq!(undo_steps(&u), steps + 1); +} + #[test] fn arithmetic_commits_tab_moves_on_and_escape_restores() { let (mut u, a, _) = setup(); diff --git a/crates/ui-egui/src/panels/right.rs b/crates/ui-egui/src/panels/right.rs index bba57c778..b577f5ae1 100644 --- a/crates/ui-egui/src/panels/right.rs +++ b/crates/ui-egui/src/panels/right.rs @@ -592,8 +592,9 @@ fn y_of(doc: &Document, n: &Node) -> f64 { (doc.frame_relative(n.id).as_coeffs()[5] * 100.0).round() / 100.0 } -fn rot_of(n: &Node) -> f64 { - (figcraft_geom::rotation_degrees(n.transform) * 100.0).round() / 100.0 +/// The layer's rotation on the page (its own angle plus its parents'), what the field shows. +fn rot_of(doc: &Document, n: &Node) -> f64 { + (figcraft_geom::rotation_degrees(doc.world_transform(n.id)) * 100.0).round() / 100.0 } pub(crate) fn position_values(ctx: &egui::Context, doc: &Arc, sel: &[NodeId]) -> PositionValues { @@ -602,7 +603,7 @@ pub(crate) fn position_values(ctx: &egui::Context, doc: &Arc, sel: &[N can_align: figcraft_engine::cmd::arrange::can_align(doc, sel), x: common(doc, sel, |n| x_of(doc, n)), y: common(doc, sel, |n| y_of(doc, n)), - rot: common(doc, sel, rot_of), + rot: common(doc, sel, |n| rot_of(doc, n)), parent_al: sel.iter().all(|i| doc.node(*i).and_then(parent).is_some_and(|p| p.layout.is_some())), absolute: common(doc, sel, |n| n.child_layout.absolute), // Constraints: children of frames without auto layout, or ignoring it. @@ -620,7 +621,7 @@ fn position_fields(app: &mut FigApp, ui: &mut Ui, doc: &Arc, sel: &[No let col = widgets::col_width(ui.available_width()); align_row(app, ui, sel, pv.can_align, col); position_row(app, ui, doc, sel, &pv, col); - rotation_row(app, ui, sel, pv.rot, col); + rotation_row(app, ui, doc, sel, pv.rot, col); if pv.in_frame { constraints_row(app, ui, sel, pv.constraints, col); } @@ -697,12 +698,12 @@ fn position_row(app: &mut FigApp, ui: &mut Ui, doc: &Document, sel: &[NodeId], p } /// Rotation, with the rotate and flip buttons. -fn rotation_row(app: &mut FigApp, ui: &mut Ui, sel: &[NodeId], rot: Option, col: f32) { +fn rotation_row(app: &mut FigApp, ui: &mut Ui, doc: &Document, sel: &[NodeId], rot: Option, col: f32) { let ids = sel.to_vec(); widgets::sublabels(ui, tr("Rotation"), None); row(ui, 32.0, |ui| { let e = widgets::number_field_mixed(ui, Id::unique("pos_rot"), Lead::Icon(Icon::Angle, tr("Rotation")), rot, "°", col, 1.0); - app.field_of(&ids, "rotation", e, rot_of, |v| json!(v)); + app.field_of(&ids, "absoluteRotation", e, |n| rot_of(doc, n), |v| json!(v)); let items = [ (Icon::Rotate, tr("Rotate 90° right")), (Icon::FlipH, crate::shortcuts::tip(tr("Flip horizontal"), "object.flipH")), diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 4835bd1e1..b06d79932 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -67,6 +67,7 @@ state are answered without a frame (about half a second each), while `ui.screens Coordinates are page units, y down. `x`/`y` in `node.set`/`node.create` are relative to the parent frame (groups have no coordinate space of their own). +`rotation` in `node.set` is the layer's angle to its parent; `absoluteRotation` sets its rotation on the page (what the Design panel's field shows); a call takes one of the two. **Windows.** The desktop app can show files in several windows (`window.new`). Every method takes an optional `window` (an id from `window.list`; `0` is the main window) and then runs in that diff --git a/docs/mcp.md b/docs/mcp.md index 04b37e1f0..31cd011eb 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -172,6 +172,7 @@ Or in a project's `.mcp.json`: - `create_node` and `set_properties` take `x`/`y` **relative to the parent frame** (the page when there is none, so they are page coordinates then). Groups and boolean groups have no coordinate space of their own: a layer in a group is placed in the frame (or on the page) the group is in. + `rotation` is the layer's angle to its parent (Figma's plugin API `rotation` is the same); `absoluteRotation` sets its rotation on the page, what the Design panel's field shows; a call takes one of the two. `inspect_document` reports `x`/`y` the same way, plus `absoluteBounds` in page coordinates. In `props`, `fill` and `stroke` also accept `"none"` (either case) or `null` as no paint, the same as an empty `fills`/`strokes` list, so an outline-only shape can be made in one call. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 463be3b47..3ebe45278 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -1,6 +1,6 @@ # UI and interaction parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-04 · **Change:** minor (the left rail's and tab strip's icons are larger, 20 pt (#553); pick select: Tab while the keyboard selection box shows (or the chord again) puts a pink outline on a layer and the keys walk the layer tree from it, as Accessibility at Figma says (#1836); scrubbing a field faster or slower by the pointer's height, with a notice of the speed, as the help center's Scrub fields says (#1837); component rows in the Layers panel at AA contrast in the theme's component tint, with the rows inside a selected component in a tone of its row (#1903); Cmd/Ctrl-click on a padding field sets all four sides with the value typed, a documented auto layout shortcut; a fill per region of a vector: with regions selected in edit mode, the Fill section and the fill commands edit those regions' own fills, as Edit vector layers says (#1875); the Fill section of a text whose characters were coloured differently while editing shows mixed content, characters that all share fills the layer doesn't have show those, and a layer-level fill edit reaches every character (#1856); a number field scrubs when dragged with Alt held, as the help center's scrub section says, not only by its label; reuse visible layer selection roots (M8); ; with a shape or frame tool chosen and nothing selected, the arrows show a placement crosshair in the middle of the view and move it, and Enter places there, as Accessibility at Figma says (#1839); text direction per paragraph: Text ▸ Text direction forces a paragraph left to right or right to left, as Add right-to-left text says (#1830), with `text.direction`, `node.set textDirection`, the Type settings control once a right-to-left script is in the text, inspect, the CSS `direction` and the `.fig` lines' `sourceDirectionality`; the boolean operation menu in the Design panel leads each entry with an original icon drawn in code, a filled preview of the result (#2003); a press on the open gradient's handles or stops on the canvas keeps the colour picker open through the drag, as its own control (#1852); a click with the Bend tool on a sharp point curves it, its handles along the line between its neighbours, as Edit vector layers says (#1875); wrap style: Auto, Balance and Pretty on a text layer decide where its lines break, as Explore text properties says (#1827), with the Type settings control, `text.wrapStyle`, `node.set wrapStyle`, inspect and the CSS `text-wrap`; Backspace or Delete at the start of a list item keeps the item's indentation level, as the lists article says; max lines on auto-width text keep it auto width, hugging that many lines, as the text properties article says; superscript and subscript are synthesised where the font has no glyphs for them, from the standard glyphs shrunk and shifted by the font's OS/2 metrics, and a run mixing available and unavailable glyphs is synthesised whole, as Explore text properties says (#1828); Alt+Enter while editing text opens the link at the caret, as the accessibility page documents; Minimize, by its shortcut or the button by the file name, collapses the navigation bar and both sidebars as the help center says, with the right sidebar back while something is selected (#1835); the interface size keys of the help center's accessibility page: Cmd/Ctrl+Shift+Alt with =, - and 0 step the interface through the Preferences sizes and back to the system's size; Cmd/Ctrl+Alt+arrows rotate the selection a degree at a time, 15 with Shift, as the help center's accessibility page says; they resized before; the Layers panel answers Ctrl+1 as well as Alt+1 on Windows and Linux, the two keys the help center gives it; the colour picker's Image tab shows a placeholder and Upload from computer, an asset preview, and a file dropped on it replaces the image, keeping the fill mode, crop and position (#1682); the keyboard's Menu key opens the context menu, as Shift+F10 does; the eyedropper with Cmd/Ctrl+Shift makes a colour style or variable of what it picks; sidebar number and text fields keep their text vertically centered when focused, including typography spacing; with the pen out, Enter or a double-click ends the path and edits the vector with the Move tool instead of drawing on (#1430); the Actions palette offers only commands that run from it, and no second row reading like a menu item: Place image opens the file dialog (#1574); Preferences ▸ Scroll wheel zoom: a mouse wheel zooms the canvas about the pointer and Cmd/Ctrl+wheel scrolls (#1390); boolean operations refuse input past their caps, and a boolean group past them draws without its result (#1104); the selection and hover outlines of rounded rectangles and frames follow their corners (#1506); colour picker review fixes for text undo, fitted sidebars, moving controls and gradient variables; Corner smoothing: an original icon and the shared number-field drag gesture, preserving fractional baselines; guides snap to layers when dragged; Crop image: Object ▸ Crop image, the right-click menu and the image fill row enter crop mode (`image.crop`, #1464); the Design panel's sections on one grid — 16 / 8 margins, 88 + 8 + 88 + 8 + 24 columns, 24 pt rows, 4 pt between a row's buttons (#858); the toolbar on one 32 pt grid, without its Resources button (#1210); colour picker LCH and OKLCH models; an XML (Android Vector Drawable) export format; Context menus: the Menu key reaches egui 0.37 but is unbound (row done → partial); the Text on a path tool; board tool keys pinned; community fixes: the text box by dragging, the font picker keys, the pen path on leaving Design, a still canvas in vector edit mode, a scrolling pages list, colour emoji, readable new text in frames, system theme on first run; the Small caps sample in Type settings drawn from capitals; recent files as cards; vector edit mode: hovering, hatching, selecting and dragging filled regions; home screen: Templates tab, first-run templates and Getting started tips; number fields: scrub rates, arrow steps, arithmetic with brackets, relative edits of mixed values; outline mode's hidden layers and object bounds; Hide when publishing; cursors per tool and modifier; panel widths; dark pages for files made in the dark theme; drag threshold and double-clicks into text in groups; rotation origin on Alt+R and placing with Enter: no documented shortcut missing; keyboard shortcut parity suite and bindings; cursor chat and spotlight in live sessions; layers and assets panels behaviour suite and fixes; vector multi-edit and the vector edit tail; canvas navigation, guides and grids behaviour suite and fixes; shapes and vector behaviour suite and fixes; paint and effects behaviour suite and fixes; frames, groups, sections and masks behaviour suite and fixes; layers panel keyboard: F2 rename, Shift+F10 context menu, F8 box selection; selection and transform behaviour suite and fixes; Display P3: gamut warning and soft-proof (true P3 blocked upstream); several windows; boolean hit testing on the result, group drags, frame outlines and slices; outlines for the selection, mask outlines; arc fields, live boolean editing, shape builder on strokes, one-sided widths; fields select their text on focus; Typography spacing icons support scrubbing (#373); CSS colour names in hex fields; a rename selects the whole name, so typing replaces it; Escape or Enter after a pen path stays on the same vector (#760); IME composition kept on through idle frames of a text edit, candidates at the caret (#747); Selection colors for mixed selections and smart-selection spacing (#753); submenus with a hover delay and a safe triangle; the Actions palette's tabs, ranked search, highlight and recents; menu items that ask for a value; editor fixes from the community batches) · **Target:** Figma Design UI3 (desktop app 126.10.7) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-10 · **Change:** minor (the Rotation field shows and sets the rotation on the page, in frames and groups, through node.set absoluteRotation (#2196); the left rail's and tab strip's icons are larger, 20 pt (#553); pick select: Tab while the keyboard selection box shows (or the chord again) puts a pink outline on a layer and the keys walk the layer tree from it, as Accessibility at Figma says (#1836); scrubbing a field faster or slower by the pointer's height, with a notice of the speed, as the help center's Scrub fields says (#1837); component rows in the Layers panel at AA contrast in the theme's component tint, with the rows inside a selected component in a tone of its row (#1903); Cmd/Ctrl-click on a padding field sets all four sides with the value typed, a documented auto layout shortcut; a fill per region of a vector: with regions selected in edit mode, the Fill section and the fill commands edit those regions' own fills, as Edit vector layers says (#1875); the Fill section of a text whose characters were coloured differently while editing shows mixed content, characters that all share fills the layer doesn't have show those, and a layer-level fill edit reaches every character (#1856); a number field scrubs when dragged with Alt held, as the help center's scrub section says, not only by its label; reuse visible layer selection roots (M8); ; with a shape or frame tool chosen and nothing selected, the arrows show a placement crosshair in the middle of the view and move it, and Enter places there, as Accessibility at Figma says (#1839); text direction per paragraph: Text ▸ Text direction forces a paragraph left to right or right to left, as Add right-to-left text says (#1830), with `text.direction`, `node.set textDirection`, the Type settings control once a right-to-left script is in the text, inspect, the CSS `direction` and the `.fig` lines' `sourceDirectionality`; the boolean operation menu in the Design panel leads each entry with an original icon drawn in code, a filled preview of the result (#2003); a press on the open gradient's handles or stops on the canvas keeps the colour picker open through the drag, as its own control (#1852); a click with the Bend tool on a sharp point curves it, its handles along the line between its neighbours, as Edit vector layers says (#1875); wrap style: Auto, Balance and Pretty on a text layer decide where its lines break, as Explore text properties says (#1827), with the Type settings control, `text.wrapStyle`, `node.set wrapStyle`, inspect and the CSS `text-wrap`; Backspace or Delete at the start of a list item keeps the item's indentation level, as the lists article says; max lines on auto-width text keep it auto width, hugging that many lines, as the text properties article says; superscript and subscript are synthesised where the font has no glyphs for them, from the standard glyphs shrunk and shifted by the font's OS/2 metrics, and a run mixing available and unavailable glyphs is synthesised whole, as Explore text properties says (#1828); Alt+Enter while editing text opens the link at the caret, as the accessibility page documents; Minimize, by its shortcut or the button by the file name, collapses the navigation bar and both sidebars as the help center says, with the right sidebar back while something is selected (#1835); the interface size keys of the help center's accessibility page: Cmd/Ctrl+Shift+Alt with =, - and 0 step the interface through the Preferences sizes and back to the system's size; Cmd/Ctrl+Alt+arrows rotate the selection a degree at a time, 15 with Shift, as the help center's accessibility page says; they resized before; the Layers panel answers Ctrl+1 as well as Alt+1 on Windows and Linux, the two keys the help center gives it; the colour picker's Image tab shows a placeholder and Upload from computer, an asset preview, and a file dropped on it replaces the image, keeping the fill mode, crop and position (#1682); the keyboard's Menu key opens the context menu, as Shift+F10 does; the eyedropper with Cmd/Ctrl+Shift makes a colour style or variable of what it picks; sidebar number and text fields keep their text vertically centered when focused, including typography spacing; with the pen out, Enter or a double-click ends the path and edits the vector with the Move tool instead of drawing on (#1430); the Actions palette offers only commands that run from it, and no second row reading like a menu item: Place image opens the file dialog (#1574); Preferences ▸ Scroll wheel zoom: a mouse wheel zooms the canvas about the pointer and Cmd/Ctrl+wheel scrolls (#1390); boolean operations refuse input past their caps, and a boolean group past them draws without its result (#1104); the selection and hover outlines of rounded rectangles and frames follow their corners (#1506); colour picker review fixes for text undo, fitted sidebars, moving controls and gradient variables; Corner smoothing: an original icon and the shared number-field drag gesture, preserving fractional baselines; guides snap to layers when dragged; Crop image: Object ▸ Crop image, the right-click menu and the image fill row enter crop mode (`image.crop`, #1464); the Design panel's sections on one grid — 16 / 8 margins, 88 + 8 + 88 + 8 + 24 columns, 24 pt rows, 4 pt between a row's buttons (#858); the toolbar on one 32 pt grid, without its Resources button (#1210); colour picker LCH and OKLCH models; an XML (Android Vector Drawable) export format; Context menus: the Menu key reaches egui 0.37 but is unbound (row done → partial); the Text on a path tool; board tool keys pinned; community fixes: the text box by dragging, the font picker keys, the pen path on leaving Design, a still canvas in vector edit mode, a scrolling pages list, colour emoji, readable new text in frames, system theme on first run; the Small caps sample in Type settings drawn from capitals; recent files as cards; vector edit mode: hovering, hatching, selecting and dragging filled regions; home screen: Templates tab, first-run templates and Getting started tips; number fields: scrub rates, arrow steps, arithmetic with brackets, relative edits of mixed values; outline mode's hidden layers and object bounds; Hide when publishing; cursors per tool and modifier; panel widths; dark pages for files made in the dark theme; drag threshold and double-clicks into text in groups; rotation origin on Alt+R and placing with Enter: no documented shortcut missing; keyboard shortcut parity suite and bindings; cursor chat and spotlight in live sessions; layers and assets panels behaviour suite and fixes; vector multi-edit and the vector edit tail; canvas navigation, guides and grids behaviour suite and fixes; shapes and vector behaviour suite and fixes; paint and effects behaviour suite and fixes; frames, groups, sections and masks behaviour suite and fixes; layers panel keyboard: F2 rename, Shift+F10 context menu, F8 box selection; selection and transform behaviour suite and fixes; Display P3: gamut warning and soft-proof (true P3 blocked upstream); several windows; boolean hit testing on the result, group drags, frame outlines and slices; outlines for the selection, mask outlines; arc fields, live boolean editing, shape builder on strokes, one-sided widths; fields select their text on focus; Typography spacing icons support scrubbing (#373); CSS colour names in hex fields; a rename selects the whole name, so typing replaces it; Escape or Enter after a pen path stays on the same vector (#760); IME composition kept on through idle frames of a text edit, candidates at the caret (#747); Selection colors for mixed selections and smart-selection spacing (#753); submenus with a hover delay and a safe triangle; the Actions palette's tabs, ranked search, highlight and recents; menu items that ask for a value; editor fixes from the community batches) · **Target:** Figma Design UI3 (desktop app 126.10.7) Fine canvas control is what Figma users feel first: handles, snapping, nudging, modifier keys, drag behaviour, numeric precision. This checklist covers the tools, gestures and panels. Status: @@ -61,7 +61,7 @@ interaction feel not yet compared. | Select layer menu (every layer under the click) | done | | | Enter / Shift+Enter (children / parent), Tab / Shift+Tab (siblings) | done | Tab renames the next layer while renaming | | Resize handles: Shift keeps proportions, Alt from centre, constraints-aware | done | Alt shrinks too; past an edge flips (several layers mirror); groups and mixed rotations scale each layer along its own axes, keeping rotation and flip (no skew: children turned off a right angle are approximate); Cmd/Ctrl ignores a frame's constraints (`transform_behaviour_tests`) | -| Rotate just outside a corner; Shift in 15° steps | done | rotated handle box when layers share a rotation | +| Rotate just outside a corner; Shift in 15° steps | done | rotated handle box when layers share a rotation; the Rotation field shows and sets the rotation on the page (its own angle plus its parents'), in frames and groups alike, measured in Figma's web app 2026-11-10 (#2196): a rectangle drawn inside a turned frame reads 0, typing 7 makes it 7 on the page; the panel sends `node.set absoluteRotation`, while `rotation` stays the angle to the parent for scripts, inspect, codegen and the formats. Pinned, not measured: several layers read one value when their page angles agree (typing sets them all, one undo step); a flipped layer reads in the same form as before (a horizontal flip reads 180 plus the angle) and typing keeps the flip; a flipped parent is handled by the world math. Tests: `absolute_rotation_sets_the_rotation_on_the_page_keeping_the_centre`, `the_absolute_rotation_key_turns_about_a_moved_origin_too`, `the_rotation_field_shows_and_sets_the_rotation_on_the_page` | | Flip, rotate 90° | done | | | Rotation origin (Alt+R) | done | a handle at the selection's centre to drag (snaps to the box's corners, edge middles and centre), double-click puts it back, Escape or Alt+R hides it; the corner handles, the rotation field, Rotate 90°/180° and `transform.rotate` turn about it; it follows the layers and lasts as long as the selection, not saved (the documentation doesn't say; pinned) | | Enter with a shape or frame tool chosen | done | places what a click makes (100×100, lines 100 long, sections 400×300) in the middle of the view, selected (`tool.place`); from the toolbar, Enter on the chosen tool. With nothing selected, the arrows first show a crosshair in the middle of the view and then move it by the nudge amounts (`tool.crosshair`; Shift the large one), and Enter places there; Escape or a tool change takes it away ("Use the arrow keys to activate the crosshair cursor. It will appear in the middle of the viewport indicating where the new object will be placed", Accessibility at Figma; #1839) | @@ -187,6 +187,7 @@ in the table. `crates/ui-egui/src/shortcut_keys_tests.rs` drives the keys a look | Date | Change | Summary | |---|---|---| +| 2026-11-10 | minor | The Rotation field shows and sets the layer's rotation on the page (its own angle plus its parents'), in frames and groups alike, as measured in Figma's web app (#2196) | | 2026-11-02 | patch | Shortcuts: a Cmd/Ctrl-click on a padding field (the horizontal or vertical pair, or a side with Individual padding open) makes the value typed go to all four sides, in one undo step (Guide to auto layout, Keyboard shortcut guide); a plain click still edits that axis or side alone. A documented gesture row: 134 documented, 133 bound. Test: `padding_individual_tests` | | 2026-11-01 | patch | Number fields: dragging the field itself with Alt held scrubs it ("You can also hover the input field itself and hold down the modifier key: Mac: ⌥ Option Windows: Alt", Adjust alignment, rotation, position, and dimensions), with the resize cursor and the label's rates (Alt is the enabler there, so it isn't the fine rate); a click with Alt doesn't open the editor. Found by a documentation audit of the ui-parity rows. Test: `field_tests::alt_held_over_a_field_scrubs_it`. Counts unchanged | | 2026-11-02 | patch | M6, #1839: with a shape or frame tool chosen and nothing selected, the arrows show a placement crosshair in the middle of the view and move it by the nudge amounts (`tool.crosshair`), Enter places the object there (`tool.place`), Escape or a tool change takes it away; the canvas draws the crosshair and `ui.inspect` reports it (`tool.crosshair`), the Keyboard shortcuts panel lists the gesture ("Use the arrow keys to activate the crosshair cursor...", Accessibility at Figma). The board Shapes tool places on it too (its 160 px shape centred, as the tool centres a press), and the view pans by the overshoot when the crosshair is nudged past its edge. Tests: `place_crosshair_tests`, `shortcut_keys_tests::arrows_show_and_move_the_placement_crosshair_with_a_shape_tool`. |