Merge pull request #2620 from denisg0mes/paste-properties-frames

M4: Paste properties keeps a layer's styles and variables
This commit is contained in:
BFlat authored and GitHub committed 2026-11-27 14:35:57 +07:00
commit 95ffd55bfc
5 files changed
+228 -8

No files matched your search

+105 -7
View File
@@ -127,6 +127,7 @@ pub(super) fn paste_design_layers(s: &mut Session, p: &Value) -> Result<Value> {
// A design-app paste replaces the copied layers, not the copied rows: a `fill.copy` before it
// still pastes afterwards.
let props = s.clipboard.props.take();
let props_source_doc = s.clipboard.props_source_doc;
let paint = s.clipboard.paint.take();
let stroke = s.clipboard.stroke.take();
let paint_images = std::mem::take(&mut s.clipboard.paint_images);
@@ -138,6 +139,7 @@ pub(super) fn paste_design_layers(s: &mut Session, p: &Value) -> Result<Value> {
nodes,
images,
props,
props_source_doc,
paint,
stroke,
paint_images,
@@ -438,7 +440,19 @@ pub(super) fn copy_props_of(doc: &Document, id: NodeId) -> Value {
v["cornerRadius"] = json!(n.corners.radii);
v["cornerSmoothing"] = json!(n.corners.smoothing);
}
// A frame's layout grids go with its look, as its fills do.
if n.kind.is_frame_like() {
v["grids"] = json!(n.grids);
v["gridStyle"] = json!(n.styles.grid);
}
// The links behind the values: the styles and the variables they come from, so the pasted
// layer follows them as the copied one does.
v["fillStyle"] = json!(n.styles.fill);
v["strokeStyle"] = json!(n.styles.stroke);
v["effectStyle"] = json!(n.styles.effect);
v["boundVariables"] = Value::Object(n.bound.iter().filter(|(f, _)| copied_binding(f)).map(|(f, v)| (f.clone(), json!(v))).collect());
if let NodeKind::Text(t) = &n.kind {
v["textStyle"] = json!(n.styles.text);
v["fontFamily"] = json!(t.style.font_family);
v["fontStyle"] = json!(t.style.font_style);
v["fontSize"] = json!(t.style.font_size);
@@ -453,26 +467,110 @@ pub(super) fn copy_props(s: &mut Session, p: &Value) -> Result<Value> {
let id = targets(s, p).first().copied().ok_or_else(|| bad("edit.copyProperties", "select one layer"))?;
let v = copy_props_of(s.doc()?, id);
s.clipboard.props = Some(v.clone());
s.clipboard.props_source_doc = s.ds()?.uid;
Ok(v)
}
/// Copied properties `props` without their style and variable links, for a paste into another
/// file: the copied ids name the source file's styles and variables, and the same ids here can
/// name unrelated ones. The values paste unlinked, and the layer's own links on them go.
fn without_links(mut props: Value) -> Value {
if let Some(m) = props.as_object_mut() {
for (k, v) in m.iter_mut() {
if k.ends_with("Style") && !k.starts_with("font") {
*v = Value::Null;
} else if k == "boundVariables" {
*v = json!({});
}
}
}
props
}
/// Give layer `id` the properties [`copy_props_of`] copied (`props`), those it can take: the text
/// properties only to text, the corners only to a layer with corners.
pub(crate) fn apply_copied_props(cmd: &str, doc: &mut Document, id: NodeId, props: &Value) -> Result<()> {
let mut m = props.as_object().cloned().unwrap_or_default();
let is_text = matches!(doc.get(id)?.kind, NodeKind::Text(_));
if !is_text {
m.retain(|k, _| !k.starts_with("font") && k != "lineHeight" && k != "letterSpacing");
let n = doc.get(id)?;
let (is_text, corners, frame) = (matches!(n.kind, NodeKind::Text(_)), n.kind.has_corner_radius(), n.kind.is_frame_like());
let takes = |k: &str| {
let text = k.starts_with("font") || k.starts_with("paragraph") || matches!(k, "lineHeight" | "letterSpacing" | "textStyle");
let corner = k == "cornerSmoothing" || k.ends_with("Radius");
let grid = k == "gridStyle" || k == "grids" || k.starts_with("layoutGrids/");
(is_text || !text) && (corners || !corner) && (frame || !grid)
};
m.retain(|k, _| takes(k));
// A style or variable the file doesn't have (deleted since the copy) isn't here to link to: the
// values it gave are pasted without a link, so the layer's own link goes too.
let here = |v: &Value| v.as_str().is_none_or(|sid| doc.style(sid).is_some());
for (k, v) in m.iter_mut() {
if k.ends_with("Style") && !k.starts_with("font") && !here(v) {
*v = Value::Null;
}
}
if !doc.get(id)?.kind.has_corner_radius() {
m.remove("cornerRadius");
m.remove("cornerSmoothing");
if let Some(Value::Object(copied)) = m.get_mut("boundVariables") {
copied.retain(|_, v| v.as_str().is_some_and(|vid| doc.variables.get_by_id(vid).is_some()));
}
// The layer's own bindings on what is pasted give way to the copied layer's: kept, a binding
// would hold the old value over the pasted one. A binding on what the copy doesn't carry (a
// text layer's font size, pasted from a frame) stays.
if let Some(Value::Object(copied)) = m.get("boundVariables") {
let mut bound: serde_json::Map<String, Value> =
n.bound.keys().filter(|f| copied_binding(f) && m.contains_key(pasted_key(f))).map(|f| (f.clone(), Value::Null)).collect();
bound.extend(copied.iter().filter(|(f, _)| takes(f)).map(|(f, v)| (f.clone(), v.clone())));
m.insert("boundVariables".into(), Value::Object(bound));
}
crate::cmd::props::apply(cmd, doc, id, &m)
}
/// The key of the properties [`copy_props_of`] copies that sets what a variable bound to `field`
/// sets: a corner's radius is `cornerRadius`, a side's stroke weight `strokeWeight`, the font
/// weight `fontStyle`, a layout grid's field `grids` and a paint's or effect's field its list.
fn pasted_key(field: &str) -> &str {
match field {
"topLeftRadius" | "topRightRadius" | "bottomRightRadius" | "bottomLeftRadius" => "cornerRadius",
f if crate::cmd::props::STROKE_SIDES.contains(&f) => "strokeWeight",
"fontWeight" => "fontStyle",
f => match f.split_once('/') {
Some(("layoutGrids", _)) => "grids",
Some((list, _)) => list,
None => f,
},
}
}
/// Whether a variable bound to `field` goes with the properties [`copy_props_of`] copies: not a
/// size, auto layout spacing, visibility or text content.
fn copied_binding(field: &str) -> bool {
!matches!(
field,
"width"
| "height"
| "minWidth"
| "maxWidth"
| "minHeight"
| "maxHeight"
| "gap"
| "columnGap"
| "rowGap"
| "crossGap"
| "padding"
| "paddingHorizontal"
| "paddingVertical"
| "paddingTop"
| "paddingRight"
| "paddingBottom"
| "paddingLeft"
| "visible"
| "characters"
)
}
pub(super) fn paste_props(s: &mut Session, p: &Value) -> Result<Value> {
let props = s.clipboard.props.clone().ok_or_else(|| EngineError::Disabled("edit.pasteProperties".into(), "no copied properties".into()))?;
let mut props = s.clipboard.props.clone().ok_or_else(|| EngineError::Disabled("edit.pasteProperties".into(), "no copied properties".into()))?;
if s.ds()?.uid != s.clipboard.props_source_doc {
props = without_links(props);
}
let ids = req_targets("edit.pasteProperties", s, p)?;
let doc = s.doc_mut()?;
for i in ids {
+2
View File
@@ -698,6 +698,8 @@ mod export_bounds_tests;
#[cfg(test)]
mod page_view_tests;
#[cfg(test)]
mod paste_properties_tests;
#[cfg(test)]
mod selection_reorder_tests;
#[cfg(test)]
mod selection_spacing_tests;
+116
View File
@@ -0,0 +1,116 @@
//! Copy properties and Paste properties (Alt+Cmd/Ctrl+C and V) carry what a layer's look comes
//! from as well as its values: its colour, effect and grid styles, the variables bound to what is
//! copied and a frame's layout grids. A link the file pasted into doesn't have is left out.
use figcraft_doc::{LayoutGrid, NodeId};
use serde_json::{Value, json};
use crate::Session;
fn id(v: Value) -> NodeId {
NodeId(v["id"].as_u64().unwrap())
}
fn frame(s: &mut Session, x: f64) -> NodeId {
id(s.execute("frame.create", &json!({"x": x, "y": 0, "width": 100, "height": 100})).unwrap())
}
fn copy_onto(s: &mut Session, from: NodeId, to: NodeId) {
s.execute("edit.copyProperties", &json!({"id": from})).unwrap();
s.execute("edit.pasteProperties", &json!({"ids": [to]})).unwrap();
}
#[test]
fn a_frame_pastes_its_styles_variables_and_layout_grids() {
let mut s = Session::new();
let (a, b, c) = (frame(&mut s, 0.0), frame(&mut s, 200.0), frame(&mut s, 400.0));
s.execute("variable.createCollection", &json!({"name": "Tokens"})).unwrap();
for (name, value) in [("surface", "#FF0000"), ("other", "#0000FF")] {
s.execute("variable.create", &json!({"collection": "Tokens", "name": name, "type": "color", "value": value})).unwrap();
}
s.execute("variable.create", &json!({"collection": "Tokens", "name": "radius", "type": "number", "value": 16})).unwrap();
s.execute("variable.bind", &json!({"ids": [a], "field": "fills/0/color", "variable": "surface"})).unwrap();
s.execute("variable.bind", &json!({"ids": [a], "field": "cornerRadius", "variable": "radius"})).unwrap();
s.execute("node.set", &json!({"ids": [a], "props": {"grids": [serde_json::to_value(LayoutGrid::default()).unwrap()]}})).unwrap();
// B is bound to another colour, which the paste replaces.
s.execute("variable.bind", &json!({"ids": [b], "field": "fills/0/color", "variable": "other"})).unwrap();
let shadow = s.execute("style.create", &json!({"type": "effect", "name": "Shadow", "value": [{"type": "dropShadow"}]})).unwrap()["id"].clone();
let green = s.execute("style.create", &json!({"type": "paint", "name": "Green", "value": "#00FF00"})).unwrap()["id"].clone();
s.execute("style.apply", &json!({"ids": [c], "style": green})).unwrap();
s.execute("style.apply", &json!({"ids": [c], "style": shadow})).unwrap();
copy_onto(&mut s, a, b);
let (na, nb) = (s.doc().unwrap().node(a).unwrap().clone(), s.doc().unwrap().node(b).unwrap().clone());
assert_eq!(nb.bound.get("fills/0/color"), na.bound.get("fills/0/color"), "the fill follows the same variable");
assert_eq!(nb.bound.get("cornerRadius"), na.bound.get("cornerRadius"), "and so do the corners");
assert_eq!(nb.corners.radii, [16.0; 4]);
assert_eq!(nb.grids, na.grids, "a frame's layout grids come along");
copy_onto(&mut s, c, a);
let (na, nc) = (s.doc().unwrap().node(a).unwrap().clone(), s.doc().unwrap().node(c).unwrap().clone());
assert_eq!(na.styles.fill, nc.styles.fill, "the fill style is linked");
assert!(nc.styles.effect.is_some() && na.styles.effect == nc.styles.effect, "the effect style too");
assert!(!na.bound.contains_key("fills/0/color"), "the style replaces the fill's variable");
assert!(!na.bound.contains_key("cornerRadius"), "C's corners aren't bound, so A's aren't any more");
assert!(na.grids.is_empty(), "nor has it layout grids");
assert_eq!(na.fills, nc.fills);
}
#[test]
fn links_another_file_lacks_paste_as_values() {
let mut s = Session::new();
let a = frame(&mut s, 0.0);
s.execute("variable.createCollection", &json!({"name": "Tokens"})).unwrap();
s.execute("variable.create", &json!({"collection": "Tokens", "name": "surface", "type": "color", "value": "#FF0000"})).unwrap();
s.execute("variable.bind", &json!({"ids": [a], "field": "fills/0/color", "variable": "surface"})).unwrap();
let st = s.execute("style.create", &json!({"type": "paint", "name": "Line", "value": "#00FF00"})).unwrap()["id"].clone();
s.execute("node.set", &json!({"ids": [a], "props": {"strokes": [{"type": "solid", "color": "#000000"}]}})).unwrap();
s.execute("style.apply", &json!({"ids": [a], "style": st, "target": "stroke"})).unwrap();
s.execute("edit.copyProperties", &json!({"id": a})).unwrap();
let copied = s.doc().unwrap().node(a).unwrap().clone();
s.execute("file.new", &json!({})).unwrap();
let b = frame(&mut s, 0.0);
// This file's own style and variable come out with the copied ids: they are not the copied ones.
s.execute("variable.createCollection", &json!({"name": "Theirs"})).unwrap();
s.execute("variable.create", &json!({"collection": "Theirs", "name": "ink", "type": "color", "value": "#0000FF"})).unwrap();
s.execute("style.create", &json!({"type": "paint", "name": "Ink", "value": "#0000FF"})).unwrap();
let doc = s.doc().unwrap();
let vid = copied.bound["fills/0/color"].as_str();
assert!(doc.style(st.as_str().unwrap()).is_some() && doc.variables.get_by_id(vid).is_some(), "the ids are taken here");
s.execute("edit.pasteProperties", &json!({"ids": [b]})).unwrap();
let nb = s.doc().unwrap().node(b).unwrap();
assert_eq!((nb.fills.clone(), nb.strokes.clone()), (copied.fills, copied.strokes), "the values arrive");
assert!(nb.bound.is_empty() && nb.styles.fill.is_none() && nb.styles.stroke.is_none(), "{:?} {:?}", nb.bound, nb.styles);
}
#[test]
fn a_missing_style_unlinks_the_layers_own() {
let mut s = Session::new();
let (a, b) = (frame(&mut s, 0.0), frame(&mut s, 200.0));
// B's own style gives the same colour, so the paste changes no value that would unlink it.
let gone = s.execute("style.create", &json!({"type": "paint", "name": "Gone", "value": "#00FF00"})).unwrap()["id"].clone();
let own = s.execute("style.create", &json!({"type": "paint", "name": "Own", "value": "#00FF00"})).unwrap()["id"].clone();
s.execute("style.apply", &json!({"ids": [a], "style": gone, "target": "stroke"})).unwrap();
s.execute("style.apply", &json!({"ids": [b], "style": own, "target": "stroke"})).unwrap();
s.execute("edit.copyProperties", &json!({"id": a})).unwrap();
s.execute("style.delete", &json!({"style": gone})).unwrap();
s.execute("edit.pasteProperties", &json!({"ids": [b]})).unwrap();
let nb = s.doc().unwrap().node(b).unwrap();
assert!(nb.styles.stroke.is_none(), "A's strokes had no style here, so B's aren't linked: {:?}", nb.styles);
}
#[test]
fn a_binding_on_what_the_copy_doesnt_carry_stays() {
let mut s = Session::new();
let a = frame(&mut s, 0.0);
let t = id(s.execute("text.create", &json!({"text": "Hi", "x": 0, "y": 200})).unwrap());
s.execute("variable.createCollection", &json!({"name": "Tokens"})).unwrap();
s.execute("variable.create", &json!({"collection": "Tokens", "name": "body", "type": "number", "value": 18})).unwrap();
s.execute("variable.bind", &json!({"ids": [t], "field": "fontSize", "variable": "body"})).unwrap();
let before = s.doc().unwrap().node(t).unwrap().bound.get("fontSize").cloned();
copy_onto(&mut s, a, t);
let nt = s.doc().unwrap().node(t).unwrap();
assert!(before.is_some() && nt.bound.get("fontSize") == before.as_ref(), "a frame carries no font size: {:?}", nt.bound);
}
+3
View File
@@ -201,6 +201,9 @@ pub struct Clipboard {
pub images: std::collections::BTreeMap<String, figcraft_doc::ImageData>,
/// Copied properties (Copy properties / Paste properties).
pub props: Option<Value>,
/// The file the copied properties came from: their style and variable ids name its styles and
/// variables, and in another file the same ids can name unrelated ones.
pub props_source_doc: u64,
/// A copied fill or stroke row (`fill.copy`, `stroke.copy`): whether it's a fill, and the paint.
pub paint: Option<(bool, figcraft_color::Paint)>,
/// The stroke settings (`weight`, alignment, sides…) copied with a stroke's paint.
+2 -1
View File
@@ -1,6 +1,6 @@
# UI and interaction parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-19 · **Change:** minor (mind maps from the toolbar and the keyboard: Shapes ▸ Mind map places one with a click, Cmd/Ctrl+Enter adds a child and Shift+Cmd/Ctrl+Enter a sibling, Tab goes to the next sibling (#2226); a dragged layer is drawn from a sprite that moves with its outline (#2033); the Scale tool keeps variable-bound lengths scaled: a scaled instance keeps its bindings and draws them at the variable's value times its scale factor, other scaled layers keep the scaled value and drop the binding (#2090); Type settings ▸ Details ▸ Position sets the selected text layers to superscript or subscript, or neither (#2338); Shift with the Pencil, Marker or Highlighter draws one straight segment from where the stroke started, at the nearest 45° step, as the Line tool and the Pen do (#2447); the Design panel's header names a selected component or component set, after its icon, instead of only its type (#2347); dragging near the canvas edge pans the view toward it, as measured in Figma: 40 px/s for each px within about 15 px of the edge, 600 px/s at it, for moving layers, the selection box, drawing and prototype connections (#2015); M8: a Shift-click range in the Layers panel across parents keeps a frame and not its covered children, measured in Figma's web app on 2026-11-12; points align and distribute in vector edit mode as in Figma: the six Align commands, the keys Alt+A/H/D/W/V/S, and Distribute horizontal and vertical spacing act on the selected points, each moving along one axis to their box's edge or centre line, spaced evenly between the outermost for distribute, with the alignment row first in the Design panel (#2109); going back to a page shows it where it was left, not fitted again; Duplicate repeats the last copy's move and its rotation (about the copy's centre, or the selection's centre for several layers), not its size, and forgets the step when the selection changes, measured in Figma's web app on 2026-11-12 (#2293); M8: a double-click on a layer's icon zooms to it instead of renaming, measured in Figma's web app on 2026-11-12; Tidy up keeps the order and sizes and evens the gaps, as measured in Figma's web app on 2026-11-12, rounds the gap half up, tidies overlapping rows and packs a grid along its longer axis, and is greyed out for fewer than three layers, a diagonal and an irregular layout (M8); after Crop is chosen in the image fill's colour picker, a drag on the image crops it instead of moving the layer, and no internal gesture message shows (#2307); Align is disabled for a layer in an auto layout frame's flow, as measured in Figma's web app on 2026-11-12, with a tip saying the frame places it; Select layer lists locked layers with a padlock and selects them, and shows only with more than one layer under the pointer (#1560); M8: Scale tool handle drags pivot on the opposite handle whatever the origin, and the origin starts at the centre (measured in Figma's web app, 2026-11-09); M8: a selected polygon or star has a Count handle on the canvas, on its first point clockwise from the top; Zoom to selection leaves a 40 pt margin and clears the bottom toolbar, measured in Figma's web app; M1: Paste over selection puts the pasted layers just above the selected layer; drag modifiers compared in Figma's web app (2026-11-08): Shift locks a move to the dominant axis, Alt copies, Shift keeps a resize's ratio, Alt keeps its centre, all read afresh on every move, and FigCraft matches (Ctrl/Cmd not measurable); a mirror mode (angle, or angle and length) on a sharp point turns it smooth, as in Figma (#2110); M8: Tab while renaming the last layer wraps to the first row, measured in Figma's web app on 2026-11-12; the text caret takes the text's solid fill colour (#2156); the Rotation field shows and sets the rotation on the page, in frames and groups, through node.set absoluteRotation (#2196); the eyedropper picks a magnified image's pixel under the pointer, not a blend with its neighbours (#2189); Selection colors shows from one distinct colour when a selected layer has children, and from two otherwise, measured in Figma's web app on 2026-11-09 on a frame, a group and plain rectangles; the crosshair of the shape and Text tools is drawn dark with a white edge, so it shows on a white frame whatever the system's pointer style (#2198); a boolean group takes a corner radius (and smoothing) that rounds every sharp corner of its result (#2222); the Point section's X and Y in vector edit mode show Mixed and set every selected point of the layer being edited, as in Figma; Preferences ▸ Invert zoom direction reverses wheel zoom, pinch unchanged (#2145); Shift while rotating lands on absolute multiples of 15°, measured in Figma; Flatten bakes a vector's point corner radius into its path (#2195); a click on a fill, stroke or effect row's grip or background highlights it, Cmd/Ctrl+C copies that paint or effect and Cmd/Ctrl+V pastes it onto the selecteLine truncated
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-24 · **Change:** minor (Paste properties links the copied layer's colour, effect, grid and text styles and binds the variables it follows, and a frame's layout grids come along; links another file lacks paste as values; mind maps from the toolbar and the keyboard: Shapes ▸ Mind map places one with a click, Cmd/Ctrl+Enter adds a child and Shift+Cmd/Ctrl+Enter a sibling, Tab goes to the next sibling (#2226); a dragged layer is drawn from a sprite that moves with its outline (#2033); the Scale tool keeps variable-bound lengths scaled: a scaled instance keeps its bindings and draws them at the variable's value times its scale factor, other scaled layers keep the scaled value and drop the binding (#2090); Type settings ▸ Details ▸ Position sets the selected text layers to superscript or subscript, or neither (#2338); Shift with the Pencil, Marker or Highlighter draws one straight segment from where the stroke started, at the nearest 45° step, as the Line tool and the Pen do (#2447); the Design panel's header names a selected component or component set, after its icon, instead of only its type (#2347); dragging near the canvas edge pans the view toward it, as measured in Figma: 40 px/s for each px within about 15 px of the edge, 600 px/s at it, for moving layers, the selection box, drawing and prototype connections (#2015); M8: a Shift-click range in the Layers panel across parents keeps a frame and not its covered children, measured in Figma's web app on 2026-11-12; points align and distribute in vector edit mode as in Figma: the six Align commands, the keys Alt+A/H/D/W/V/S, and Distribute horizontal and vertical spacing act on the selected points, each moving along one axis to their box's edge or centre line, spaced evenly between the outermost for distribute, with the alignment row first in the Design panel (#2109); going back to a page shows it where it was left, not fitted again; Duplicate repeats the last copy's move and its rotation (about the copy's centre, or the selection's centre for several layers), not its size, and forgets the step when the selection changes, measured in Figma's web app on 2026-11-12 (#2293); M8: a double-click on a layer's icon zooms to it instead of renaming, measured in Figma's web app on 2026-11-12; Tidy up keeps the order and sizes and evens the gaps, as measured in Figma's web app on 2026-11-12, rounds the gap half up, tidies overlapping rows and packs a grid along its longer axis, and is greyed out for fewer than three layers, a diagonal and an irregular layout (M8); after Crop is chosen in the image fill's colour picker, a drag on the image crops it instead of moving the layer, and no internal gesture message shows (#2307); Align is disabled for a layer in an auto layout frame's flow, as measured in Figma's web app on 2026-11-12, with a tip saying the frame places it; Select layer lists locked layers with a padlock and selects them, and shows only with more than one layer under the pointer (#1560); M8: Scale tool handle drags pivot on the opposite handle whatever the origin, and the origin starts at the centre (measured in Figma's web app, 2026-11-09); M8: a selected polygon or star has a Count handle on the canvas, on its first point clockwise from the top; Zoom to selection leaves a 40 pt margin and clears the bottom toolbar, measured in Figma's web app; M1: Paste over selection puts the pasted layers just above the selected layer; drag modifiers compared in Figma's web app (2026-11-08): Shift locks a move to the dominant axis, Alt copies, Shift keeps a resize's ratio, Alt keeps its centre, all read afresh on every move, and FigCraft matches (Ctrl/Cmd not measurable); a mirror mode (angle, or angle and length) on a sharp point turns it smooth, as in Figma (#2110); M8: Tab while renaming the last layer wraps to the first row, measured in Figma's web app on 2026-11-12; the text caret takes the text's solid fill colour (#2156); the Rotation field shows and sets the rotation on the page, in frames and groups, through node.set absoluteRotation (#2196); the eyedropper picks a magnified image's pixel under the pointer, not a blend with its neighbours (#2189); Selection colors shows from one distinct colour when a selected layer has children, and from two otherwise, measured in Figma's web app on 2026-11-09 on a frame, a group and plain rectangles; the crosshair of the shape and Text tools is drawn dark with a white edge, so it shows on a white frame whatever the system's pointer style (#2198); a boolean group takes a corner radius (and smoothing) that rounds every sharp corner of its result (#2222); the Point section's X and Y in vector edit mode show Mixed and set every selected point of the layer being edited, as in Figma; Preferences ▸ Invert zoom direction reverses wheel zoom, pinch unchanged (#2145); Shift while rotating lands on absolute multiples of 15°, measured in Figma; Flatten bakes a vector's poiLine truncated
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:
@@ -214,6 +214,7 @@ This audit records candidates for subsequent fixes; their behaviour is unchanged
|---|---|---|
| 2026-11-09 | patch | M8, #2033: a dragged layer moves with its outline: the layers a translate-only drag moves are drawn from a sprite (a texture rendered once at the start) at the same shift as the outline, and the base render, made once without them, is not asked for again until the drag ends (see the row "A dragged layer moves with its outline" for the conditions and trade-offs). |
| 2026-11-09 | patch | M3, #2090: the Scale tool no longer snaps variable-bound lengths back to the variable's value. An instance multiplies its new `scale_factor` and keeps its bindings, drawn at the variable's value times the factor (modes and variable edits stay live); every other scaled layer outside an instance keeps the scaled value and drops the binding of the length fields it scaled, and so does a scaled instance's own layer when the instance is detached (the instances inside it take its factor on). Measured in the incumbent for the gap only (an instance keeps the binding at value x factor, a plain frame bakes it, and detaching a scaled instance bakes it); the other lengths are assumed to follow, and a main component is unmeasured; a scale that would take an instance past 0.001 to 1000 times is refused. Tests: `scale_bound_values_tests`. |
| 2026-11-24 | patch | M4: Copy properties (Alt+Cmd/Ctrl+C) took a layer's values and left behind what they come from: a frame filled from a colour variable or a style pasted a plain colour, unlinked, and a pasted layer's own bindings stayed and could hold the old value over the pasted one. It now also carries the fill, stroke, effect, grid and text style links, the variables bound to what it copies (not size, auto layout spacing, visibility or text content) and a frame's layout grids; the pasted layer's bindings on what the copy carries give way, others stay. Pasted into another file (the copy came from another tab), or after its style was deleted, a link is left out, its values pasted and the layer's own link on them dropped. Tests: `paste_properties_tests` (4). |
| 2026-11-19 | patch | M4, #2338: superscript and subscript were drawn (#1868) but nothing in the interface set them. Type settings ▸ Details now starts with Position: None, Superscript (X²) or Subscript (X₂), for the selected text layers, through `text.setFeatures` (`sups`, `subs`; choosing one clears the other). It shows the layers' current position, none when they differ. Raising a range of characters on its own needs per-run features and is left for a separate change. Test: `typography::variable_tests::details_position_sets_superscript_subscript_or_neither`. |
| 2026-11-19 | patch | M1, #2447: Shift did nothing with the Pencil: a stroke stayed freehand while the Line tool and the Pen keep theirs to 45° steps. With Shift held, the Pencil (and the Marker and Highlighter) now draws one straight segment from where the stroke started to the pointer, at the nearest 45° step; the preview shows it. A Shift-click without a move draws nothing, as before. Tests: `pencil_shift_tests`. |
| 2026-11-19 | patch | M3, #2347: with one component or component set selected, the Design panel's header said only "Component" or "Component set", so the selected one's name was only in the Layers panel. It now shows the name after a component icon (cut short with an ellipsis clear of the quick actions), with the type, and the whole name when cut, on hover. Other layers keep their type. Test: `component_header_tests::the_header_names_the_selected_component_or_set`. |