mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-10 20:42:05 +00:00
This commit is contained in:
1 parent
437d052396
commit
12d36a9913
27 files changed
+242
-54
No files matched your search
+2
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
**Stage: alpha** · next: beta, ~26 points and ~162–292 h away (one Opus 5.5 agent; ~33–67 h wall-clock with 5 agents)
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (a control request can set its own timeout, up to 10 minutes (`timeoutMs`; `figcraft-cli mcp --attach PORT --timeout SECONDS`) (#1696); gap 6: a widget opens its plugin's panel (plugin API 5), whose callbacks redraw it; the keyboard's Menu key opens the context menu, as Shift+F10 does; an Open link action can open in place of the prototype, with "Open in new tab" off (gap 15); a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; the eyedropper with Cmd/Ctrl+Shift makes a colour style or variable of what it picks; a live session's welcome sends the document compressed to clients that read it, about seven times smaller (#1665); a control request that times out says truthfully whether it was dropped or is still running and will take effect, and only screenshots and input blame the window (#1673); a board keeps earlier votes' results, listed newest first in Results and deleted one at a time; the object a stamp will stick to is outlined while the stamp tool is over it or a stamp is dragged over it, and board objects take no drops (gap 24); a server can list the files shared from it now for everyone who reaches it, Home ▸ Online shows them and their links carry no secret (`team_files`, part of #742); team library analytics count detached instances per component and file (gap 10); skipping the Open link notice by command is saved with the preferences at once (gap 15); a selected connector's bar on a board sets its start and end points, solid or dashed, its weight and any colour (#1596); cells copied from a spreadsheet paste onto a board as a table; a long layer name stays on one line in the Export button and the Dev Mode header, ending with an ellipsis, and no longer covers the Design panel (#1650); with hundreds of layers selected, the Design panel and the selection overlays stop going over the whole selection on every frame, so dragging 648 layers averages about 1.1 ms of UI per frame (#1571); plugin panels show pictures: an `image` control, base64 within 256 KB and 4,096 px a side, named by its label (gap 6); `.fig` connector labels without a saved snapshot are kept, centred on their line (gap 1); a drag moving many layers re-runs only what sits around them, not each layer's bindings, sizing, text and instance checks, on every move (#1571); damaged font tracking table offsets are checked instead of wrapping on 32-bit targets, and font indexing makes its existing offset bounds explicit (#1125); Bosnian (`bs`) draft catalog; text style dedupe is O(spans) via a last-two cache and fingerprint buckets (#1102); pasted layers whose image the clipboard lacks are named and show a placeholder that reads as missing (#1646); paint-style colours on layers pasted from another design app keep their style instead of turning black (#1638); progress docs cleaned of what merges left twice: rows merged into one, repeated status items removed, and `cargo xtask docs` (in `ci`) fails on a repeated table row or status item; a name typed for a variable or collection finds the one with that exact id before one named like it, and stored mode ids, font family variables and the panels' labels read exact ids (#1613); plugin widgets have hover styles: a layer's `hover` fill, stroke, opacity or text colour shows while the pointer is over it (gap 6); `.fig` elbowed and curved connectors without a saved path are routed like board connectors instead of drawn straight (gap 1); every file a command reads whole by path is a regular file within a cap that fits it: documents 16 GiB, placed images 256 MiB, CLI scripts 1 GiB; `figcraft-cli connect publish` publishes a code repository's code connect mappings to a design file (gap 16); while a drag only moves a large selection, its outlines, box, slots, spacing and Design panel values are worked out once and shifted, not rebuilt on every move (#1571); Shift+Cmd/Ctrl+Enter on a selected board shape adds the next shape already joined to it, and goes on typing (#1597); an imported or pasted file finds an installed family under the other names its fonts give it, and with other case and spacing, instead of reporting it missing (#1292); a development example generates figcraft-cli's shell completions and man pages from its clap definitions (part of #1396); `.fig` ZIP image reads share a total byte budget and count skipped images in the import warnings (#1076); German terminology corrections (M10): gradient stops, OpenType stylistic sets and the Home-screen preference; a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; the server key is checked by comparing SHA-256 hashes of the presented and the kept key, as the deployment guide says (#1130); opening a file contacts no team library server it names unLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (a stroke's Custom style takes a dash pattern of any length as a comma-separated list (#1681); a control request can set its own timeout, up to 10 minutes (`timeoutMs`; `figcraft-cli mcp --attach PORT --timeout SECONDS`) (#1696); gap 6: a widget opens its plugin's panel (plugin API 5), whose callbacks redraw it; the keyboard's Menu key opens the context menu, as Shift+F10 does; an Open link action can open in place of the prototype, with "Open in new tab" off (gap 15); a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; the eyedropper with Cmd/Ctrl+Shift makes a colour style or variable of what it picks; a live session's welcome sends the document compressed to clients that read it, about seven times smaller (#1665); a control request that times out says truthfully whether it was dropped or is still running and will take effect, and only screenshots and input blame the window (#1673); a board keeps earlier votes' results, listed newest first in Results and deleted one at a time; the object a stamp will stick to is outlined while the stamp tool is over it or a stamp is dragged over it, and board objects take no drops (gap 24); a server can list the files shared from it now for everyone who reaches it, Home ▸ Online shows them and their links carry no secret (`team_files`, part of #742); team library analytics count detached instances per component and file (gap 10); skipping the Open link notice by command is saved with the preferences at once (gap 15); a selected connector's bar on a board sets its start and end points, solid or dashed, its weight and any colour (#1596); cells copied from a spreadsheet paste onto a board as a table; a long layer name stays on one line in the Export button and the Dev Mode header, ending with an ellipsis, and no longer covers the Design panel (#1650); with hundreds of layers selected, the Design panel and the selection overlays stop going over the whole selection on every frame, so dragging 648 layers averages about 1.1 ms of UI per frame (#1571); plugin panels show pictures: an `image` control, base64 within 256 KB and 4,096 px a side, named by its label (gap 6); `.fig` connector labels without a saved snapshot are kept, centred on their line (gap 1); a drag moving many layers re-runs only what sits around them, not each layer's bindings, sizing, text and instance checks, on every move (#1571); damaged font tracking table offsets are checked instead of wrapping on 32-bit targets, and font indexing makes its existing offset bounds explicit (#1125); Bosnian (`bs`) draft catalog; text style dedupe is O(spans) via a last-two cache and fingerprint buckets (#1102); pasted layers whose image the clipboard lacks are named and show a placeholder that reads as missing (#1646); paint-style colours on layers pasted from another design app keep their style instead of turning black (#1638); progress docs cleaned of what merges left twice: rows merged into one, repeated status items removed, and `cargo xtask docs` (in `ci`) fails on a repeated table row or status item; a name typed for a variable or collection finds the one with that exact id before one named like it, and stored mode ids, font family variables and the panels' labels read exact ids (#1613); plugin widgets have hover styles: a layer's `hover` fill, stroke, opacity or text colour shows while the pointer is over it (gap 6); `.fig` elbowed and curved connectors without a saved path are routed like board connectors instead of drawn straight (gap 1); every file a command reads whole by path is a regular file within a cap that fits it: documents 16 GiB, placed images 256 MiB, CLI scripts 1 GiB; `figcraft-cli connect publish` publishes a code repository's code connect mappings to a design file (gap 16); while a drag only moves a large selection, its outlines, box, slots, spacing and Design panel values are worked out once and shifted, not rebuilt on every move (#1571); Shift+Cmd/Ctrl+Enter on a selected board shape adds the next shape already joined to it, and goes on typing (#1597); an imported or pasted file finds an installed family under the other names its fonts give it, and with other case and spacing, instead of reporting it missing (#1292); a development example generates figcraft-cli's shell completions and man pages from its clap definitions (part of #1396); `.fig` ZIP image reads share a total byte budget and count skipped images in the import warnings (#1076); German terminology corrections (M10): gradient stops, OpenType stylistic sets and the Home-screen preference; a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; the server key is checked by comparing SHA-256 hashes of the presented and the kept key, asLine truncated
|
||||
|
||||
FigCraft is a clean-room, open-source, pure-Rust reimplementation of the Figma design workflow,
|
||||
native on macOS, Windows, Linux and FreeBSD and in the browser, fully drivable by agents through
|
||||
@@ -358,6 +358,7 @@ Ranked; detail and milestones in [`docs/roadmap.md`](docs/roadmap.md).
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-31 | minor | M4, #1681: Stroke style has Custom beside Solid and Dash, with a Dashes field that takes the whole pattern as `dash, gap, dash, gap…`. A pattern longer than a pair shows there instead of in Dash and Gap, so an imported one can be read and edited whole. No phase or centre on corners, which the reference has no setting for. |
|
||||
| 2026-10-31 | minor | M8, #1696: the control channel waited a fixed 60 s for every request, so a client that knowingly sent a big `batch` could only split it, while the same script ran headless without a limit. A request can now carry `timeoutMs` beside `id` and `method` (whole milliseconds, at most 600,000); without it the wait stays 60 s, and an app from before this ignores the field. `figcraft-cli mcp --attach PORT --timeout SECONDS` (1–600) sends it with every request and reads the app's answers that much longer. A timeout's message says how long the request waited. Tests: `control_server_tests`, `backend_tests::a_raised_timeout_is_asked_for_on_each_request`, `args`. Numbers unchanged |
|
||||
| 2026-10-30 | minor | M11, gap 6: a widget can open its plugin's panel, as a Figma widget's click handler shows a plugin window (plugin API 5). A widget callback's `ui_show` (click, field edit or menu item) opens the plugin's one panel and keeps the module loaded; each panel callback gets the widget's id and current state as well as the panel's event and values, and its `widget_render` redraws the widget in the same undo step. A widget removed meanwhile isn't redrawn (the callback rolls back, the panel stays); an API 3 or 4 plugin's `ui_show` from a widget still opens nothing; a presented prototype opens no panel. The Counter example (API 5) gets Set count… in its menu: a panel whose Set button redraws it with the count entered. Tests: `widget_panel_tests` (engine), the Counter's unit test. Numbers unchanged |
|
||||
| 2026-10-30 | minor | Gap 4: the keyboard's Menu key opens the context menu, as Shift+F10 does (at the focused layer row or below the canvas selection, with the keyboard in the menu). egui already reported the key; FigCraft's keymap had no name or binding for it. `view.contextMenu` now takes `Menu` too, and the Context menus row is done (`layers_keyboard_tests`). Stale rows corrected: smart-selection spacing has had reorder rings since the "M1: smart-selection drag reordering" landing (the row is still partial: irregular grids and several marked layers aren't covered), and gap 4 and the parity summary quoted shortcut counts from before the last bindings (now 128 bound, none missing, 57 undocumented pinned, as `shortcut_parity_tests` counts). |
|
||||
|
||||
@@ -392,6 +392,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "داكن"
|
||||
"Darken" = "تعتيم"
|
||||
"Dash" = "شرطة"
|
||||
"Dashes" = "الشرطات"
|
||||
"Dashes take numbers separated by commas" = "تقبل الشرطات أرقامًا مفصولة بفواصل"
|
||||
"Dashboard" = "لوحة المعلومات"
|
||||
"Date created" = "تاريخ الإنشاء"
|
||||
"Dec" = "ديسمبر"
|
||||
|
||||
@@ -372,6 +372,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "ডার্ক"
|
||||
"Darken" = "ডার্কেন"
|
||||
"Dash" = "ড্যাশ"
|
||||
"Dashes" = "ড্যাশগুলো"
|
||||
"Dashes take numbers separated by commas" = "ড্যাশগুলো কমা দিয়ে আলাদা করা সংখ্যা হবে"
|
||||
"Dashboard" = "ড্যাশবোর্ড"
|
||||
"Date created" = "তৈরির তারিখ"
|
||||
"Dec" = "ডিসেম্বর"
|
||||
|
||||
@@ -395,6 +395,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Tamna"
|
||||
"Darken" = "Zatamni"
|
||||
"Dash" = "Crtica"
|
||||
"Dashes" = "Crtice"
|
||||
"Dashes take numbers separated by commas" = "Crtice su brojevi odvojeni zarezima"
|
||||
"Dashboard" = "Kontrolna tabla"
|
||||
"Date created" = "Datum kreiranja"
|
||||
"Dec" = "dec."
|
||||
|
||||
@@ -362,6 +362,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Tmavý"
|
||||
"Darken" = "Ztmavit"
|
||||
"Dash" = "Čárkování"
|
||||
"Dashes" = "Čárkování"
|
||||
"Dashes take numbers separated by commas" = "Čárkování zadejte jako čísla oddělená čárkami"
|
||||
"Dashboard" = "Přehled"
|
||||
"Date created" = "Datum vytvoření"
|
||||
"Dec" = "prosince"
|
||||
|
||||
@@ -362,6 +362,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Dunkel"
|
||||
"Darken" = "Abdunkeln"
|
||||
"Dash" = "Gestrichelt"
|
||||
"Dashes" = "Striche"
|
||||
"Dashes take numbers separated by commas" = "Striche sind Zahlen, durch Kommas getrennt"
|
||||
"Decoration style" = "Linienstil"
|
||||
"Decoration" = "Auszeichnung"
|
||||
"Deep select" = "Tiefe Auswahl"
|
||||
|
||||
@@ -397,6 +397,8 @@ name = "English"
|
||||
"Dark" = "Dark"
|
||||
"Darken" = "Darken"
|
||||
"Dash" = "Dash"
|
||||
"Dashes" = "Dashes"
|
||||
"Dashes take numbers separated by commas" = "Dashes take numbers separated by commas"
|
||||
"Dashboard" = "Dashboard"
|
||||
"Date created" = "Date created"
|
||||
"Dec" = "Dec"
|
||||
|
||||
@@ -396,6 +396,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Oscuro"
|
||||
"Darken" = "Oscurecer"
|
||||
"Dash" = "Discontinuo"
|
||||
"Dashes" = "Guiones"
|
||||
"Dashes take numbers separated by commas" = "Los guiones son números separados por comas"
|
||||
"Dashboard" = "Panel de control"
|
||||
"Date created" = "Fecha de creación"
|
||||
"Dec" = "dic"
|
||||
|
||||
@@ -396,6 +396,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Tumma"
|
||||
"Darken" = "Tummenna"
|
||||
"Dash" = "Katkoviiva"
|
||||
"Dashes" = "Katkoviivat"
|
||||
"Dashes take numbers separated by commas" = "Anna katkoviivat pilkuilla erotettuina lukuina"
|
||||
"Dashboard" = "Koontinäkymä"
|
||||
"Date created" = "Luontipäivä"
|
||||
"Dec" = "jouluk."
|
||||
|
||||
@@ -372,6 +372,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Sombre"
|
||||
"Darken" = "Assombrir"
|
||||
"Dash" = "Tirets"
|
||||
"Dashes" = "Tirets"
|
||||
"Dashes take numbers separated by commas" = "Les tirets sont des nombres séparés par des virgules"
|
||||
"Dashboard" = "Tableau de bord"
|
||||
"Date created" = "Date de création"
|
||||
"Dec" = "déc."
|
||||
|
||||
@@ -377,6 +377,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Gelap"
|
||||
"Darken" = "Gelapkan"
|
||||
"Dash" = "Putus-putus"
|
||||
"Dashes" = "Garis putus"
|
||||
"Dashes take numbers separated by commas" = "Garis putus berupa angka yang dipisahkan koma"
|
||||
"Dashboard" = "Dasbor"
|
||||
"Date created" = "Tanggal dibuat"
|
||||
"Dec" = "Des"
|
||||
|
||||
@@ -356,6 +356,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Scuro"
|
||||
"Darken" = "Scurisci"
|
||||
"Dash" = "Tratteggio"
|
||||
"Dashes" = "Trattini"
|
||||
"Dashes take numbers separated by commas" = "I trattini sono numeri separati da virgole"
|
||||
"Dashboard" = "Dashboard"
|
||||
"Date created" = "Data di creazione"
|
||||
"Dec" = "dic"
|
||||
|
||||
@@ -370,6 +370,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "ダーク"
|
||||
"Darken" = "比較(暗)"
|
||||
"Dash" = "破線"
|
||||
"Dashes" = "ダッシュ"
|
||||
"Dashes take numbers separated by commas" = "ダッシュはカンマ区切りの数値で入力します"
|
||||
"Dashboard" = "ダッシュボード"
|
||||
"Date created" = "作成日"
|
||||
"Dec" = "12月"
|
||||
|
||||
@@ -377,6 +377,8 @@ status = "draft — reviewed by a native speaker, awaiting a maintainer's approv
|
||||
"Dark" = "ბნელი"
|
||||
"Darken" = "ჩამუქება"
|
||||
"Dash" = "ტირე"
|
||||
"Dashes" = "ტირეები"
|
||||
"Dashes take numbers separated by commas" = "ტირეები მძიმით გამოყოფილი რიცხვებია"
|
||||
"Dashboard" = "სამართავი დაფა"
|
||||
"Date created" = "შექმნის თარიღი"
|
||||
"Dec" = "დეკ"
|
||||
|
||||
@@ -358,6 +358,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "다크"
|
||||
"Darken" = "어둡게 하기"
|
||||
"Dash" = "대시"
|
||||
"Dashes" = "대시"
|
||||
"Dashes take numbers separated by commas" = "대시는 쉼표로 구분한 숫자로 입력하세요"
|
||||
"Decoration style" = "장식 스타일"
|
||||
"Decoration" = "장식"
|
||||
"Deep select" = "깊은 선택"
|
||||
|
||||
@@ -374,6 +374,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Donker"
|
||||
"Darken" = "Darken"
|
||||
"Dash" = "Streep"
|
||||
"Dashes" = "Streepjes"
|
||||
"Dashes take numbers separated by commas" = "Streepjes zijn getallen gescheiden door komma's"
|
||||
"Dashboard" = "Dashboard"
|
||||
"Date created" = "Aanmaakdatum"
|
||||
"Dec" = "dec."
|
||||
|
||||
@@ -373,6 +373,8 @@ name = "Polski"
|
||||
"Dark" = "Ciemny"
|
||||
"Darken" = "Ciemniej"
|
||||
"Dash" = "Kreska"
|
||||
"Dashes" = "Kreski"
|
||||
"Dashes take numbers separated by commas" = "Kreski to liczby oddzielone przecinkami"
|
||||
"Dashboard" = "Pulpit"
|
||||
"Date created" = "Data utworzenia"
|
||||
"Dec" = "Gru"
|
||||
|
||||
@@ -357,6 +357,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Escuro"
|
||||
"Darken" = "Escurecer"
|
||||
"Dash" = "Tracejado"
|
||||
"Dashes" = "Traços"
|
||||
"Dashes take numbers separated by commas" = "Os traços são números separados por vírgulas"
|
||||
"Decoration style" = "Estilo da decoração"
|
||||
"Decoration" = "Decoração"
|
||||
"Deep select" = "Seleção profunda"
|
||||
|
||||
@@ -373,6 +373,8 @@ name = "Русский"
|
||||
"Dark" = "Тёмная"
|
||||
"Darken" = "Затемнение"
|
||||
"Dash" = "Штрих"
|
||||
"Dashes" = "Штрихи"
|
||||
"Dashes take numbers separated by commas" = "Штрихи задаются числами через запятую"
|
||||
"Dashboard" = "Панель аналитики"
|
||||
"Date created" = "Дата создания"
|
||||
"Dec" = "дек."
|
||||
|
||||
@@ -393,6 +393,8 @@ name = "Svenska"
|
||||
"Dark" = "Mörk"
|
||||
"Darken" = "Mörkare"
|
||||
"Dash" = "Streck"
|
||||
"Dashes" = "Streck"
|
||||
"Dashes take numbers separated by commas" = "Streck anges som tal åtskilda med kommatecken"
|
||||
"Dashboard" = "Instrumentpanel"
|
||||
"Date created" = "Skapandedatum"
|
||||
"Dec" = "Dec"
|
||||
|
||||
@@ -371,6 +371,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "มืด"
|
||||
"Darken" = "Darken"
|
||||
"Dash" = "เส้นประ"
|
||||
"Dashes" = "เส้นประ"
|
||||
"Dashes take numbers separated by commas" = "ใส่เส้นประเป็นตัวเลขคั่นด้วยจุลภาค"
|
||||
"Dashboard" = "แดชบอร์ด"
|
||||
"Date created" = "วันที่สร้าง"
|
||||
"Dec" = "ธ.ค."
|
||||
|
||||
@@ -366,6 +366,8 @@ name = "Türkçe"
|
||||
"Dark" = "Koyu"
|
||||
"Darken" = "Koyulaştır"
|
||||
"Dash" = "Kesik çizgi"
|
||||
"Dashes" = "Kesik çizgiler"
|
||||
"Dashes take numbers separated by commas" = "Kesik çizgiler virgülle ayrılmış sayılardır"
|
||||
"Dashboard" = "Pano"
|
||||
"Date created" = "Oluşturulma tarihi"
|
||||
"Dec" = "Ara"
|
||||
|
||||
@@ -357,6 +357,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "Tối"
|
||||
"Darken" = "Làm tối"
|
||||
"Dash" = "Nét đứt"
|
||||
"Dashes" = "Các nét đứt"
|
||||
"Dashes take numbers separated by commas" = "Nét đứt là các số cách nhau bằng dấu phẩy"
|
||||
"Dashboard" = "Bảng điều khiển"
|
||||
"Date created" = "Ngày tạo"
|
||||
"Dec" = "Thg 12"
|
||||
|
||||
@@ -362,6 +362,8 @@ status = "draft — needs native review"
|
||||
"Dark" = "深色"
|
||||
"Darken" = "变暗"
|
||||
"Dash" = "虚线"
|
||||
"Dashes" = "虚线"
|
||||
"Dashes take numbers separated by commas" = "虚线为以逗号分隔的数字"
|
||||
"Decoration style" = "装饰线样式"
|
||||
"Decoration" = "装饰线"
|
||||
"Deep select" = "深度选择"
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
//! The stroke settings' Dash and Gap fields edit the first pair of a dash pattern and keep the
|
||||
//! rest of it (#1681): an imported `[4, 2, 1, 2]` used to collapse to `[dash, gap]` on the first edit.
|
||||
//! The stroke settings' dash pattern: Dash and Gap edit a pair, and the Custom style's Dashes field
|
||||
//! takes the whole pattern as `dash, gap, dash, gap…` (#1681). A longer pattern shows there, so an
|
||||
//! imported `[4, 2, 1, 2]` stays whole.
|
||||
|
||||
use egui::{Event, Id, Key, Modifiers};
|
||||
use figcraft_doc::NodeId;
|
||||
use figcraft_engine::Session;
|
||||
use serde_json::json;
|
||||
|
||||
use crate::export_preview_tests::{click, labelled};
|
||||
use crate::layers_drag_tests::Ui;
|
||||
|
||||
/// A selected rectangle with a stroke dashed `dashes`, its advanced stroke settings shown.
|
||||
@@ -24,9 +26,14 @@ fn dashes(u: &Ui, r: NodeId) -> Vec<f64> {
|
||||
u.app.session.doc().unwrap().node(r).unwrap().stroke.dashes.clone()
|
||||
}
|
||||
|
||||
/// Type `text` into the number field `id` and press Enter.
|
||||
fn type_into(u: &mut Ui, id: &str, text: &str) {
|
||||
let at = u.ctx.read_response(Id::unique(id).with("field")).unwrap_or_else(|| panic!("{id} shows")).rect.center();
|
||||
/// Whether the field `id` (with `part`) showed in the last frame.
|
||||
fn shows(u: &Ui, id: &str, part: &str) -> bool {
|
||||
u.ctx.read_response(Id::unique(id).with(part)).is_some()
|
||||
}
|
||||
|
||||
/// Click the field `id` (at `part`), type `text` and press Enter.
|
||||
fn type_in(u: &mut Ui, id: &str, part: &str, text: &str) {
|
||||
let at = u.ctx.read_response(Id::unique(id).with(part)).unwrap_or_else(|| panic!("{id} shows")).rect.center();
|
||||
u.button(at, true);
|
||||
u.button(at, false);
|
||||
u.frame(vec![]);
|
||||
@@ -38,13 +45,103 @@ fn type_into(u: &mut Ui, id: &str, text: &str) {
|
||||
u.frame(vec![]);
|
||||
}
|
||||
|
||||
/// Type `text` into the number field `id` and press Enter.
|
||||
fn type_into(u: &mut Ui, id: &str, text: &str) {
|
||||
type_in(u, id, "field", text);
|
||||
}
|
||||
|
||||
/// Type `text` into the Dashes field and press Enter.
|
||||
fn type_list(u: &mut Ui, text: &str) {
|
||||
type_in(u, "stroke_dashes", "click", text);
|
||||
}
|
||||
|
||||
/// Open the Stroke style menu (showing `shown`) and pick `item`.
|
||||
fn pick_style(u: &mut Ui, shown: &str, item: &str) {
|
||||
let at = |u: &mut Ui, text: &str, last: bool| {
|
||||
let all: Vec<_> = labelled(u).into_iter().filter(|(t, _)| t == text).map(|x| x.1).collect();
|
||||
// The menu draws over the panel; in the panel the menu's button comes before its fields.
|
||||
*(if last { all.last() } else { all.first() }).unwrap_or_else(|| panic!("no {text:?}"))
|
||||
};
|
||||
let button = at(u, shown, false);
|
||||
click(u, button);
|
||||
let choice = at(u, item, true);
|
||||
click(u, choice);
|
||||
u.frame(vec![]);
|
||||
}
|
||||
|
||||
fn toast(u: &Ui) -> String {
|
||||
u.app.ui.toast.as_ref().map(|t| t.0.clone()).unwrap_or_default()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn editing_the_dash_or_gap_keeps_the_rest_of_the_pattern() {
|
||||
fn a_longer_pattern_shows_as_a_list_and_stays_whole() {
|
||||
let (mut u, r) = scene(json!([4, 2, 1, 2]));
|
||||
type_into(&mut u, "stroke_dash", "6");
|
||||
assert_eq!(dashes(&u, r), [6.0, 2.0, 1.0, 2.0]);
|
||||
type_into(&mut u, "stroke_gap", "3");
|
||||
assert_eq!(dashes(&u, r), [6.0, 3.0, 1.0, 2.0]);
|
||||
assert!(shows(&u, "stroke_dashes", "click") && !shows(&u, "stroke_dash", "field"), "Custom, not Dash and Gap");
|
||||
assert!(labelled(&mut u).iter().any(|(t, _)| t == "4, 2, 1, 2"));
|
||||
assert_eq!(dashes(&u, r), [4.0, 2.0, 1.0, 2.0], "showing it changes nothing");
|
||||
// The reference's own example: dashes and gaps of any length, as many as you like.
|
||||
type_list(&mut u, "10, 20, 10, 20, 80, 20, 10, 100");
|
||||
assert_eq!(dashes(&u, r), [10.0, 20.0, 10.0, 20.0, 80.0, 20.0, 10.0, 100.0]);
|
||||
// Spaces don't matter, and an odd count is kept as typed (it draws repeated).
|
||||
type_list(&mut u, "4,2 , 1.5,");
|
||||
assert_eq!(dashes(&u, r), [4.0, 2.0, 1.5]);
|
||||
assert!(labelled(&mut u).iter().any(|(t, _)| t == "4, 2, 1.5"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn only_numbers_go_in_the_list() {
|
||||
let (mut u, r) = scene(json!([4, 2, 1, 2]));
|
||||
for bad in ["4, x", "-1, 2", "inf", ",", " "] {
|
||||
u.app.ui.toast = None;
|
||||
type_list(&mut u, bad);
|
||||
assert_eq!(dashes(&u, r), [4.0, 2.0, 1.0, 2.0], "{bad:?} changes nothing");
|
||||
assert_eq!(toast(&u), "Dashes take numbers separated by commas", "{bad:?} says why");
|
||||
}
|
||||
// Leaving the text as it was isn't an edit.
|
||||
u.app.ui.toast = None;
|
||||
type_list(&mut u, "4, 2, 1, 2");
|
||||
assert_eq!(toast(&u), "");
|
||||
}
|
||||
|
||||
/// Custom on a plain pair keeps the pattern and shows it as a list, and stays that way after a
|
||||
/// list of one pair is typed; Dash goes back to the fields with the first pair of the list.
|
||||
#[test]
|
||||
fn the_style_menu_moves_between_the_fields_and_the_list() {
|
||||
let (mut u, r) = scene(json!([6, 3]));
|
||||
assert!(shows(&u, "stroke_dash", "field") && !shows(&u, "stroke_dashes", "click"));
|
||||
pick_style(&mut u, "Dash", "Custom");
|
||||
assert!(shows(&u, "stroke_dashes", "click") && !shows(&u, "stroke_dash", "field"));
|
||||
assert_eq!(dashes(&u, r), [6.0, 3.0], "choosing it changes nothing");
|
||||
type_list(&mut u, "5, 5");
|
||||
assert_eq!(dashes(&u, r), [5.0, 5.0]);
|
||||
assert!(shows(&u, "stroke_dashes", "click"), "still the list");
|
||||
type_list(&mut u, "8, 2, 1, 2");
|
||||
pick_style(&mut u, "Custom", "Dash");
|
||||
assert_eq!(dashes(&u, r), [8.0, 2.0], "the first dash and gap");
|
||||
assert!(shows(&u, "stroke_dash", "field") && !shows(&u, "stroke_dashes", "click"));
|
||||
pick_style(&mut u, "Dash", "Solid");
|
||||
assert_eq!(dashes(&u, r), Vec::<f64>::new());
|
||||
// From Solid, a list starts from the same pair Dash does: four stroke widths.
|
||||
pick_style(&mut u, "Solid", "Custom");
|
||||
assert_eq!(dashes(&u, r), [8.0, 8.0]);
|
||||
assert!(shows(&u, "stroke_dashes", "click"));
|
||||
}
|
||||
|
||||
/// Custom chosen for one layer doesn't follow the selection to another.
|
||||
#[test]
|
||||
fn a_chosen_list_belongs_to_its_selection() {
|
||||
let (mut u, r) = scene(json!([6, 3]));
|
||||
pick_style(&mut u, "Dash", "Custom");
|
||||
let other = NodeId(u.app.run("shape.rectangle", json!({"x": 300, "y": 0, "width": 50, "height": 50})).unwrap()["id"].as_u64().unwrap());
|
||||
u.app.run("node.set", json!({"ids": [other], "props": {"strokes": ["#000000"], "dashes": [6, 3]}}));
|
||||
u.app.run("select.set", json!({"ids": [other]}));
|
||||
u.frame(vec![]);
|
||||
u.frame(vec![]);
|
||||
assert!(shows(&u, "stroke_dash", "field"), "a pair shows as Dash and Gap");
|
||||
u.app.run("select.set", json!({"ids": [r]}));
|
||||
u.frame(vec![]);
|
||||
u.frame(vec![]);
|
||||
assert!(shows(&u, "stroke_dashes", "click"), "back on the first layer, the list");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -52,15 +149,6 @@ fn a_single_value_pattern_is_the_dash_and_the_gap() {
|
||||
let (mut u, r) = scene(json!([5]));
|
||||
type_into(&mut u, "stroke_gap", "2");
|
||||
assert_eq!(dashes(&u, r), [5.0, 2.0]);
|
||||
}
|
||||
|
||||
/// An odd-length pattern draws twice over (`[4, 2, 1]` is `[4, 2, 1, 4, 2, 1]`): editing its Dash
|
||||
/// writes the repeat out, so only the first dash changes and every gap stays as drawn.
|
||||
#[test]
|
||||
fn an_odd_length_pattern_keeps_its_repeat() {
|
||||
let (mut u, r) = scene(json!([4, 2, 1]));
|
||||
type_into(&mut u, "stroke_dash", "6");
|
||||
assert_eq!(dashes(&u, r), [6.0, 2.0, 1.0, 4.0, 2.0, 1.0]);
|
||||
type_into(&mut u, "stroke_gap", "3");
|
||||
assert_eq!(dashes(&u, r), [6.0, 3.0, 1.0, 4.0, 2.0, 1.0]);
|
||||
type_into(&mut u, "stroke_dash", "7");
|
||||
assert_eq!(dashes(&u, r), [7.0, 2.0]);
|
||||
}
|
||||
@@ -187,11 +187,9 @@ fn brush_row(app: &mut FigApp, ui: &mut Ui, ids: &[NodeId], brush: Option<Option
|
||||
});
|
||||
}
|
||||
|
||||
/// Dash pattern `dashes` with its first dash (`i` 0) or first gap (`i` 1) set to `v`, keeping the
|
||||
/// rest of the pattern: the panel shows only the first pair, and editing it must not collapse an
|
||||
/// imported `[4, 2, 1, 2]` to two values (#1681). An odd-length pattern is drawn repeated
|
||||
/// (`figcraft_pathops::width::dash_pattern`: `[4, 2, 1]` is `[4, 2, 1, 4, 2, 1]`), so it is
|
||||
/// written out that way first and only the edited entry changes; `[5]` becomes `[5, 5]`.
|
||||
/// Dash pattern `dashes` with its first dash (`i` 0) or first gap (`i` 1) set to `v`. A lone value
|
||||
/// is both (`figcraft_pathops::width::dash_pattern` draws odd lengths repeated), so `[5]` is
|
||||
/// written out as `[5, 5]` first and only the edited entry changes.
|
||||
fn set_dash(dashes: &[f64], i: usize, v: f64) -> Vec<f64> {
|
||||
let mut d = if dashes.is_empty() { vec![4.0] } else { dashes.to_vec() };
|
||||
if d.len() % 2 == 1 {
|
||||
@@ -203,38 +201,92 @@ fn set_dash(dashes: &[f64], i: usize, v: f64) -> Vec<f64> {
|
||||
d
|
||||
}
|
||||
|
||||
/// The first dash and gap of a pattern (a lone value is both).
|
||||
fn first_pair(dashes: &[f64]) -> [f64; 2] {
|
||||
let dash = dashes.first().copied().unwrap_or(4.0);
|
||||
[dash, dashes.get(1).copied().unwrap_or(dash)]
|
||||
}
|
||||
|
||||
/// The Dashes field's text as a pattern: numbers of 0 or more separated by commas (`10, 20, 10`).
|
||||
/// `None` for anything else, or nothing at all.
|
||||
fn parse_dashes(text: &str) -> Option<Vec<f64>> {
|
||||
let number = |s: &str| s.parse::<f64>().ok().filter(|v| v.is_finite() && *v >= 0.0);
|
||||
let values = text.split(',').map(str::trim).filter(|s| !s.is_empty()).map(number).collect::<Option<Vec<f64>>>()?;
|
||||
(!values.is_empty()).then_some(values)
|
||||
}
|
||||
|
||||
/// The Stroke style menu and the fields of the style it shows: Dash and Gap, or a Custom list of
|
||||
/// Dashes (`dash, gap, dash, gap…`). The file keeps only the pattern, so one longer than a pair
|
||||
/// shows as Custom; a shorter one does only while Custom was what the selection `ids` last chose.
|
||||
fn dash_settings(app: &mut FigApp, ui: &mut Ui, ids: &[NodeId], dashes: Option<&[f64]>, weight: f64) {
|
||||
let half = widgets::col_width(ui.available_width());
|
||||
let chosen = Id::unique("stroke_dashes_custom");
|
||||
let pattern = dashes.filter(|d| !d.is_empty());
|
||||
let custom = pattern.is_some_and(|d| d.len() > 2 || ui.data(|m| m.get_temp::<Vec<NodeId>>(chosen)).as_deref() == Some(ids));
|
||||
let a_pair = pattern.map_or([weight * 4.0; 2], first_pair);
|
||||
widgets::sublabels(ui, tr("Stroke style"), None);
|
||||
row(ui, 32.0, |ui| {
|
||||
let style = match (pattern, custom) {
|
||||
(None, _) => tr("Solid"),
|
||||
(_, true) => tr("Custom"),
|
||||
(_, false) => tr("Dash"),
|
||||
};
|
||||
let resp = widgets::dropdown(ui, style, half, None);
|
||||
menu_popup(&resp).show(|ui| {
|
||||
if menu_item(ui, tr("Solid"), "") {
|
||||
app.set_props(ids, json!({"dashes": []}));
|
||||
ui.close();
|
||||
}
|
||||
if menu_item(ui, tr("Dash"), "") {
|
||||
ui.data_mut(|m| m.remove::<Vec<NodeId>>(chosen));
|
||||
app.set_props(ids, json!({"dashes": a_pair}));
|
||||
ui.close();
|
||||
}
|
||||
if menu_item(ui, tr("Custom"), "") {
|
||||
ui.data_mut(|m| m.insert_temp(chosen, ids.to_vec()));
|
||||
if pattern.is_none() {
|
||||
app.set_props(ids, json!({"dashes": a_pair}));
|
||||
}
|
||||
ui.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
let Some(d) = pattern else { return };
|
||||
if custom {
|
||||
widgets::sublabels(ui, tr("Dashes"), None);
|
||||
let text = d.iter().map(|v| widgets::fmt_num(*v)).collect::<Vec<_>>().join(", ");
|
||||
row(ui, 32.0, |ui| {
|
||||
let Some(typed) = widgets::text_field(ui, Id::unique("stroke_dashes"), &text, ui.available_width(), "").filter(|t| *t != text) else {
|
||||
return;
|
||||
};
|
||||
match parse_dashes(&typed) {
|
||||
Some(list) => {
|
||||
// It stays a list even if what's typed is a single pair.
|
||||
ui.data_mut(|m| m.insert_temp(chosen, ids.to_vec()));
|
||||
app.set_props(ids, json!({"dashes": list}));
|
||||
}
|
||||
None => app.toast(tr("Dashes take numbers separated by commas")),
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let [dash, gap] = first_pair(d);
|
||||
widgets::sublabels(ui, tr("Dash"), Some(tr("Gap")));
|
||||
row(ui, 32.0, |ui| {
|
||||
let e = widgets::number_field(ui, Id::unique("stroke_dash"), Lead::None, Some(dash), "", half, 1.0);
|
||||
app.field(ids, "dashes", e, |v| json!(set_dash(d, 0, v)));
|
||||
let e = widgets::number_field(ui, Id::unique("stroke_gap"), Lead::None, Some(gap), "", half, 1.0);
|
||||
app.field(ids, "dashes", e, |v| json!(set_dash(d, 1, v)));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Advanced stroke settings: dash pattern, width profile, join and the end points of open paths.
|
||||
pub(super) fn stroke_settings(app: &mut FigApp, ui: &mut Ui, doc: &Document, sel: &[NodeId]) {
|
||||
let ids = sel.to_vec();
|
||||
let half = widgets::col_width(ui.available_width());
|
||||
let st = common(doc, sel, |n| n.stroke.clone());
|
||||
let dashes = st.as_ref().map(|s| s.dashes.clone());
|
||||
let weight = st.as_ref().map(|s| s.weight).unwrap_or(1.0).max(1.0);
|
||||
widgets::sublabels(ui, tr("Stroke style"), None);
|
||||
row(ui, 32.0, |ui| {
|
||||
let dashed = dashes.as_ref().is_some_and(|d| !d.is_empty());
|
||||
let resp = widgets::dropdown(ui, if dashed { tr("Dash") } else { tr("Solid") }, half, None);
|
||||
menu_popup(&resp).show(|ui| {
|
||||
if menu_item(ui, tr("Solid"), "") {
|
||||
app.set_props(&ids, json!({"dashes": []}));
|
||||
ui.close();
|
||||
}
|
||||
if menu_item(ui, tr("Dash"), "") {
|
||||
app.set_props(&ids, json!({"dashes": [weight * 4.0, weight * 4.0]}));
|
||||
ui.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
if let Some(d) = dashes.filter(|d| !d.is_empty()) {
|
||||
let (dash, gap) = (d.first().copied().unwrap_or(4.0), d.get(1).copied().unwrap_or_else(|| d.first().copied().unwrap_or(4.0)));
|
||||
widgets::sublabels(ui, tr("Dash"), Some(tr("Gap")));
|
||||
row(ui, 32.0, |ui| {
|
||||
let e = widgets::number_field(ui, Id::unique("stroke_dash"), Lead::None, Some(dash), "", half, 1.0);
|
||||
app.field(&ids, "dashes", e, |v| json!(set_dash(&d, 0, v)));
|
||||
let e = widgets::number_field(ui, Id::unique("stroke_gap"), Lead::None, Some(gap), "", half, 1.0);
|
||||
app.field(&ids, "dashes", e, |v| json!(set_dash(&d, 1, v)));
|
||||
});
|
||||
}
|
||||
dash_settings(app, ui, &ids, st.as_ref().map(|s| s.dashes.as_slice()), weight);
|
||||
width_profile_row(app, ui, &ids, st.as_ref().map(|s| s.profile().cloned()));
|
||||
brush_row(app, ui, &ids, st.as_ref().map(|s| s.brush.clone()), ui.available_width());
|
||||
let join = st.as_ref().map(|s| s.join);
|
||||
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
# FigCraft roadmap: milestones and what's next
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (a control request can set its own timeout, up to 10 minutes (`timeoutMs`; `figcraft-cli mcp --attach PORT --timeout SECONDS`) (#1696); gap 6: a widget opens its plugin's panel (plugin API 5), whose callbacks redraw it; the keyboard's Menu key opens the context menu, as Shift+F10 does; an Open link action can open in place of the prototype, with "Open in new tab" off (gap 15); a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; the eyedropper with Cmd/Ctrl+Shift makes a colour style or variable of what it picks; a live session's welcome sends the document compressed to clients that read it, about seven times smaller (#1665); a control request that times out says truthfully whether it was dropped or is still running and will take effect, and only screenshots and input blame the window (#1673); a board keeps earlier votes' results, listed newest first in Results and deleted one at a time; a server can list the files shared from it now for everyone who reaches it, Home ▸ Online shows them and their links carry no secret (`team_files`, part of #742); a selected connector's bar on a board sets its start and end points, solid or dashed, its weight and any colour (#1596); cells copied from a spreadsheet paste onto a board as a table; a long layer name stays on one line in the Export button and the Dev Mode header, ending with an ellipsis, and no longer covers the Design panel (#1650); with hundreds of layers selected, the Design panel and the selection overlays stop going over the whole selection on every frame, so dragging 648 layers averages about 1.1 ms of UI per frame (#1571); plugin panels show pictures: an `image` control, base64 within 256 KB and 4,096 px a side, named by its label (gap 6); a drag moving many layers re-runs only what sits around them, not each layer's bindings, sizing, text and instance checks, on every move (#1571); damaged font tracking table offsets are checked instead of wrapping on 32-bit targets, and font indexing makes its existing offset bounds explicit (#1125); pasted layers whose image the clipboard lacks are named and show a placeholder that reads as missing (#1646); paint-style colours on layers pasted from another design app keep their style instead of turning black (#1638); Shift+Cmd/Ctrl+Enter on a selected board shape adds the next shape already joined to it, and goes on typing (#1597); a name typed for a variable or collection finds the one with that exact id before one named like it, and stored mode ids, font family variables and the panels' labels read exact ids (#1613); plugin widgets have hover styles: a layer's `hover` fill, stroke, opacity or text colour shows while the pointer is over it (gap 6); every file a command reads whole by path is a regular file within a cap that fits it: documents 16 GiB, placed images 256 MiB, CLI scripts 1 GiB; compact layer trees with fields and outline (M0.9, part of #996); while a drag only moves a large selection, its outlines, box, slots, spacing and Design panel values are worked out once and shifted, not rebuilt on every move (#1571); an imported or pasted file finds an installed family under the other names its fonts give it, and with other case and spacing, instead of reporting it missing (#1292); a panic in a grouped closure outside any command rolls the group back like a failed group: documents, selection, undo and redo, history limit and journal as before (#1085); a development example generates figcraft-cli's shell completions and man pages from its clap definitions (part of #1396); `.fig` ZIP image reads share a total byte budget and count skipped images in the import warnings (#1076); stored variable and collection references keep their identity when another object is named like their id (follow-up to #1542); a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; the server key is checked by comparing SHA-256 hashes of the presented and the kept key, as the deployment guide says (#1130); opening a file contacts no team library server it names until you check it (#1097); a hostile server can no longer grow a client's memory with made-up people, and a session remembers a bounded number of deleted layer ids (#1121); `doc.list` gives AI agents and plugins the open files' names, not their paths (#1117); with a large selection, frames where nothing changed reuse the selection's outlines, box and slots and the Design panel's instance and position values instead of working them out again (#1571); team libraries and plugins larger than the 16 MiB download burst can be downloaded again, more slowly (#1089); a batch keeps one undo snapshot, not one per step (#1099); files nested 256 levels deep import on the browser's 1 MB stacLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-30 · **Change:** minor (a stroke's Custom style takes a dash pattern of any length as a comma-separated list (#1681); a control request can set its own timeout, up to 10 minutes (`timeoutMs`; `figcraft-cli mcp --attach PORT --timeout SECONDS`) (#1696); gap 6: a widget opens its plugin's panel (plugin API 5), whose callbacks redraw it; the keyboard's Menu key opens the context menu, as Shift+F10 does; an Open link action can open in place of the prototype, with "Open in new tab" off (gap 15); a collection of this file can be extended (Extend collection on its row, `variable.extendCollection`), its extension following its edits at once, and extended collections extend again in the file; the eyedropper with Cmd/Ctrl+Shift makes a colour style or variable of what it picks; a live session's welcome sends the document compressed to clients that read it, about seven times smaller (#1665); a control request that times out says truthfully whether it was dropped or is still running and will take effect, and only screenshots and input blame the window (#1673); a board keeps earlier votes' results, listed newest first in Results and deleted one at a time; a server can list the files shared from it now for everyone who reaches it, Home ▸ Online shows them and their links carry no secret (`team_files`, part of #742); a selected connector's bar on a board sets its start and end points, solid or dashed, its weight and any colour (#1596); cells copied from a spreadsheet paste onto a board as a table; a long layer name stays on one line in the Export button and the Dev Mode header, ending with an ellipsis, and no longer covers the Design panel (#1650); with hundreds of layers selected, the Design panel and the selection overlays stop going over the whole selection on every frame, so dragging 648 layers averages about 1.1 ms of UI per frame (#1571); plugin panels show pictures: an `image` control, base64 within 256 KB and 4,096 px a side, named by its label (gap 6); a drag moving many layers re-runs only what sits around them, not each layer's bindings, sizing, text and instance checks, on every move (#1571); damaged font tracking table offsets are checked instead of wrapping on 32-bit targets, and font indexing makes its existing offset bounds explicit (#1125); pasted layers whose image the clipboard lacks are named and show a placeholder that reads as missing (#1646); paint-style colours on layers pasted from another design app keep their style instead of turning black (#1638); Shift+Cmd/Ctrl+Enter on a selected board shape adds the next shape already joined to it, and goes on typing (#1597); a name typed for a variable or collection finds the one with that exact id before one named like it, and stored mode ids, font family variables and the panels' labels read exact ids (#1613); plugin widgets have hover styles: a layer's `hover` fill, stroke, opacity or text colour shows while the pointer is over it (gap 6); every file a command reads whole by path is a regular file within a cap that fits it: documents 16 GiB, placed images 256 MiB, CLI scripts 1 GiB; compact layer trees with fields and outline (M0.9, part of #996); while a drag only moves a large selection, its outlines, box, slots, spacing and Design panel values are worked out once and shifted, not rebuilt on every move (#1571); an imported or pasted file finds an installed family under the other names its fonts give it, and with other case and spacing, instead of reporting it missing (#1292); a panic in a grouped closure outside any command rolls the group back like a failed group: documents, selection, undo and redo, history limit and journal as before (#1085); a development example generates figcraft-cli's shell completions and man pages from its clap definitions (part of #1396); `.fig` ZIP image reads share a total byte budget and count skipped images in the import warnings (#1076); stored variable and collection references keep their identity when another object is named like their id (follow-up to #1542); a component set's property rows fit the 240 px right panel: variant values wrap two to a line there and every + and − stays in view; the server key is checked by comparing SHA-256 hashes of the presented and the kept key, as the deployment guide says (#1130); opening a file contacts no team library server it names until you check it (#1097); a hostile server can no longer grow a client's memory with made-up people, and a session remembers a bounded number of deleted layer ids (#1121); `doc.list` gives AI agents and plugins the open files' names, not their paths (#1117); with a large selection, frames where nothing changed reuse the selection's outlines, box and slots and the Design panel's instance and position values instead of working them out again (#1571); team libraries and plugins larger than the 16 MiB download burst can be downloaded again, more slowly (#1089); a batch keeps one undo snapLine truncated
|
||||
|
||||
Forward-looking plan. Where FigCraft stands today: [`ROADMAP.md`](../ROADMAP.md) and
|
||||
[`target-app-parity.md`](target-app-parity.md); the full ranked list: [`gaps.md`](gaps.md). Hours
|
||||
@@ -75,6 +75,7 @@ blockers.
|
||||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-31 | minor | M4, #1681: Stroke style has Custom beside Solid and Dash, with a Dashes field that takes the whole pattern as `dash, gap, dash, gap…`. A pattern longer than a pair shows there instead of in Dash and Gap, so an imported one can be read and edited whole. No phase or centre on corners, which the reference has no setting for. |
|
||||
| 2026-10-31 | minor | M8, #1696: the control channel waited a fixed 60 s for every request, so a client that knowingly sent a big `batch` could only split it, while the same script ran headless without a limit. A request can now carry `timeoutMs` beside `id` and `method` (whole milliseconds, at most 600,000); without it the wait stays 60 s, and an app from before this ignores the field. `figcraft-cli mcp --attach PORT --timeout SECONDS` (1–600) sends it with every request and reads the app's answers that much longer. A timeout's message says how long the request waited. Tests: `control_server_tests`, `backend_tests::a_raised_timeout_is_asked_for_on_each_request`, `args`. Numbers unchanged |
|
||||
| 2026-10-30 | minor | M11, gap 6: a widget can open its plugin's panel, as a Figma widget's click handler shows a plugin window (plugin API 5). A widget callback's `ui_show` (click, field edit or menu item) opens the plugin's one panel and keeps the module loaded; each panel callback gets the widget's id and current state as well as the panel's event and values, and its `widget_render` redraws the widget in the same undo step. A widget removed meanwhile isn't redrawn (the callback rolls back, the panel stays); an API 3 or 4 plugin's `ui_show` from a widget still opens nothing; a presented prototype opens no panel. The Counter example (API 5) gets Set count… in its menu: a panel whose Set button redraws it with the count entered. Tests: `widget_panel_tests` (engine), the Counter's unit test. Numbers unchanged |
|
||||
| 2026-10-30 | minor | Gap 4: the keyboard's Menu key opens the context menu, as Shift+F10 does (at the focused layer row or below the canvas selection, with the keyboard in the menu). egui already reported the key; FigCraft's keymap had no name or binding for it. `view.contextMenu` now takes `Menu` too, and the Context menus row is done (`layers_keyboard_tests`). Stale rows corrected: smart-selection spacing has had reorder rings since the "M1: smart-selection drag reordering" landing (the row is still partial: irregular grids and several marked layers aren't covered), and gap 4 and the parity summary quoted shortcut counts from before the last bindings (now 128 bound, none missing, 57 undocumented pinned, as `shortcut_parity_tests` counts). |
|
||||
|
||||
Reference in new issue
Block a user