mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-08 19:42:05 +00:00
M1: scrubbing a field faster or slower by the pointer's height, with a notice of the speed (#1837)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
f9b5693621
commit
3d704ce4c0
6 files changed
+117
-8
No files matched your search
@@ -361,6 +361,12 @@ pub static GESTURES: &[(Group, &str, &str, &str)] = &[
|
||||
(Edit, "Duplicate by dragging", "⌥ drag", "Alt+drag"),
|
||||
(Transform, "Nudge (Shift: big nudge)", "← ↑ → ↓", "← ↑ → ↓"),
|
||||
(Transform, "Resize by the nudge amount", "⌘ arrows", "Ctrl+arrows"),
|
||||
(
|
||||
Transform,
|
||||
"Scrub a field faster (2x) or slower (1/2, 1/4)",
|
||||
"Move up or down while dragging its label",
|
||||
"Move up or down while dragging its label",
|
||||
),
|
||||
(Transform, "Opacity 10%…90%, 0: 100%", "1…9, 0", "1…9, 0"),
|
||||
(Transform, "Exact opacity (4 then 5: 45%)", "Two digits", "Two digits"),
|
||||
(Transform, "Suspend snapping while dragging", "Hold ⌃ or ⌘", "Hold Ctrl"),
|
||||
|
||||
@@ -407,6 +407,12 @@ name = "English"
|
||||
"Decoration style" = "Decoration style"
|
||||
"Decoration" = "Decoration"
|
||||
"Deep select" = "Deep select"
|
||||
"Scrub a field faster (2x) or slower (1/2, 1/4)" = "Scrub a field faster (2x) or slower (1/2, 1/4)"
|
||||
"Move up or down while dragging its label" = "Move up or down while dragging its label"
|
||||
"Scrubbing at 2x" = "Scrubbing at 2x"
|
||||
"Scrubbing at 1x" = "Scrubbing at 1x"
|
||||
"Scrubbing at 1/2" = "Scrubbing at 1/2"
|
||||
"Scrubbing at 1/4" = "Scrubbing at 1/4"
|
||||
"Default" = "Default"
|
||||
"Default content" = "Default content"
|
||||
"Default value (the top-left variant)" = "Default value (the top-left variant)"
|
||||
|
||||
@@ -383,6 +383,10 @@ impl FigApp {
|
||||
self.end_pen_outside_design();
|
||||
dialogs::show(self, &ctx);
|
||||
updates_ui::show(self, &ctx);
|
||||
// A scrub that changed speed (the pointer moved up or down) says so at the bottom.
|
||||
if let Some(notice) = ctx.data_mut(|d| d.remove_temp::<&'static str>(widgets::scrub_notice_id())) {
|
||||
self.toast(i18n::tr(notice));
|
||||
}
|
||||
self.toast_ui(&ctx);
|
||||
// A rename started after the layers panel drew (Cmd/Ctrl+R, a double-click) opens its field
|
||||
// next frame.
|
||||
|
||||
@@ -246,6 +246,25 @@ fn scrub(u: &mut Ui, name: &str, dx: f32, modifiers: Modifiers) {
|
||||
drag(u, from, dx, modifiers);
|
||||
}
|
||||
|
||||
/// Press at field `name`'s label, move `rise` points up (down when negative), then `dx` sideways
|
||||
/// in small steps at that height, and let go.
|
||||
fn scrub_at_height(u: &mut Ui, name: &str, rise: f32, dx: f32) {
|
||||
let from = label(u, name);
|
||||
let m = Modifiers::NONE;
|
||||
let press = |pressed, pos| Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: m };
|
||||
u.frame_with(vec![Event::PointerMoved(from), press(true, from)], m);
|
||||
for k in 1..=5 {
|
||||
u.frame_with(vec![Event::PointerMoved(pos2(from.x, from.y - rise * k as f32 / 5.0))], m);
|
||||
}
|
||||
let up = pos2(from.x, from.y - rise);
|
||||
for k in 1..=10 {
|
||||
u.frame_with(vec![Event::PointerMoved(pos2(up.x + dx * k as f32 / 10.0, up.y))], m);
|
||||
}
|
||||
let to = pos2(up.x + dx, up.y);
|
||||
u.frame_with(vec![Event::PointerMoved(to), press(false, to)], m);
|
||||
u.frame(vec![]);
|
||||
}
|
||||
|
||||
/// Press at `from`, move `dx` points sideways in small steps with `modifiers` held, then let go.
|
||||
fn drag(u: &mut Ui, from: Pos2, dx: f32, modifiers: Modifiers) {
|
||||
let press = |pressed| Event::PointerButton { pos: from, button: egui::PointerButton::Primary, pressed, modifiers };
|
||||
@@ -262,6 +281,44 @@ fn drag(u: &mut Ui, from: Pos2, dx: f32, modifiers: Modifiers) {
|
||||
u.frame(vec![]);
|
||||
}
|
||||
|
||||
/// "Change the speed that you scrub the field by moving the cursor towards the top of the screen
|
||||
/// to increase the scrubbing speed, or towards the bottom of the screen to reduce it. You'll see a
|
||||
/// notification at the bottom of the screen for the current speed [...] There are four scrubbing
|
||||
/// speeds: 2x, 1x, 1/2, and 1/4" (Adjust alignment, rotation, position and dimensions, #1837):
|
||||
/// more than 100 points above where the scrub began is 2x, that far below 1/2, twice as far 1/4.
|
||||
#[test]
|
||||
fn moving_up_or_down_while_scrubbing_changes_the_speed_and_says_so() {
|
||||
let (mut u, a, _) = setup();
|
||||
let toast = |u: &Ui| u.app.ui.toast.clone().map(|t| t.0).unwrap_or_default();
|
||||
// (rise in points, how far 40 points of scrub move X, the notice)
|
||||
for (rise, want, notice) in [(150.0, 80.0, "2x"), (0.0, 40.0, ""), (-150.0, 20.0, "1/2"), (-300.0, 10.0, "1/4"), (40.0, 40.0, "")] {
|
||||
let x0 = geom(&u, a).0;
|
||||
u.app.ui.toast = None;
|
||||
scrub_at_height(&mut u, "X", rise, 40.0);
|
||||
assert_eq!(geom(&u, a).0 - x0, want, "rise {rise}");
|
||||
if notice.is_empty() {
|
||||
assert!(toast(&u).is_empty(), "no notice at the usual speed: {}", toast(&u));
|
||||
} else {
|
||||
assert!(toast(&u).contains(notice), "rise {rise}: the notice says {}", toast(&u));
|
||||
}
|
||||
}
|
||||
// Speeds compose with the modifiers' rates: 2x with Shift is twenty steps a point.
|
||||
let x0 = geom(&u, a).0;
|
||||
let from = label(&mut u, "X");
|
||||
let shift = Modifiers { shift: true, ..Modifiers::NONE };
|
||||
let press = |pressed, pos| Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: shift };
|
||||
u.frame_with(vec![Event::PointerMoved(from), press(true, from)], shift);
|
||||
let up = pos2(from.x, from.y - 150.0);
|
||||
u.frame_with(vec![Event::PointerMoved(up)], shift);
|
||||
for k in 1..=5 {
|
||||
u.frame_with(vec![Event::PointerMoved(pos2(up.x + 2.0 * k as f32, up.y))], shift);
|
||||
}
|
||||
let to = pos2(up.x + 10.0, up.y);
|
||||
u.frame_with(vec![Event::PointerMoved(to), press(false, to)], shift);
|
||||
u.frame(vec![]);
|
||||
assert_eq!(geom(&u, a).0 - x0, 200.0, "ten points at 2x with Shift");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scrubbing_the_label_moves_the_value_and_is_one_undo_step() {
|
||||
let (mut u, a, _) = setup();
|
||||
|
||||
@@ -5,7 +5,7 @@ use egui::{Align2, Color32, CornerRadius, Id, Rect, Response, Sense, Stroke, Str
|
||||
|
||||
use crate::a11y::{self, Tip};
|
||||
pub use crate::field_math::{Rel, Typed, eval, parse, stepped};
|
||||
use crate::i18n::tr;
|
||||
use crate::i18n::{tr, tr_noop};
|
||||
use crate::icons::{self, Icon};
|
||||
use crate::theme::{Tokens, regular, semibold};
|
||||
pub(crate) mod board_picker;
|
||||
@@ -125,6 +125,34 @@ pub fn scrub_amount(dx: f64, step: f64, shift: bool, alt: bool) -> f64 {
|
||||
}
|
||||
}
|
||||
|
||||
/// How far above where a scrub began the pointer has to be for the fast speed (points); the same
|
||||
/// below for the slow one and twice that for the slowest. The help center gives the speeds, not
|
||||
/// the distances.
|
||||
pub const SCRUB_BAND: f64 = 100.0;
|
||||
|
||||
/// The scrubbing speed by the pointer's height, `rise` points above where the scrub began (below
|
||||
/// when negative): a factor on the scrub and the notice for it ("Change the speed that you scrub
|
||||
/// the field by moving the cursor towards the top of the screen to increase the scrubbing speed,
|
||||
/// or towards the bottom of the screen to reduce it. You'll see a notification at the bottom of
|
||||
/// the screen for the current speed [...] There are four scrubbing speeds: 2x, 1x, 1/2, and 1/4",
|
||||
/// Adjust alignment, rotation, position and dimensions).
|
||||
pub fn scrub_speed(rise: f64) -> (f64, &'static str) {
|
||||
if rise > SCRUB_BAND {
|
||||
(2.0, tr_noop("Scrubbing at 2x"))
|
||||
} else if rise < -2.0 * SCRUB_BAND {
|
||||
(0.25, tr_noop("Scrubbing at 1/4"))
|
||||
} else if rise < -SCRUB_BAND {
|
||||
(0.5, tr_noop("Scrubbing at 1/2"))
|
||||
} else {
|
||||
(1.0, tr_noop("Scrubbing at 1x"))
|
||||
}
|
||||
}
|
||||
|
||||
/// Where a scrub leaves the notice of a changed speed for the window to show as a toast.
|
||||
pub fn scrub_notice_id() -> Id {
|
||||
Id::unique("scrub_speed_notice")
|
||||
}
|
||||
|
||||
/// The value a scrub that began at `from` and has moved `amount` (see [`scrub_amount`]) shows:
|
||||
/// whole steps of `quantum` away from where it began.
|
||||
pub fn scrubbed(from: f64, amount: f64, quantum: f64) -> f64 {
|
||||
@@ -140,8 +168,8 @@ pub(crate) fn scrub(ui: &Ui, id: Id, response: &Response, value: Option<f64>, st
|
||||
let scrub_id = id.with("scrub");
|
||||
if response.dragged() || response.drag_stopped() {
|
||||
let began = response.drag_started();
|
||||
let (v0, mut amount): (f64, f64) = ui.data(|d| d.get_temp(scrub_id)).filter(|_| !began).unwrap_or((v, 0.0));
|
||||
let (dx, shift, alt) = ui.input(|i| {
|
||||
let (v0, mut amount, last_speed): (f64, f64, &'static str) = ui.data(|d| d.get_temp(scrub_id)).filter(|_| !began).unwrap_or((v, 0.0, ""));
|
||||
let (dx, rise, shift, alt) = ui.input(|i| {
|
||||
let p = &i.pointer;
|
||||
// As it begins: all the way from the press (a drag is one only after a few points).
|
||||
let moved = if began { p.hover_pos().zip(p.press_origin()).map_or(0.0, |(at, from)| at.x - from.x) } else { p.delta().x };
|
||||
@@ -150,12 +178,19 @@ pub(crate) fn scrub(ui: &Ui, id: Id, response: &Response, value: Option<f64>, st
|
||||
// does too. Elsewhere the scrub just stops there.
|
||||
let raw = p.motion().map_or(0.0, |m| m.x / i.pixels_per_point);
|
||||
let at_edge = moved == 0.0 && p.hover_pos().is_none_or(|at| at.x <= 1.0 || at.x >= i.content_rect().max.x - 1.0);
|
||||
(f64::from(if at_edge { raw } else { moved }), i.modifiers.shift, i.modifiers.alt)
|
||||
// How far above where the scrub began the pointer is: the speed (`scrub_speed`).
|
||||
let rise = p.hover_pos().zip(p.press_origin()).map_or(0.0, |(at, from)| f64::from(from.y - at.y));
|
||||
(f64::from(if at_edge { raw } else { moved }), rise, i.modifiers.shift, i.modifiers.alt)
|
||||
});
|
||||
let (speed, notice) = scrub_speed(rise);
|
||||
// The frame the button goes up moves nothing: the scrub ends where the last one left it.
|
||||
if response.dragged() {
|
||||
amount += scrub_amount(dx, step, shift, alt);
|
||||
ui.data_mut(|d| d.insert_temp(scrub_id, (v0, amount)));
|
||||
amount += scrub_amount(dx, step, shift, alt) * speed;
|
||||
// A change of speed is said once (not the usual speed a scrub starts at).
|
||||
if notice != last_speed && !(last_speed.is_empty() && speed == 1.0) {
|
||||
ui.data_mut(|d| d.insert_temp(scrub_notice_id(), notice));
|
||||
}
|
||||
ui.data_mut(|d| d.insert_temp(scrub_id, (v0, amount, notice)));
|
||||
}
|
||||
let quantum = if alt { step * 0.1 } else { step };
|
||||
return Some(FieldEdit::Scrub(scrubbed(v0, amount, quantum), response.drag_stopped()));
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
# UI and interaction parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-01 · **Change:** minor (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-02 · **Change:** patch (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); 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:
|
||||
@@ -70,7 +70,7 @@ interaction feel not yet compared.
|
||||
| Ctrl to suspend snapping while dragging (macOS) | done | Control on macOS (Cmd keeps working), Ctrl elsewhere; moving, resizing and drawing |
|
||||
| Measure (Alt hover, Cmd+Alt nested, Shift+Alt padding/gaps) | done | labels never overlap; the arrows still nudge while measuring (Shift: the big step) and the distances follow; the selection's handles and size label hide while measuring (`measure_nudge_tests`, #894) |
|
||||
| Pixel grid snapping, pixel preview, 2x preview | done | moves, resizes and new shapes land on whole pixels; the pixel grid shows from 400% (`view_behaviour_tests`) |
|
||||
| Numeric fields: arithmetic, scrubbing by dragging the label, mixed values | done | Numeric panels use `widgets::number_field`; Corner smoothing has an original code-drawn icon, a 24 pt drag target and an accessible name, with live changes, fractional values preserved across consecutive drags, Shift/Alt rates, 0–100% clamping and one-step undo/redo (`corner_individual_tests`); Typography line height, letter spacing and paragraph spacing share its leading-icon scrub logic (#373), retaining their existing unit parsing, Auto/Mixed values, variable chips and selected-character targeting (`typography_scrub_tests`). Scrubbing the label: a step a point (1 px; 1% of opacity, 1° of rotation), ten with Shift, a tenth with Alt, each stretch at the rate held while it was dragged, one undo step when let go; past the edge of the screen it goes on where the platform reports the mouse's own motion (desktop), otherwise it stops there. Arrow keys: Up/Down step a pixel field by the small nudge and Shift by the big nudge (the preferences), other fields by their own step and ten of it; they work while typing (from what is typed) and with the keyboard on the field. Typing: `+ - * /`, brackets, units (`px`, `°`, `%`, `x`, `ms`), a decimal comma; `+10`, `*2`, `/4` are relative to the value, and `50%`, `+10%`, `-10%` too in a field that isn't a percentage. Enter, Tab or a click elsewhere commits (Tab and Shift+Tab move to the next and previous control), Escape restores; a field left as it was commits nothing (no undo step, and a rounded display isn't written back). Mixed values show "Mixed": a number sets them all, a relative edit or an arrow key goes to each layer from its own value in one undo step, for X, Y, W, H, rotation, opacity, corner radius and stroke weight (elsewhere `+10` on Mixed sets 10 and `*2` does nothing) (`field_tests`). Left: scrubbing a Mixed field (nothing happens), `x2`-style suffix edits, the pointer isn't wrapped to the other side of the screen; rates not compared with Figma's |
|
||||
| Numeric fields: arithmetic, scrubbing by dragging the label, mixed values | done | Numeric panels use `widgets::number_field`; Corner smoothing has an original code-drawn icon, a 24 pt drag target and an accessible name, with live changes, fractional values preserved across consecutive drags, Shift/Alt rates, 0–100% clamping and one-step undo/redo (`corner_individual_tests`); Typography line height, letter spacing and paragraph spacing share its leading-icon scrub logic (#373), retaining their existing unit parsing, Auto/Mixed values, variable chips and selected-character targeting (`typography_scrub_tests`). Scrubbing the label: a step a point (1 px; 1% of opacity, 1° of rotation), ten with Shift, a tenth with Alt, each stretch at the rate held while it was dragged, one undo step when let go; past the edge of the screen it goes on where the platform reports the mouse's own motion (desktop), otherwise it stops there. Arrow keys: Up/Down step a pixel field by the small nudge and Shift by the big nudge (the preferences), other fields by their own step and ten of it; they work while typing (from what is typed) and with the keyboard on the field. Typing: `+ - * /`, brackets, units (`px`, `°`, `%`, `x`, `ms`), a decimal comma; `+10`, `*2`, `/4` are relative to the value, and `50%`, `+10%`, `-10%` too in a field that isn't a percentage. Enter, Tab or a click elsewhere commits (Tab and Shift+Tab move to the next and previous control), Escape restores; a field left as it was commits nothing (no undo step, and a rounded display isn't written back). Mixed values show "Mixed": a number sets them all, a relative edit or an arrow key goes to each layer from its own value in one undo step, for X, Y, W, H, rotation, opacity, corner radius and stroke weight (elsewhere `+10` on Mixed sets 10 and `*2` does nothing) (`field_tests`). Left: scrubbing a Mixed field (nothing happens), `x2`-style suffix edits, the pointer isn't wrapped to the other side of the screen; rates not compared with Figma's; while scrubbing, the pointer's height sets the speed (more than 100 points above where the scrub began: 2x; that far below: 1/2; twice as far: 1/4), a toast names the speed when it changes, and Shift and Alt multiply as before ("Change the speed that you scrub the field by moving the cursor towards the top of the screen to increase the scrubbing speed, or towards the bottom of the screen to reduce it", Scrub fields; #1837) |
|
||||
| Transform box at small sizes | done | a press inside a layer smaller than its handles moves it, the nearest handle wins, handles answer just outside and are hidden under 16 px on screen; cursors follow each handle and the box's rotation |
|
||||
| Locked layers | done | selectable from the layers panel; no handles, not dragged with the rest of a selection |
|
||||
| Smart selection spacing | partial | with layers in a row, a column or an aligned grid selected, the Layout section shows horizontal and vertical spacing ("Mixed" until set; typed, scrubbed, fractional and negative) and pink handles in the gaps on the canvas drag them, one undo step, Escape cancels (`arrange.spacing`; sizes, parents and offsets within each track kept; at most 2,000 layers; flow children, locked layers and layers inside instances left out). A ring at each layer's centre drags it to another place in a regular row, column or complete top-left-aligned grid: the others close up and make room around it with the gaps kept, and with Cmd/Ctrl held the two layers swap places instead, previewed live while dragging (`selection_reorder_tests`; no ring on a layer under 16 px on screen). Not covered: reordering irregular grids, and several marked layers moved together. Checked by its author on macOS and in the app on Windows (#402) |
|
||||
@@ -176,6 +176,7 @@ in the table. `crates/ui-egui/src/shortcut_keys_tests.rs` drives the keys a look
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-02 | patch | M1, #1837: scrubbing speed by the pointer's height (`widgets::scrub_speed`: 2x more than 100 points above where the scrub began, 1/2 that far below, 1/4 twice as far), a toast naming the speed when it changes, Shift and Alt still multiplying; the Keyboard shortcuts panel lists the gesture ("There are four scrubbing speeds: 2x, 1x, 1/2, and 1/4", Scrub fields). Test: `field_tests::moving_up_or_down_while_scrubbing_changes_the_speed_and_says_so`. |
|
||||
| 2026-11-01 | patch | Shortcuts: Cmd/Ctrl+Shift+Alt+= and - make the interface larger and smaller through the sizes Preferences offers, and Cmd/Ctrl+Shift+Alt+0 puts it back to the system's size ("Adjust the scale of the Figma UI [...] Reset to Default: Control ⇧Shift Alt 0; Make Larger: Control ⇧Shift Alt =; Make Smaller: Control ⇧Shift Alt -", Accessibility at Figma); the size is kept at once, as one picked in Preferences is. `pref.uiScaleUp`, `pref.uiScaleDown`, `pref.uiScaleReset`; the sizes list now lives in the engine (`UI_SCALE_SIZES`) and Preferences reads it from there. Found by a documentation audit of the shortcuts. Test: `keymap_tests::the_interface_size_keys_step_through_the_preferences_sizes`. Documented rows 130 → 133, bound 129 → 132 |
|
||||
| 2026-11-01 | patch | Shortcuts: Cmd/Ctrl+Alt+↑/↓ (and ←/→) rotate the selection one degree at a time, 15 with Shift ("Press ⌘Command ⌥Option ↑/ ↓ on Mac or Control Alt ↑/↓ on Windows to rotate an object one degree at a time", Accessibility at Figma); they resized by the nudge before, which Cmd/Ctrl+arrows without Alt still do. Down and right turn clockwise, up and left back (the documentation is silent on the direction). In the shortcuts panel's Transform tab, over the control channel's `ui.key` too. Found by a documentation audit of the shortcuts. Test: `shortcut_keys_tests::cmd_alt_arrows_rotate_a_degree_and_fifteen_with_shift`. Documented rows 129 → 130, bound 128 → 129 |
|
||||
| 2026-11-01 | patch | Shortcuts: the Layers panel opens with Ctrl+1 as well as Alt+1 on Windows and Linux ("Mac: Option 1 Windows: Ctrl 1" in Select layers and objects; "Windows: Alt 1" in Explore the navigation bar and left sidebar). macOS keeps Option+1. Found by a documentation audit of the shortcuts (every chord driven over the control channel). Tests: `keymap_tests::the_layers_panel_answers_both_of_its_documented_windows_keys`, the parity row. Counts unchanged |
|
||||
|
||||
Reference in new issue
Block a user