Commit Graph

6314 Commits

Author SHA1 Message Date
bflatastic 6bfbd9ccf4 M3: a publish refusal gives each left-out asset's id beside its name
A name can be shared, or read as a style or collection id, so listing it
in include or exclude could select another asset. The id selects only it.
2026-12-06 02:11:22 +07:00
bflatastic ed826d25c9 M3: components parity is last updated on the day of its newest row 2026-12-06 01:57:22 +07:00
Denis Gomes 694e7b478a M3: a publish refusal names a renamed asset by its current name
A publish refused for leaving out assets the last version offered (#3039)
named them as that version's manifest did. A component renamed since
then was named by its old name, which `include` and `exclude` don't
resolve (they look names up in the file), so following the refusal's
advice failed. The refusal now names them as the file has them.

Tests: library::tests::a_refusal_names_a_renamed_asset_by_its_current_name.
2026-12-05 13:46:06 -05:00
BFlat a5fa5461f8 Merge pull request #3067 from storytold/bug/615-3062-copy-event-svg
M4: a copy event with Alt+Shift held runs Copy as SVG, not Copy properties (#3062)
2026-12-06 01:26:50 +07:00
bflatastic 27c1df0b64 M4: changelog row for the copy event fix (#3062) 2026-12-06 00:37:56 +07:00
bflatastic e674e4632f M4: a copy event with Alt+Shift held runs Copy as SVG, not Copy properties (#3062)
The copy event picked Copy properties whenever Alt was held. It now asks the
keymap which command Cmd/Ctrl+C with the held modifiers runs, and leaves it to
the key press when that came too, so the command runs once.
2026-12-06 00:37:49 +07:00
BFlat 1514849c00 M4: Copy as SVG gets a shortcut, Alt+Shift+Cmd/Ctrl+C (#3062) (#3064) 2026-12-06 00:36:17 +07:00
BFlat 2c01f8754e Merge pull request #3056 from birnayt/fix/penpot-text-import-fidelity
format(penpot): preserve verticalAlign, paragraph textAlign, and dominant font style
2026-12-06 00:28:51 +07:00
BFlat 34697872a1 M3: a dragged layer stays under the layers drawn above it (#3051) (#3058)
* M3: a dragged layer stays under the layers drawn above it (#3051)

* M3: note the drag sprite keeps the stacking order in the parity docs (#3051)

* M3: a layer moved under one drawn above it waits clear of it until the in-order render shows (#3051)

The ending sprite was frozen where the layers had just moved, over the layer
above, and drawn there until the render of the page in order arrived. It now
stays at its last place clear of that layer.

* M3: what draws above a dragged layer follows its parent's stacking order (#3051)

An auto layout frame whose first child paints on top draws its children in
reverse, so the layers above a dragged child are the ones before it there.
2026-12-06 00:10:10 +07:00
BFlat e07a07575a Merge pull request #3059 from lileeei/2361-mac-cmd-events
M8: a Cmd shortcut injected through ui.input fires on macOS (#2361)
2026-12-05 23:59:16 +07:00
BFlat 122a8bf7a7 Merge pull request #3060 from storytold/bug/603-3057-format-penpot-omitted-keepa
format(penpot): an image fill without keepAspectRatio stretches to the layer (#3057)
2026-12-05 23:44:37 +07:00
Lucas Rodrigues f057207c23 format(penpot): address review feedback on root textAlign and base fill promotion 2026-12-05 16:34:31 +00:00
BFlat f4320431b4 Merge pull request #3063 from storytold/revert/2869-android-1 2026-12-05 23:31:17 +07:00
bflatastic 2b01203afc Revert "Merge pull request #2869 from storytold/cp/pr-1446-68"
This reverts commit c279c0a928, reversing
changes made to 5e455cedcb.
2026-12-05 23:25:34 +07:00
bflatastic 9a292c5a1d format(penpot): count -0.0 and 0.0 text styles as one when picking the base style (#3056) 2026-12-05 23:08:45 +07:00
bflatastic 4d4be64af7 format: a Penpot image fill without keepAspectRatio stretches (#3057) 2026-12-05 23:06:28 +07:00
bflatastic 459131eaab format(penpot): count text styles in a map so many-style texts import in linear time (#3056) 2026-12-05 23:04:14 +07:00
bflatastic ae4c1f0e9f M6: note Penpot text alignment and base style import in the file-format log (#3056) 2026-12-05 22:57:22 +07:00
lileeei cc4f5add7f M8: a Cmd shortcut injected through ui.input fires on macOS (#2361)
No shortcut bound in the keymap fired on macOS when it was injected
with ui.input and used Cmd. The control channel built the event's
modifiers as {ctrl: command} for `cmd`, so a Cmd shortcut arrived with
Ctrl held too, and keymap::same_mods compares modifiers exactly on Mac:
no Cmd binding matched, and edit.copyAsPng ran without its toast. The
clipboard fence test has been red on macOS, deterministically; Linux
passes on the loose comparison, so a run of the suite there cannot
catch it.

Synthetic events now carry what a real keyboard event holds on the
platform: `cmd` is mac_cmd and command on macOS, ctrl and command
elsewhere, and on macOS `ctrl` is the separate Control key. That is the
rule ui.key documents; ui.input's entry now states it too. The hold
branch (ModifiersChanged) uses the same synthesis.

Test: shortcuts_tests::every_shortcuts_keys_sent_as_control_input_reach_it_on_each_platform
sends every binding's own keys through the synthesis for each platform
by name, so a Linux run catches it too; it fails without the fix.
clipboard_fence_tests::a_synthetic_copy_shortcut_leaves_the_system_clipboard_alone
passes on macOS.
2026-12-05 23:36:20 +08:00
BFlat d84e704437 Merge pull request #823 from yelintong/feat/stroke-settings
M4: the stroke's advanced settings in a popover, the width profile among them
2026-12-05 22:33:55 +07:00
BFlat c279c0a928 Merge pull request #2869 from storytold/cp/pr-1446-68
Android 1/6: move the window and launch logic into a library, so the binary is a shim
2026-12-05 22:32:31 +07:00
Lucas Rodrigues 5efaab2363 format(penpot): preserve verticalAlign, paragraph textAlign, and dominant font style 2026-12-05 15:31:02 +00:00
BFlat 5e455cedcb M4: hovering a colour style or variable in the style picker previews it on the canvas (#3043) (#3054) 2026-12-05 22:18:07 +07:00
BFlat 61c47b93b7 Merge pull request #3039 from denisg0mes/publish-keeps-offered-assets
M3: a publish no longer stops offering what its include leaves out
2026-12-05 22:13:26 +07:00
BFlat 19ad2b6dce M2: a frame's resized edge snaps to the layers in it (#3047) (#3053)
* M2: a frame's resized edge snaps to the layers in it (#3047)

* M2: a resized frame snaps only to the layers its edges leave in place (#3047)

A layer whose constraint carries it with the dragged edge, and a layer auto layout places, no longer offers its starting position as a snap target; nor does a turned or flipped frame.
2026-12-05 22:11:47 +07:00
Ridwan 2f5e81b088 M3: Variable edits only re-resolve affected layers (#3027) (#3038)
* M3: a variable edit resolves only the layers that can read it differently (#3027)

Every variable edit resolved every bound layer of the file again:
binding_scope returned "all" whenever the variables changed. Dragging in a
variable's colour picker edits it each frame, so a large file froze for
seconds per drag.

An edit now resolves the layers bound to the variables that can read
differently (added, removed or changed ones, and those aliasing,
calculating from or extending them), directly or through a style. A
change to a collection (its modes) still resolves every bound layer.

With the reporter's variables and 3,000 bound layers (debug build), one
variable.set went from about 45 ms to about 7 ms.

Tests: variable_edit_scope_tests (the revalued set fails without the fix;
layers bound to the variable and its alias follow it).

* M3: a bound layer's bound children resolve again after it resizes them (#3027)

* M3: bound sizes alone bring in the layers inside, resolved parents first (#3027)

* M3: a layer in scope with any bound size brings in the bound layers inside (#3027)

---------

Co-authored-by: bflatastic <bombayapirat@gmail.com>
2026-12-05 22:08:50 +07:00
bflatastic 0556491148 M4: each stroke setting reads Mixed only when it differs itself (#823)
The popover compared the whole stroke across the selection, so two solid
strokes of different weights showed Mixed for the style, join, width profile,
brush and caps. Each row now compares its own setting.

Co-authored-by: 叶林橦 <108113065+yelintong@users.noreply.github.com>
2026-12-05 21:54:21 +07:00
bflatastic f44f2dddaa app: on Android, start the logger only once, open no control channel and offer no desktop updates
A recreated activity can call `run_android` again in the same process,
where `init` panics on the logger already installed; `try_init` doesn't.
`FIGCRAFT_CONTROL_PORT` could still open the control channel on Android,
which has no command line to ask for one, and the update check would
offer desktop releases that have no Android package. Desktop is unchanged.
2026-12-05 21:43:20 +07:00
bflatastic 1b2106cc58 M4: the stroke's advanced settings in a popover, the width profile among them (#823)
The contributor's stroke settings popover, ported onto main's split right
panel (panels/right/stroke.rs) and its newer settings (custom dashes, the dash
cap, stretch and scatter brushes):

- The stroke row's dots button opens the settings in the shared popover beside
  the Design panel, under Basic / Brush tabs; the width profile shows on both.
- Each setting is a label and a 120-pt control (widgets::setting_row); the width
  profile and brush dropdowns draw their shape across the field
  (widgets::dropdown_art), the name on hover.
- A selection whose stroke settings differ reads Mixed in the style row.
- The popover follows the auto layout popover: it keeps the document and
  selection it opened for, and closes when either changes or when no frame
  draws its button (the stroke removed, mixed stroke lists, another tab). The
  Motion inspector draws the same row, so it stays open there.
- Escape in a field ends that edit and marks the Escape spent
  (a11y::spend_escape), so every popover closes only on the next press.

Tests: stroke_settings_tests (the contributor's, plus Motion mode, Escape
keeping the selection, both tabs and a press on the labels), dash_pattern_tests
open the popover.

Co-authored-by: 叶林橦 <108113065+yelintong@users.noreply.github.com>
2026-12-05 21:31:28 +07:00
bflatastic 1a3062fcca ui: check for file pickers only where a file is picked, so Paste to replace still reads the clipboard
The no-file-pickers check sat in `start_pick`, which Paste to replace also
uses to read the clipboard; on Android it said file dialogs weren't
available and pasted nothing. The check now runs in `pick_file` and
`start_dialog`, the two file-picker paths.
2026-12-05 21:30:37 +07:00
bflatastic 63bdbe1634 app: say file dialogs aren't available where there are none (Android), and copy as PNG only to a clipboard that opened
Opening, saving or picking a folder on a platform without file pickers
answered as if the user had cancelled, so Save As on Android did nothing
and said nothing. `Services::can_pick_files` (default true, false on
Android) is checked where every picker starts, and the app says "File
dialogs aren't available on this device" instead.

`can_copy_image` reported true on the desktop even when the system
clipboard failed to open, so Copy as PNG claimed a copy that was dropped.
It now asks whether the clipboard opened.
2026-12-05 21:22:21 +07:00
Ridwan 23cb380453 M4: Cmd/Ctrl+V into a tall frame lands in view (#3035) (#3037)
* M4: Cmd/Ctrl+V into a tall frame lands in view (#3035)

Paste with a frame selected put layers that couldn't keep their place in
it in the frame's middle. In a tall frame scrolled to its end, that
middle was thousands of pixels off screen, so the paste seemed not to
happen.

They now land in the middle of the part of the frame in view, kept
inside the frame. A frame with none of it in view still takes them in
its middle, as before.

Test: design_paste_tests::paste_into_a_tall_frame_scrolled_to_its_end_lands_in_view
fails without the fix.

* M4: a paste into a frame stays in view, in a turned frame's middle, and centred when larger (#3035)

* M4: a straight line in view keeps its place when pasted into a frame (#3035)

* M4: a copy only touching the view's edge moves into view (#3035)

* M4: a copy larger than the frame centres on the frame on that axis (#3035)
2026-12-05 21:18:32 +07:00
BFlat 33ca1fe18c M3: arrow keys on a fill's opacity keep the field editing (#3048) (#3052) 2026-12-05 21:17:47 +07:00
bflatastic 1e837cb7a8 Merge remote-tracking branch 'origin/main' into pr/3039-562
# Conflicts:
#	docs/components-parity.md
2026-12-05 21:17:09 +07:00
bflatastic 169121acbf M3: the publish form sends every unchecked asset as exclude, so Publish to server isn't refused 2026-12-05 21:15:25 +07:00
BFlat 68ff2453fd fix(engine): the template build-time budget isn't checked under coverage instrumentation (#2938) (#2940)
* fix(engine): the template build-time budget isn't checked under coverage instrumentation (#2938)

* fix(engine): keep a looser template build budget under coverage instead of skipping it (#2938)
2026-12-05 20:40:05 +07:00
bflatastic 6f9065a767 app: Copy as PNG says it isn't available where no clipboard takes pictures (Android) instead of reporting a copy 2026-12-05 20:21:44 +07:00
bflatastic bb9ca68f5d app: say the Android build has no system clipboard, so copy and paste stay inside the app 2026-12-05 20:21:44 +07:00
Kaedo17 95ccaf2c6f app: move the window and launch logic into a library, so the binary is a shim
`apps/figcraft` keeps the same desktop behaviour but splits its launch into
a library (`figcraft::run`) and a shim `main.rs` that calls it. The window,
arguments, services and the run loop move into `lib.rs` unchanged; the only
additions are the dependency split that keeps today's desktop features (rfd,
arboard, accesskit, clipboard, wayland, x11) on desktop, and the Android
entry. Android has no command line, so its launch is the default one: no
control server, no automation roots, no files to open and no invite links,
and the home screen shows. rfd and arboard have no backend for the target (they
do not compile there), so the native file dialogs answer cancelled and the
system clipboard beyond egui's text is desktop only. Android's NativeActivity
entry point (a later step) opens the same app through
`figcraft::run_android`, which hands eframe the activity handle.

This is the groundwork for another host opening the same app; it changes no
desktop code path.
2026-12-05 20:21:42 +07:00
Kaedo17 24dabca141 app: move main.rs to lib.rs as it is, so the move reviews as a move
The next commit turns it into the app library and adds the shim `main.rs`; this one only renames
the file (the package has no binary until then).
2026-12-05 20:19:17 +07:00
bflatastic da39d6be6e Merge main into #823
main split right.rs into panels/right/* and rebuilt the stroke settings
(dash pattern, dash cap, stretch and scatter brushes). The colour picker
anchoring and the icon rhythm from #822 are on main through other changes,
so the merge takes main's side; the stroke settings popover is ported onto
the new panels in the next commit.
2026-12-05 20:04:27 +07:00
Davit Matchakhelidze 096312fff0 i18n(ka): update the Georgian catalog (334 strings) (#3026)
* i18n(ka): update the Georgian catalog

* i18n(ka): update the Georgian catalog

* i18n(ka): drop Untitled, not a key of en.toml on main
2026-12-05 17:39:06 +07:00
BFlat f56cb1b508 M7: a window that quits keeps the recent files another window added since it started (#3029) (#3033)
* M7: a window that quits keeps the recent files another window added since it started (#3029)

* M7: the recent files merge test runs without the interface (#3029)
2026-12-05 17:37:09 +07:00
Akash 1429e3408d fixed issue #2968 : SVG import failed: Invalid XML (#3025)
unexpected end of stream on paste
2026-12-05 17:37:04 +07:00
skylar taylor 3cd554df51 M3: clarify what creating a variant property does (#3020) (#3036) 2026-12-05 17:05:53 +07:00
Denis Gomes 02075f777b M3: a publish no longer stops offering what its include leaves out
library.publish took `include` as everything the library offers. An
agent that published the one component it had changed (include: [925],
cart-line) stopped offering the other 20 components, all 9 styles and
both variable collections of the design system, with no warning, and
the next default publish kept that choice. Pasting one of those
components into another file then made a new component instead of an
instance from the library.

A publish whose `include` leaves out a component, style or collection
the last version offered, still publishable and not hidden by a . or _
name, is now refused, naming them, unless `exclude` names them: listing
them keeps them offered, excluding them withdraws them. Withdrawing
stays possible, but has to be said.

The publish form passes its checkboxes as `include`, so it now sends the
assets the last version offered that are unchecked as `exclude`.

Making `include` add to the last offering instead was rejected: the
form and existing callers use it as the exact list, and a withdrawal by
unchecking would no longer work.

Tests: library::tests::an_include_that_leaves_out_offered_assets_is_refused,
publish_withdraw_tests::unchecking_an_offered_style_publishes_without_it;
publishing_collections_hides_and_versions_variables now names the
collection it withdraws.
2026-12-04 19:20:32 -05:00
BFlat a751ae968d M3: deleting a file's variables reaches library copies bound to them (#3030) (#3032)
A file imported from Figma keeps library components' mains on its hidden
library page, bound to the file's own variables. Deleting such a variable,
its collection or a mode also drops those bindings, which the read-only
check refused as an edit of a library copy, so the variables couldn't be
removed. Those three deletions may now drop the copies' references; every
other edit of a library copy or a library variable stays refused.
2026-12-05 00:26:59 +07:00
BFlat 113ad665e3 fix(pages): deleting the open page keeps the pages list where it was (#3022) (#3023)
* fix(pages): deleting the open page opens the one next to it, so the pages list stays put (#3022)

* test(pages): the open page gives way to its neighbour past dividers (#3022)
2026-12-04 23:39:39 +07:00
BFlat 1f95caf934 M3: a selected variant lists the set's boolean, text and instance swap properties (#3020) (#3021)
* M3: a selected variant lists the set's boolean, text and instance swap properties (#3020)

One variant of a component set selected showed only its variant
properties, so a boolean added to the set looked missing until an
instance was selected. The Current variant section now also lists the
set's other properties with their defaults; they are still edited on
the set (#2346).

* M3, #3020: read a variant's listed defaults with their property's name and leave out slots
2026-12-04 22:35:38 +07:00
Dylan M. Taylor 46631ae6ba Merge pull request #3018 from storytold/docs/freebsd-15-1-requirement
docs: document FreeBSD 15.1 minimum for prebuilt packages
2026-12-04 09:28:14 -05:00