mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-29 01:34:37 +01:00
M12: boards: the Pencil, Marker, Highlighter and Eraser show a round tip in the ink's colour and width (#2641, part 1)
This commit is contained in:
1 parent
48ae4db1de
commit
2ed7d06bcb
9 files changed
+148
-11
No files matched your search
@@ -113,7 +113,7 @@ pub const INK_COLORS: [(&str, Color); 8] = [
|
||||
/// The stroke weights `tool.ink` takes.
|
||||
pub const INK_WEIGHTS: std::ops::RangeInclusive<f64> = 0.1..=100.0;
|
||||
/// How far the eraser reaches around the pointer (screen pixels).
|
||||
const ERASER_PX: f64 = 8.0;
|
||||
pub const ERASER_PX: f64 = 8.0;
|
||||
/// The text sizes the contextual bar offers.
|
||||
pub const TEXT_SIZES: [(&str, f64); 4] = [("S", 12.0), ("M", 16.0), ("L", 24.0), ("XL", 36.0)];
|
||||
/// The text sizes a sticky's menu offers (FigJam's, measured 2026-11-12): name and size.
|
||||
|
||||
@@ -300,6 +300,9 @@ pub enum Cursor {
|
||||
Pointer,
|
||||
Eyedropper,
|
||||
Comment,
|
||||
/// The Pencil, Marker, Highlighter and Eraser: a round tip the canvas draws in the ink's colour
|
||||
/// and width (`Session::ink_tip`).
|
||||
Ink,
|
||||
/// What the gesture is doing will be undone when it ends (an edit only a main component can
|
||||
/// make).
|
||||
NotAllowed,
|
||||
@@ -327,10 +330,11 @@ impl ToolId {
|
||||
ToolId::Pen => Cursor::Pen(PenCursor::New),
|
||||
ToolId::Comment => Cursor::Comment,
|
||||
ToolId::Eyedropper => Cursor::Eyedropper,
|
||||
ToolId::Pencil | ToolId::Marker | ToolId::Highlighter | ToolId::Eraser => Cursor::Ink,
|
||||
// Text on a path acts only over a path, where it shows the I-beam.
|
||||
ToolId::Move | ToolId::Scale | ToolId::TextOnPath => Cursor::Default,
|
||||
// The other tools make something where they are pressed: shapes, frames, slices, pencil
|
||||
// strokes, a new text (over a text the Text tool shows the I-beam instead).
|
||||
// The other tools make something where they are pressed: shapes, frames, slices, a new
|
||||
// text (over a text the Text tool shows the I-beam instead).
|
||||
_ => Cursor::Crosshair,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,6 +352,19 @@ impl Session {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The tip the ink cursor (`Cursor::Ink`) shows at page point `p` at `zoom` (screen pixels per page
|
||||
/// unit): the colour a stroke started there takes and its width on screen, or for the Eraser no
|
||||
/// colour and the width it reaches. `None` for the other tools.
|
||||
pub fn ink_tip(&self, p: figcraft_geom::Point, zoom: f64) -> Option<(Option<figcraft_color::Color>, f64)> {
|
||||
let tool = self.tool.tool;
|
||||
if tool == ToolId::Eraser {
|
||||
return Some((None, 2.0 * crate::board::ERASER_PX));
|
||||
}
|
||||
let ink = self.tool.ink(tool)?;
|
||||
let color = if tool == ToolId::Pencil { self.pencil_color_at(p).ok() } else { ink.color };
|
||||
Some((color, ink.weight * zoom))
|
||||
}
|
||||
|
||||
/// The colour a Pencil stroke starting at `p` will have: the one chosen for it, else (it goes
|
||||
/// into the frame under `p`, else the page) white when that is dark (`pencil_color`).
|
||||
pub(super) fn pencil_color_at(&self, p: figcraft_geom::Point) -> Result<figcraft_color::Color> {
|
||||
|
||||
@@ -98,7 +98,7 @@ fn each_tool_has_its_cursor_by_modifier_and_what_is_under_the_pointer() {
|
||||
(ToolId::Ellipse, NONE, EMPTY, Crosshair, "ellipse"),
|
||||
(ToolId::Polygon, NONE, EMPTY, Crosshair, "polygon"),
|
||||
(ToolId::Star, NONE, EMPTY, Crosshair, "star"),
|
||||
(ToolId::Pencil, NONE, EMPTY, Crosshair, "pencil"),
|
||||
(ToolId::Pencil, NONE, EMPTY, Ink, "the pencil shows its round tip"),
|
||||
(ToolId::Text, NONE, EMPTY, Crosshair, "the Text tool makes a text where it is pressed"),
|
||||
(ToolId::Text, NONE, ON_SQUARE, Crosshair, "over a shape too"),
|
||||
(ToolId::Text, NONE, ON_TEXT, Text, "the I-beam over a text: a click edits it there"),
|
||||
@@ -118,7 +118,7 @@ fn each_tool_has_its_cursor_by_modifier_and_what_is_under_the_pointer() {
|
||||
}
|
||||
// Every tool has a row above.
|
||||
for t in ToolId::ALL {
|
||||
assert!(matches!(t.cursor(), Default | Crosshair | Grab | Pen(_) | Comment | Eyedropper), "{t:?}");
|
||||
assert!(matches!(t.cursor(), Default | Crosshair | Grab | Pen(_) | Comment | Eyedropper | Ink), "{t:?}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,3 +305,37 @@ fn vector_edit_mode_shows_each_tool_and_modifier() {
|
||||
assert_eq!(hover(&mut s, at, m), want, "{tool} at {at:?}: {why}");
|
||||
}
|
||||
}
|
||||
|
||||
/// The ink tools' tip (#2641): the colour a stroke started there takes, as wide on screen as the
|
||||
/// stroke; the Eraser's has no colour and is as wide as it reaches.
|
||||
#[test]
|
||||
fn the_ink_tools_tip_takes_the_inks_colour_and_width() {
|
||||
use figcraft_color::Color;
|
||||
let mut s = crate::board_tests::board();
|
||||
let p = figcraft_geom::Point::new(0.0, 0.0);
|
||||
for tool in [ToolId::Marker, ToolId::Highlighter, ToolId::Eraser] {
|
||||
s.set_tool(tool);
|
||||
assert_eq!(s.tool.overlay.cursor, Cursor::Ink, "{tool:?}");
|
||||
}
|
||||
s.execute("tool.ink", &json!({"tool": "marker", "color": "#336699", "weight": 4})).unwrap();
|
||||
s.set_tool(ToolId::Marker);
|
||||
let (color, thin) = s.ink_tip(p, 1.0).unwrap();
|
||||
assert_eq!(color.map(|c| c.to_hex()).as_deref(), Some("336699"));
|
||||
assert!(s.ink_tip(p, 2.0).unwrap().1 > thin, "zoomed in, the tip is wider on screen");
|
||||
s.execute("tool.ink", &json!({"weight": 12})).unwrap();
|
||||
assert!(s.ink_tip(p, 1.0).unwrap().1 > thin, "a heavier stroke, a wider tip");
|
||||
s.set_tool(ToolId::Highlighter);
|
||||
assert_ne!(s.ink_tip(p, 1.0).unwrap().0, color, "the highlighter's own ink");
|
||||
s.set_tool(ToolId::Eraser);
|
||||
let (none, reach) = s.ink_tip(p, 1.0).unwrap();
|
||||
assert_eq!((none, reach), (None, s.ink_tip(p, 3.0).unwrap().1), "the eraser reaches as far on screen at any zoom");
|
||||
s.set_tool(ToolId::Move);
|
||||
assert_eq!(s.ink_tip(p, 1.0), None);
|
||||
|
||||
// The Pencil's automatic ink is white over a dark frame, black elsewhere.
|
||||
let mut s = Session::new();
|
||||
ex(&mut s, "frame.create", json!({"x": 0, "y": 0, "width": 200, "height": 200, "props": {"fills": ["#1E1E1E"]}}));
|
||||
s.set_tool(ToolId::Pencil);
|
||||
assert_eq!(s.ink_tip(figcraft_geom::Point::new(100.0, 100.0), 1.0).unwrap().0, Some(Color::WHITE));
|
||||
assert_eq!(s.ink_tip(figcraft_geom::Point::new(500.0, 500.0), 1.0).unwrap().0, Some(Color::BLACK));
|
||||
}
|
||||
@@ -506,7 +506,13 @@ pub fn show(app: &mut FigApp, ui: &mut Ui, worker: &mut Worker) {
|
||||
app.canvas.cursor = None;
|
||||
if let (true, Some(at)) = (own_cursor && resp.hovered(), ctx.input(|i| i.pointer.hover_pos())) {
|
||||
let panning = app.canvas.space_pan || app.canvas.middle_pan.is_some();
|
||||
let shown = crate::cursors::on_canvas(panning, ctx.input(|i| i.pointer.any_down()), app.canvas.zoom_tool, app.session.tool.overlay.cursor);
|
||||
let mut shown =
|
||||
crate::cursors::on_canvas(panning, ctx.input(|i| i.pointer.any_down()), app.canvas.zoom_tool, app.session.tool.overlay.cursor);
|
||||
if let crate::cursors::Shown::Drawn(crate::cursors::Glyph::Dot { .. }) = shown
|
||||
&& let Some(tip) = app.session.ds().ok().and_then(|ds| app.session.ink_tip(app.to_page(at), ds.view.zoom))
|
||||
{
|
||||
shown = crate::cursors::ink(tip);
|
||||
}
|
||||
shown.show(&ctx, at);
|
||||
if shown == crate::cursors::Shown::Drawn(crate::cursors::Glyph::Eyedropper)
|
||||
&& let Some(c) = app.canvas.pixel_under(app.to_page(at), app.session.ds().ok().map(|ds| (ds.uid, ds.page)), bg)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! The pointer on the canvas: each engine cursor ([`figcraft_engine::tools::Cursor`]) as one of
|
||||
//! the system's cursors, or as a small glyph FigCraft draws at the pointer with the system's
|
||||
//! hidden (a rotate cursor turned to its corner, the pen's states, the eyedropper, the comment
|
||||
//! pin, the crosshair of the shape and Text tools). The glyphs are original, drawn from lines and the code-drawn icons: no cursor images.
|
||||
//! pin, the crosshair of the shape and Text tools, the ink tools' round tip). The glyphs are original, drawn from lines and the code-drawn icons: no cursor images.
|
||||
|
||||
use egui::{Color32, CursorIcon, Painter, Pos2, Shape, Stroke, pos2, vec2};
|
||||
use figcraft_engine::tools::{Cursor, PenCursor};
|
||||
@@ -20,6 +20,12 @@ pub enum Glyph {
|
||||
/// A plus open at the centre, for the shape and Text tools (the system's follows the
|
||||
/// system's pointer colour, and a white one is lost on a white frame).
|
||||
Crosshair,
|
||||
/// The ink tools' tip: a dot of `radius` in the ink's colour, ringed light and dark so it
|
||||
/// shows on any page; no colour (the Eraser) draws just the ring.
|
||||
Dot {
|
||||
color: Option<Color32>,
|
||||
radius: f32,
|
||||
},
|
||||
}
|
||||
|
||||
/// What the pointer shows.
|
||||
@@ -62,6 +68,8 @@ pub fn of(cursor: Cursor) -> Shown {
|
||||
Cursor::Pointer => System(CursorIcon::PointingHand),
|
||||
Cursor::Eyedropper => Drawn(Glyph::Eyedropper),
|
||||
Cursor::Comment => Drawn(Glyph::Comment),
|
||||
// The canvas gives it the tool's colour and width (`ink_tip`).
|
||||
Cursor::Ink => ink((Some(figcraft_color::Color::BLACK), 0.0)),
|
||||
Cursor::NotAllowed => System(CursorIcon::NotAllowed),
|
||||
}
|
||||
}
|
||||
@@ -88,7 +96,7 @@ impl Shown {
|
||||
|
||||
/// A name for it (`ui.inspect`): the CSS cursor names where there is one ("default",
|
||||
/// "nwse-resize", "copy"), and "rotate" (with its angle), "pen", "pen-close", "pen-add",
|
||||
/// "pen-bend", "eyedropper", "comment" and "crosshair" for the drawn ones.
|
||||
/// "pen-bend", "eyedropper", "comment", "crosshair" and "ink" for the drawn ones.
|
||||
pub fn name(self) -> String {
|
||||
match self {
|
||||
Shown::System(i) => match i {
|
||||
@@ -118,6 +126,7 @@ impl Shown {
|
||||
Shown::Drawn(Glyph::Eyedropper) => "eyedropper".into(),
|
||||
Shown::Drawn(Glyph::Comment) => "comment".into(),
|
||||
Shown::Drawn(Glyph::Crosshair) => "crosshair".into(),
|
||||
Shown::Drawn(Glyph::Dot { .. }) => "ink".into(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +139,17 @@ impl Shown {
|
||||
}
|
||||
}
|
||||
|
||||
/// The smallest and largest dot the ink cursor draws (radius, points): a hairline still shows, and
|
||||
/// a wide stroke zoomed in doesn't cover the view.
|
||||
const MIN_DOT: f32 = 1.5;
|
||||
const MAX_DOT: f32 = 128.0;
|
||||
|
||||
/// The ink cursor for tip `(color, width on screen)` ([`figcraft_engine::Session::ink_tip`]).
|
||||
pub fn ink(tip: (Option<figcraft_color::Color>, f64)) -> Shown {
|
||||
let radius = if tip.1.is_finite() { (tip.1 as f32 / 2.0).clamp(MIN_DOT, MAX_DOT) } else { MIN_DOT };
|
||||
Shown::Drawn(Glyph::Dot { color: tip.0.map(crate::theme::c32), radius })
|
||||
}
|
||||
|
||||
pub fn sampled_swatch(ctx: &egui::Context, at: Pos2, color: Color32) {
|
||||
let painter = ctx.layer_painter(egui::LayerId::new(egui::Order::Tooltip, egui::Id::unique("canvas_cursor_swatch")));
|
||||
let centre = at + vec2(SWATCH_OFFSET, SWATCH_OFFSET);
|
||||
@@ -225,6 +245,15 @@ pub fn paint(painter: &Painter, at: Pos2, glyph: Glyph) {
|
||||
}
|
||||
}
|
||||
// The dropper's tip and the pin's tail, at the bottom left of their icons, are the hot spots.
|
||||
Glyph::Dot { color: Some(c), radius } => {
|
||||
painter.circle_filled(at, radius, c);
|
||||
painter.circle_stroke(at, radius + 0.5, Stroke::new(1.0, EDGE));
|
||||
painter.circle_stroke(at, radius + 1.5, Stroke::new(1.0, INK));
|
||||
}
|
||||
Glyph::Dot { color: None, radius } => {
|
||||
painter.circle_stroke(at, radius, Stroke::new(3.0, EDGE));
|
||||
painter.circle_stroke(at, radius, Stroke::new(1.0, INK));
|
||||
}
|
||||
Glyph::Eyedropper => icon(painter, at - vec2(2.5, 13.5), Icon::Eyedropper),
|
||||
Glyph::Comment => icon(painter, at - vec2(2.5, 13.5), Icon::Comment),
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ fn every_engine_cursor_has_a_system_cursor_or_a_glyph() {
|
||||
(Cursor::Pointer, System(CursorIcon::PointingHand), "pointer"),
|
||||
(Cursor::Eyedropper, Drawn(Glyph::Eyedropper), "eyedropper"),
|
||||
(Cursor::Comment, Drawn(Glyph::Comment), "comment"),
|
||||
(Cursor::Ink, crate::cursors::ink((Some(figcraft_color::Color::BLACK), 0.0)), "ink"),
|
||||
(Cursor::NotAllowed, System(CursorIcon::NotAllowed), "not-allowed"),
|
||||
];
|
||||
for (cursor, shown, name) in rows {
|
||||
@@ -237,3 +238,51 @@ fn a_layers_row_that_takes_no_drop_shows_not_allowed() {
|
||||
u.frame(vec![Event::Key { key: Key::Escape, physical_key: None, pressed: true, repeat: false, modifiers: Modifiers::NONE }]);
|
||||
u.button(o, false);
|
||||
}
|
||||
|
||||
/// The Marker's cursor on a board, as the canvas draws it: a dot in the ink's colour, wider for
|
||||
/// a heavier stroke, ringed light and dark; the Eraser's is a ring (#2641).
|
||||
#[test]
|
||||
fn the_ink_tools_show_a_dot_in_the_inks_colour_and_width() {
|
||||
let mut s = Session::new();
|
||||
s.execute("file.newBoard", &json!({})).unwrap();
|
||||
let mut u = Ui::new(s);
|
||||
u.frame(vec![]);
|
||||
let p = u.app.canvas.rect.center();
|
||||
let dot = |u: &mut Ui, weight: f64| {
|
||||
u.app.run("tool.ink", json!({"tool": "marker", "color": "#336699", "weight": weight}));
|
||||
u.app.run("tool.set", json!({"tool": "marker"}));
|
||||
at(u, p, &[], Modifiers::NONE);
|
||||
match u.app.canvas.cursor {
|
||||
Some(Shown::Drawn(Glyph::Dot { color, radius })) => (color, radius),
|
||||
other => panic!("not a dot: {other:?}"),
|
||||
}
|
||||
};
|
||||
let (color, thin) = dot(&mut u, 2.0);
|
||||
assert_eq!(color, Some(egui::Color32::from_rgb(0x33, 0x66, 0x99)));
|
||||
let (_, wide) = dot(&mut u, 20.0);
|
||||
assert!(wide > thin, "{wide} > {thin}");
|
||||
assert_eq!(u.app.canvas.cursor.map(Shown::icon), Some(CursorIcon::None), "the system's pointer is hidden under it");
|
||||
u.app.run("tool.set", json!({"tool": "eraser"}));
|
||||
at(&mut u, p, &[], Modifiers::NONE);
|
||||
assert!(matches!(u.app.canvas.cursor, Some(Shown::Drawn(Glyph::Dot { color: None, .. }))), "{:?}", u.app.canvas.cursor);
|
||||
|
||||
// Drawn: the ink's dot, a white ring outside it and a dark ring outside that.
|
||||
let at = pos2(50.0, 40.0);
|
||||
let ctx = egui::Context::default();
|
||||
let out = ctx.run_ui(egui::RawInput::default(), |ui| {
|
||||
let layer = egui::LayerId::new(egui::Order::Tooltip, egui::Id::unique("dot_test"));
|
||||
crate::cursors::paint(&ui.ctx().layer_painter(layer), at, Glyph::Dot { color, radius: 5.0 });
|
||||
});
|
||||
let circles: Vec<_> = out
|
||||
.shapes
|
||||
.iter()
|
||||
.filter_map(|c| match &c.shape {
|
||||
egui::epaint::Shape::Circle(c) => Some((c.radius, c.fill, c.stroke.color)),
|
||||
_ => None,
|
||||
})
|
||||
.collect();
|
||||
let fill = circles.iter().find(|c| Some(c.1) == color).expect("the ink's dot");
|
||||
let white = circles.iter().find(|c| c.2 == egui::Color32::WHITE).expect("a white ring");
|
||||
let dark = circles.iter().find(|c| c.2 == crate::cursors::INK).expect("a dark ring");
|
||||
assert!(fill.0 < white.0 && white.0 < dark.0, "{circles:?}");
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# Boards parity
|
||||
|
||||
> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-11-28 · **Change:** minor (code blocks from the toolbar's Text tools flyout or the `` ` `` key, a language menu in the bar over a selected block, and handles on a block's left and right edges only (#2237); a mind map node dropped on another node becomes its child, with everything under it (#2226); code blocks colour keywords, strings, numbers and comments by their language (#2237); the ink colour and stroke weight of the Marker, Highlighter and Pencil are chosen before drawing, in a bar above the toolbar (#2395); 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); code blocks, first step: a dark panel of monospace text as tall as its lines, in one of 16 languages (`board.codeBlock`, `board.setLanguage`, #2237); a `.jam` file's shapes with text come in as native board shapes for the 23 kinds FigCraft draws, the other 7 as frames (#1808); a sticky has a text-size menu in the contextual bar, Small 16, Medium 24, Large 40, Extra large 64 and Huge 96, with Small the default (an earlier reading of 18 did not reproduce); `board.setStyle {fontSize}` sizes stickies and the sticky tool remembers the last size for new ones; the note grows taller at Huge and shrinks back, as measured in FigJam's web app, 2026-11-12; resizing a board table by height changes its rows, not blank space below them: a bottom or top edge grows the last row, a corner shares the change over every row, and a table keeps at least 40 per cell, measured in FigJam's web app, 2026-11-09 (#2172); a `.jam` file's stickies come in as native board stickies, with their colour, text and author kept and the size as saved (#1808); a sticky's text stays 18 and the note grows taller instead of the text shrinking, as measured in FigJam's web app (#2157); mind maps, first step: a first node with three children on curved branches, laid out again after every edit (`board.mindMap`, `board.mindMapAdd`, #2226); a `.jam` elbowed connector saved with its path keeps it on import instead of being routed again (#1910); a "+" handle dragged carries the preview: the next shape is made where it is let go, or a connector joins the object it is let go on (#1919); a connector attached to a side starts 4 pt outside the border, so its stroke never lies on the fill (#1916); a connector end moved with Cmd/Ctrl held goes on any part of an object, and stays there as the object moves or resizes; a connector end dropped along a side of a shape attaches to that side (#1708); a board connector's path can be reshaped by dragging its path handles (#1710); boards have 16 more shapes (arrows, polygons, star, plus and flowchart symbols), in pickers that lay them out in a grid; a board keeps earlier votes' results, listed newest first in Results and deleted one at a time; a connector's bar sets its start and end points, dashes, weight and any colour (#1596); cells copied from a spreadsheet paste onto a board as a table; Shift+Cmd/Ctrl+Enter on a selected board shape adds the next shape already joined to it, and goes on typing (#1597); "+" handles beside a selected sticky or shape make the next one, joined by a connector (#1597); a FigJam `.jam` file opens as a board (#1342); board grid settings: dots, lines, graph paper or none, spacing, size and contrast; the connector tool shows the connector it will make while dragging, ends snapping to attach points (#1387); templates and tables; facilitation: a shared timer and voting sessions; the dot grid, dragging a connector's end to re-attach it, curved connectors, elbows that go around what they join) · **Target:** the incumbent's whiteboard product (behaviour from its public help centre)
|
||||
> **Last reviewed:** 2026-10-24 · **Last updated:** 2026-11-28 · **Change:** minor (the Pencil, Marker, Highlighter and Eraser show a round tip at the pointer, in the ink's colour and as wide as the stroke (#2641); code blocks from the toolbar's Text tools flyout or the `` ` `` key, a language menu in the bar over a selected block, and handles on a block's left and right edges only (#2237); a mind map node dropped on another node becomes its child, with everything under it (#2226); code blocks colour keywords, strings, numbers and comments by their language (#2237); the ink colour and stroke weight of the Marker, Highlighter and Pencil are chosen before drawing, in a bar above the toolbar (#2395); 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); code blocks, first step: a dark panel of monospace text as tall as its lines, in one of 16 languages (`board.codeBlock`, `board.setLanguage`, #2237); a `.jam` file's shapes with text come in as native board shapes for the 23 kinds FigCraft draws, the other 7 as frames (#1808); a sticky has a text-size menu in the contextual bar, Small 16, Medium 24, Large 40, Extra large 64 and Huge 96, with Small the default (an earlier reading of 18 did not reproduce); `board.setStyle {fontSize}` sizes stickies and the sticky tool remembers the last size for new ones; the note grows taller at Huge and shrinks back, as measured in FigJam's web app, 2026-11-12; resizing a board table by height changes its rows, not blank space below them: a bottom or top edge grows the last row, a corner shares the change over every row, and a table keeps at least 40 per cell, measured in FigJam's web app, 2026-11-09 (#2172); a `.jam` file's stickies come in as native board stickies, with their colour, text and author kept and the size as saved (#1808); a sticky's text stays 18 and the note grows taller instead of the text shrinking, as measured in FigJam's web app (#2157); mind maps, first step: a first node with three children on curved branches, laid out again after every edit (`board.mindMap`, `board.mindMapAdd`, #2226); a `.jam` elbowed connector saved with its path keeps it on import instead of being routed again (#1910); a "+" handle dragged carries the preview: the next shape is made where it is let go, or a connector joins the object it is let go on (#1919); a connector attached to a side starts 4 pt outside the border, so its stroke never lies on the fill (#1916); a connector end moved with Cmd/Ctrl held goes on any part of an object, and stays there as the object moves or resizes; a connector end dropped along a side of a shape attaches to that side (#1708); a board connector's path can be reshaped by dragging its path handles (#1710); boards have 16 more shapes (arrows, polygons, star, plus and flowchart symbols), in pickers that lay them out in a grid; a board keeps earlier votes' results, listed newest first in Results and deleted one at a time; a connector's bar sets its start and end points, dashes, weight and any colour (#1596); cells copied from a spreadsheet paste onto a board as a table; Shift+Cmd/Ctrl+Enter on a selected board shape adds the next shape already joined to it, and goes on typing (#1597); "+" handles beside a selected sticky or shape make the next one, joined by a connector (#1597); a FigJam `.jam` file opens as a board (#1342); board grid settings: dots, lines, graph paper or none, spacing, size and contrast; the connector tool shows the connector it will make while dragging, ends snapping to attach points (#1387); templates and tables; facilitation: a shared timer and voting sessions; the dot grid, dragging a connector's end to re-attach it, curved connectors, elbows that go around what they join) · **Target:** the incumbent's whiteboard product (behaviour from its public help centre)
|
||||
|
||||
**Breadth ~48%, ready ~30% (estimated, erring low).** A board is a FigCraft file of its own kind
|
||||
(`file.newBoard`) with a dot grid on the page, sticky notes, shapes with text, connectors that
|
||||
@@ -45,7 +45,7 @@ all end with the same geometry.
|
||||
| Quick-create handles | done | a "+" beside each side of the one selected sticky or shape makes the next one there, joined by a connector (`board.addConnected`, also Shift+Cmd/Ctrl+Enter); dragged, it places the next one where it is let go, or joins the sticky or shape it is let go on (#1919) |
|
||||
| Marker and highlighter | done | the Pencil's stroke fitting with board presets: marker opaque, highlighter wide, see-through and multiplying |
|
||||
| Eraser | done | drag over marker and highlighter strokes to remove them, one undo step |
|
||||
| Pen colours and widths in the toolbar | done | while the Marker or Highlighter is the tool, a bar above the toolbar offers eight ink colours, any colour in the colour picker and the stroke weight; each tool keeps its own for the session and new strokes take it (`tool.ink {tool?, color?, weight?}`, #2395). A selected stroke's colour still changes from the contextual bar |
|
||||
| Pen colours and widths in the toolbar | done | while the Marker or Highlighter is the tool, a bar above the toolbar offers eight ink colours, any colour in the colour picker and the stroke weight; each tool keeps its own for the session and new strokes take it (`tool.ink {tool?, color?, weight?}`, #2395). A selected stroke's colour still changes from the contextual bar. The pointer is a round tip in the ink's colour, as wide on screen as the stroke will be (at least 3 pt, at most 256), ringed white and dark so it shows on any page; the Eraser's is a ring as wide as it reaches (#2641) |
|
||||
| Stamps | done | thumbs up, heart, plus one, star, question, check: round badges drawn as vectors, the placer's name on hover |
|
||||
| Stamps sticking to the object they land on, the stamp wheel, emotes, stickers | partial | a stamp sticks to the object it lands on (`on`) and moves with it; dragged onto another object it sticks to that one, dragged off it to nothing, and it stays where it is when its object is deleted. the object it will stick to is outlined while the stamp tool is over it or a stamp is dragged over it. No stamp wheel, emotes or stickers |
|
||||
| Text and sections | done | the existing Text tool and sections |
|
||||
@@ -69,6 +69,7 @@ all end with the same geometry.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-28 | minor | M12, #2641 (part 1): the Pencil, Marker, Highlighter and Eraser showed the shape tools' crosshair, so the ink's colour and width were seen only once a stroke landed. They now ask for an ink cursor (`Cursor::Ink`): a dot at the pointer in the colour a stroke started there takes (the Pencil's automatic ink as it resolves over that page or frame) and as wide on screen as the stroke will be (`Session::ink_tip`), ringed white then dark so it shows on light and dark pages; the Eraser's is a ring as wide as it reaches. `ui.inspect` names it `ink`. The eraser's two modes and lasso selection are still to come. Tests: `cursor_tests::the_ink_tools_tip_takes_the_inks_colour_and_width`, `cursors_tests::the_ink_tools_show_a_dot_in_the_inks_colour_and_width`. Numbers unchanged. |
|
||||
| 2026-11-28 | minor | M12, #2237 (step 2 of 4): code blocks could only be made by command, their language changed only by command, and their four corner handles resized a block whose height then snapped back. The toolbar's Text tools flyout now ends in Code block (`tool.codeBlock`, also on the `` ` `` key, boards only; the board's text group remembers its own last tool, apart from a design file's): a click places a block centred there and starts typing in it, as Code block from the Actions palette now does too. The bar over a selected block ends in a language menu of the 16 languages (`board.setLanguage`), the block's own checked and its name on the button. A selected block draws a handle on the middle of its left and right edges instead of its corner squares, and only those two edges resize it (`tools::handle_at`); a press on a corner or on the top or bottom edge moves it. The key is pinned with the other board tool keys. Tests: `board_code_tests::a_block_has_handles_on_its_left_and_right_edges_only` and `the_tool_places_a_block_centred_on_the_click_and_types_in_it` (engine), `board_ui_tests::the_text_flyout_and_the_backtick_key_choose_the_code_block_tool_a_click_places_and_types_in` and `a_selected_code_block_has_a_language_menu`. Numbers unchanged (line numbers and `.jam` import still to come). |
|
||||
| 2026-11-28 | patch | M12, #2226 (part of step 3): a mind map node dragged onto another node went back to its place, so the only way to give it another parent was to delete it and add it again. The normalize pass now hangs a node that moved by itself and whose middle is on another node of the page from that node, with everything under it: its branch leaves the new parent, on that node's side, and the map lays itself out again. The first node (which has no branch) carries its map as before, and a drop on a node under the moved one changes nothing; dropped on its own parent it keeps it, taking its place among its siblings by its middle as any child moved by hand does. It works the same for a drag, a nudge, `transform.move` and a live session's edit. Detaching a node by dragging it away is not in this change: a child moved by hand still goes back or swaps with a sibling. Test: `board_mindmap_tests::a_node_dropped_on_another_node_becomes_its_child_with_its_own`. |
|
||||
| 2026-11-28 | minor | M12, #2237 (step 3 of 4): a code block's text was one colour whatever its language. The normalize pass now colours it as its language writes it: keywords, strings, numbers and comments, from a small tokenizer per language in the document crate (`code_tokens`: each language's keywords, line and block comments, quotes, and for HTML the tag names, with quotes counted only inside a tag). The colours are FigCraft's own, each at least 4.5:1 on the panel, and they live on the text's runs, so the canvas, PNG, SVG and PDF exports and saved files show the same; a language change, an edit, an undo or a live session's change colours it again, and a second pass changes nothing. Plain text stays uncoloured. Tests: `board_code_tests::keywords_strings_numbers_and_comments_per_language` and `highlight_colours_read_on_the_panel_and_differ` (doc), `board_code_tests::keywords_strings_numbers_and_comments_take_their_colours` (engine). Numbers unchanged (no toolbar entry yet). |
|
||||
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
# UI and interaction parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-28 · **Change:** minor (the `` ` `` key chooses the code block tool on boards (#2237); Cmd/Ctrl+L copies a link to the selected layer, as in Figma; M4: the eyedropper colours the stroke of a layer that has only a stroke, samples for an open colour picker from the shortcut too, and shows the colour under it beside the pointer; Shift with a double-click goes a level deeper and keeps the rest of the selection, so layers nested in neighbouring artboards can be selected together; M1: Frame selection makes a frame without a fill; M1: centred auto-width text keeps its middle as it grows and shrinks; M1: a drag on a section's background, or on the background of a frame in it, draws a marquee; the Layers panel's eye and padlock stay at the list's right edge, and a name takes at most 400 pt; in vector edit mode, deleting a point selects the next one on its path, so Delete pressed again goes on along it; the hover and selection outline of a curved layer bends smoothly instead of showing straight pieces; text copied while editing, or a whole text layer copied, pastes into a text edit with its formatting and its layer's colour, and Shift+Cmd/Ctrl+V (also Alt+Cmd/Ctrl+V) pastes it in the style at the caret; crop mode: the layer's sides and corners crop its image in an auto layout frame too, up to the image's edges, change a locked ratio (Shift keeps it), the image's own corners scale freely with Shift proportional as a resize does, and crop mode and vector edit mode end each other; after a click on a layer row the arrow keys nudge the selection, or move a layer in an auto layout flow one place, as in Figma; the rows take the arrows once they have the keyboard (F6); Shift+Cmd/Ctrl+V with several layers selected pastes after the last of them as seen: next in an auto layout frame's flow, else below the lowest or right of the rightmost, at the selection's own gap; Tab and Shift+Tab while editing a text layer go on to the next or previous text layer of its frame, in reading order, with all of its text selected; a file opens again on the page and at the view it was left at; the desktop app reopens the files open when it quit, in their tabs' order with the same one in front, and with nothing to reopen starts on the Home screen instead of in a new file; a dropdown, button menu or context menu in the panels that is taller than the window scrolls, so its last rows can be picked; frames, sections, components and instances move, resize and draw on whole pixels whatever Snap to pixel grid says and whatever they snap to, as Figma's help says; the pixel grid shows on a dark canvas and dark fills as well as on white, its lines one screen pixel wide in a light grey at a fifth of its strength, as measured in Figma; Shift+Cmd/Ctrl+' says at the bottom of the window whether snapping to the pixel grid is now on or off; 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, or the selected characters while editing, 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 stepLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-28 · **Change:** minor (the Pencil, Marker, Highlighter and Eraser show a round tip in the ink's colour and width instead of a crosshair (#2641); the `` ` `` key chooses the code block tool on boards (#2237); Cmd/Ctrl+L copies a link to the selected layer, as in Figma; M4: the eyedropper colours the stroke of a layer that has only a stroke, samples for an open colour picker from the shortcut too, and shows the colour under it beside the pointer; Shift with a double-click goes a level deeper and keeps the rest of the selection, so layers nested in neighbouring artboards can be selected together; M1: Frame selection makes a frame without a fill; M1: centred auto-width text keeps its middle as it grows and shrinks; M1: a drag on a section's background, or on the background of a frame in it, draws a marquee; the Layers panel's eye and padlock stay at the list's right edge, and a name takes at most 400 pt; in vector edit mode, deleting a point selects the next one on its path, so Delete pressed again goes on along it; the hover and selection outline of a curved layer bends smoothly instead of showing straight pieces; text copied while editing, or a whole text layer copied, pastes into a text edit with its formatting and its layer's colour, and Shift+Cmd/Ctrl+V (also Alt+Cmd/Ctrl+V) pastes it in the style at the caret; crop mode: the layer's sides and corners crop its image in an auto layout frame too, up to the image's edges, change a locked ratio (Shift keeps it), the image's own corners scale freely with Shift proportional as a resize does, and crop mode and vector edit mode end each other; after a click on a layer row the arrow keys nudge the selection, or move a layer in an auto layout flow one place, as in Figma; the rows take the arrows once they have the keyboard (F6); Shift+Cmd/Ctrl+V with several layers selected pastes after the last of them as seen: next in an auto layout frame's flow, else below the lowest or right of the rightmost, at the selection's own gap; Tab and Shift+Tab while editing a text layer go on to the next or previous text layer of its frame, in reading order, with all of its text selected; a file opens again on the page and at the view it was left at; the desktop app reopens the files open when it quit, in their tabs' order with the same one in front, and with nothing to reopen starts on the Home screen instead of in a new file; a dropdown, button menu or context menu in the panels that is taller than the window scrolls, so its last rows can be picked; frames, sections, components and instances move, resize and draw on whole pixels whatever Snap to pixel grid says and whatever they snap to, as Figma's help says; the pixel grid shows on a dark canvas and dark fills as well as on white, its lines one screen pixel wide in a light grey at a fifth of its strength, as measured in Figma; Shift+Cmd/Ctrl+' says at the bottom of the window whether snapping to the pixel grid is now on or off; 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, or the selected characters while editing, 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 anLine 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:
|
||||
@@ -212,6 +212,7 @@ This audit records candidates for subsequent fixes; their behaviour is unchanged
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-11-28 | patch | M12, #2641: the Pencil (and the board's Marker, Highlighter and Eraser) showed a crosshair. Its cursor is now the ink's tip: a dot in the colour its stroke takes there, as wide on screen as the stroke, ringed white and dark; the Eraser's is a ring of its reach. Tests: `cursor_tests::each_tool_has_its_cursor_by_modifier_and_what_is_under_the_pointer`, `cursors_tests::the_ink_tools_show_a_dot_in_the_inks_colour_and_width`. |
|
||||
| 2026-11-28 | patch | M12, #2237: the code block tool takes the `` ` `` key on boards (`tool.codeBlock`), pinned like the other board tool keys (60 undocumented bindings). Test: `shortcut_parity_tests::counts_match_the_docs`. |
|
||||
| 2026-11-28 | patch | M4, #2338: superscript and subscript were the layer's, so a footnote marker such as the "(1)" in "$29/month(1)" couldn't be raised alone. Each character now has a position (none, superscript, subscript): `textPosition` on `text.style` (with `start`/`end`) and `node.set`, and Type settings ▸ Details ▸ Position sets the selected characters while editing, else whole layers, and shows theirs. A character's position wins over the layer's `sups` / `subs`, which move onto the characters the first time a position is set, so a range set to none sits on the line. Text styles keep it (`position` in a style's definition; a style that sets none leaves the characters' own, so older styles don't drop a raised marker), inspect reports `textPosition` and its CSS `vertical-align: super` or `sub`, and `.fig` export warns that it was left out. Tests: `text_behaviour_tests::a_range_of_characters_is_raised_or_lowered_on_its_own`, `typography::variable_tests::details_position_sets_superscript_subscript_or_neither`. |
|
||||
| 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). |
|
||||
|
||||
Reference in new issue
Block a user