22251 Commits

Author SHA1 Message Date
Andrés Moya
1f35f57258
🐛 Fix DTCG token import discriminator and group-level $type inheritance (#9912)
* 🐛 Fix DTCG token import discriminator and group-level $type inheritance

Closes #8342.

The DTCG Community Group Final Report (W3C, 2025-10-28) specifies:

  "The presence of a $value property definitively identifies an object
   as a token."

  "A token's type can be specified by the optional $type property [...]
   Furthermore, the $type property on a group applies to all tokens
   nested within that group."

Two bugs in `common/src/app/common/types/tokens_lib.cljc` violate the
spec and silently break import of any third-party DTCG file that uses
group-level type inheritance:

1. `flatten-nested-tokens-json` used `(not (contains? v "$type"))` as
   the group-vs-token discriminator. A group node carrying only a
   `$type` (to set a default for child tokens) was misidentified as a
   token, then immediately discarded because it had no `$value`.

2. `schema:dtcg-node` declared both `$type` and `$value` as required,
   so even after the discriminator was fixed any leaf token that
   relied on group-level type inheritance failed `dtcg-node?`
   validation and never reached the parser.

The combined effect: importing a spec-compliant DTCG file that
expressed types at the group level produced a TokensLib with no
tokens at all, because every leaf was discarded as "unknown type".

Penpot-exported files were unaffected because Penpot always emits
both `$type` and `$value` on every token and never attaches `$type`
to a group, so the existing tests covered only the inline-type
shape.

- `schema:dtcg-node`: mark `$type` optional.
- `flatten-nested-tokens-json`: use `$value` as the discriminator
  (anything without `$value` is a group), accept an optional
  `inherited-type` accumulator that carries the nearest enclosing
  group `$type` down through recursion, and resolve a token's type
  from its own `$type` first, falling back to the inherited type.
  A token's own `$type` always wins over the inherited one (per
  spec).

Added `parse-dtcg-group-type-inheritance` covering both cases:
- group `$type` is inherited by tokens that don't declare their own
  (`colors.red`, `colors.blue`, `space.small`)
- token `$type` overrides the inherited group `$type`
  (`colors.danger`, `space.large`)

Existing DTCG round-trip tests continue to pass because they all
declare `$type` at the token level, which the new code still honours.

CHANGES.md entry added under the 2.17.0 Bugs-fixed section.

* 📚 Do not update CHANGES.md

We are changing the procedures to not update the changelog on each PR. Instead, we use github tracking to check what issues come in a release, and update the changelog automatically in a batch.

Signed-off-by: Andrés Moya <hirunatan@hammo.org>

---------

Signed-off-by: Andrés Moya <hirunatan@hammo.org>
Co-authored-by: MilosM348 <milos.milic001@outlook.com>
2026-05-28 11:01:11 +02:00
Juanfran
4c8b33691a Use shared org-avatar component in delete account modal
Render owned organizations in the delete-account modal with the same
org-avatar* component used across the dashboard, so logo and avatar
background are shown consistently and initials are extracted via
d/get-initials instead of a raw first-character substring.

Extends the get-owned-organizations-summary endpoint and the underlying
nitrate API schema to carry :avatar-bg-url and :logo-id, deriving
:custom-photo from logo-id with the public uri, matching the pattern
already used by set-team-org-api.
2026-05-28 11:01:08 +02:00
María Valderrama
dd7d5bb113 🐛 Fix nitrate's plan button size 2026-05-28 10:23:06 +02:00
Juanfran
5c5ee73f2d
🐛 Fix createToken calls missing textFieldType argument 2026-05-28 09:36:33 +02:00
Andrey Antukh
8430358621 Merge remote-tracking branch 'origin/staging' into develop 2026-05-27 17:46:44 +02:00
Andrey Antukh
bee1a89698 Add minor usability improvements to update-changelog skill 2026-05-27 17:44:50 +02:00
Andrey Antukh
50ec6ad777 📚 Add missing entries on changelog 2026-05-27 16:11:14 +02:00
Andrey Antukh
3ba70337ea 📎 Update changelog 2026-05-27 15:37:46 +02:00
María Valderrama
1a0e497c84 Remove nitrate's yearly plan 2026-05-27 15:07:22 +02:00
Belén Albeza
0dd40776f8
🐛 Fix default path stroke thickness 2026-05-27 14:47:11 +02:00
Alonso Torres
0fe59cac94
🐛 Fix problem with fill/stroke proxy properties (#9647) 2026-05-27 14:05:28 +02:00
girafic
763ec4c4fe
📎 Update changelog for #8632 (#9701)
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-05-27 13:50:33 +02:00
Eva Marco
7d76a1caa3
🐛 Fix settings dropdown (#9883) 2026-05-27 13:44:06 +02:00
Eva Marco
16d0ee99c1
♻️ Update copy on context menu (#9888) 2026-05-27 13:43:31 +02:00
Andrey Antukh
1a1c7355e2 Merge remote-tracking branch 'refs/remotes/origin/develop' into develop 2026-05-27 13:37:17 +02:00
Andrey Antukh
3858993a57 Merge remote-tracking branch 'origin/staging' into develop 2026-05-27 13:37:02 +02:00
María Valderrama
15d6df48f5 🐛 Fix default team showing up in count 2026-05-27 13:36:35 +02:00
Eva Marco
5ffec3e5e9
🐛 Fix shadow token creation 2026-05-27 13:06:47 +02:00
Andrey Antukh
95e7edc9d2 📚 Update changelog 2026-05-27 12:51:26 +02:00
Andrey Antukh
243798f458 Add improvements to 'update-changelog' skill 2026-05-27 12:51:26 +02:00
Andrey Antukh
40ce360c99
Improve performance and fix orphan detection in validate-file (#9789)
*  Improve performance and fix orphan detection in validate-file

- Add `*ref-shape-cache*` dynamic var to memoize `find-ref-shape`
  lookups per page, avoiding repeated O(depth) ancestor walks.
- Add `*children-sets*` pre-computed maps for O(1) parent-child
  containment checks, replacing linear `some` scans.
- Short-circuit `inside-component-main?` when the shape context
  already implies a main component.
- Use single-pass reduce with early exit for duplicate detection
  (children, swap slots) instead of count/distinct or frequencies.
- Guard `check-missing-slot` to skip expensive `find-near-match`
  when the shape already has a swap slot.
- Refactor variant-set validation to use `run!` with direct `get`.
- Refactor `check-ref-cycles` to use a single `reduce-kv` pass.
- Fix `get-orphan-shapes`: the original `map` pipeline produced
  nils so orphan shapes were never validated; rewrite with
  `reduce-kv` for correct results.
- Add `validate-file-affected!` for change-scoped validation,
  replacing full file validation in `process-changes-and-validate`
  to only validate pages and components touched by the changes.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>

*  Improved validation

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
2026-05-27 12:36:21 +02:00
Alejandro Alonso
30bba7cd38
🎉 Increase viewport interest area threshold (#9885) 2026-05-27 11:47:40 +02:00
Andrey Antukh
57397bc32a Merge remote-tracking branch 'origin/main' into staging 2026-05-27 11:35:47 +02:00
Andrey Antukh
676e7f8646 🔧 Update devenv postgresql config 2026-05-27 11:35:21 +02:00
Andrey Antukh
f6c76711f4 Merge remote-tracking branch 'origin/main' into staging 2026-05-27 11:34:59 +02:00
Pablo Alba
3cecc29276 🐛 Fix update library dialog when a component position changes
Do not show the library sync popup when the only differences are global x/y changes on library components. We now generate the actual sync changes and only notify if there are real redo-changes to apply.
Run cll/generate-sync-file-changes for candidate libraries and filter out those with empty :redo-changes. The expensive check is deferred via rx/timer 0 so it runs asynchronously and does not block the UI.
Why: Position-only changes are normalized during sync (via reposition-shape) and never propagate to copies; showing the popup in that case was a false positive.
Performance: The check is deferred to the next tick to avoid UI stutter on large files with many libraries.
2026-05-27 11:22:57 +02:00
Andrey Antukh
e43703c368 📎 Update root dependencies 2.15.4-RC3 2026-05-27 10:57:06 +02:00
Dexterity
56d8dc678c
🐛 Populate is-indirect flag on file libraries from relation graph (#9289)
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-05-27 09:23:48 +02:00
Alejandro Alonso
1025d2e756
🐛 Fix WASM context-restore background reapplication (#9880) 2026-05-27 09:16:02 +02:00
Pablo Alba
c9d43006c8 🐛 Fix restore saved version keeps view-only (#9514)
* 🐛 Fix restore saved verrsion keeps view-only

* 📎 Remove outdated note from CHANGES.md

Remove note about restoring saved version from Preview mode.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-05-27 09:09:32 +02:00
Andrey Antukh
110db4380e 🐛 Fix invitation token propagation in login flow
Pass invitation-token through login-from-token event so it reaches
the logged-in state. Fix component render syntax (:& -> :>) for the
verify-token route. Remove redundant navigation that re-visited
verify-token after login. Fix missing dependency in effect hook
to re-run when token changes.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-05-26 19:03:47 +02:00
Andrés Moya
7a8fa7a9cb
🐛 Token remap preserves child component sync after renaming a token group (#9566) (#9878) 2026-05-26 17:12:03 +02:00
Eva Marco
310f224ab6
🐛 Fix keep copy untranslated to preserve token name validation (#9877) 2026-05-26 16:26:13 +02:00
Eva Marco
0c568b0b2d
🐛 Fix highlight on token pill (#9829) 2026-05-26 16:25:18 +02:00
Eva Marco
0eb8cabd39
🐛 Fix text color on tooltip (#9851) 2026-05-26 16:13:58 +02:00
Renzo
02ab41f420
🐛 Token remap preserves child component sync after renaming a token group (#9566)
* 🐛 Token remap preserves child component sync after renaming a token group

* 📚 Do not update CHANGES.md

We are changing the procedures to not update the changelog on each PR. Instead, we use github tracking to check what issues come in a release, and update the changelog automatically in a batch.

Signed-off-by: Andrés Moya <andres.moya@kaleidos.net>

---------

Signed-off-by: Andrés Moya <andres.moya@kaleidos.net>
Co-authored-by: Andrés Moya <andres.moya@kaleidos.net>
2026-05-26 15:46:53 +02:00
Alonso Torres
b609a964be
🐛 Fix boolean issues on the wasm render
* 🐛 Fix sharp angles in text-to-path due to wrong quad/conic degree elevation

* 🐛 Preserve even-odd fill type through Skia path conversions

* 🐛 Fix wrong quadratic-to-cubic degree elevation in push_bezier

* 🐛 Skip zero-length degenerate close segments in path_to_beziers

* 🐛 Replace BTreeMap for Vec for bool calculation

* 🐛 Fix even_odd missing when creating Path
2026-05-26 15:11:52 +02:00
David Barragán Merino
f1c78945c4 🐳 Start penpot-frontend always after penpot-mcp 2026-05-26 13:55:27 +02:00
María Valderrama
04d4abc766 📎 Code review 2026-05-26 13:34:19 +02:00
María Valderrama
8542d44aaa 🐛 Fix nitrate remove-team permission flow 2026-05-26 13:34:19 +02:00
Pablo Alba
a637dda554 Check nitrate permission only org members for move teams 2026-05-26 13:25:20 +02:00
Elena Torró
75c61f9211
🐛 Fix stroke rendering on drag (#9871) 2026-05-26 13:14:38 +02:00
Juanfran
5c93ad0ab3 🐛 Fix delete account modal copy for users with organizations 2026-05-26 12:43:50 +02:00
Belén Albeza
34f30e38aa
🐛 Fix migrations throwing exception on corrupted file (#9868) 2026-05-26 12:07:22 +02:00
Aitor Moreno
eb095169b8
Merge pull request #9814 from penpot/hiru-fix-detach-token-typ
🐛 Fix changed font size when editing a text with no changes
2026-05-26 11:42:30 +02:00
Eva Marco
10074bc700
🎉 Add combobox test (#9864) 2026-05-26 10:52:09 +02:00
Alonso Torres
5a3a855b24
🐛 Fix problem with position-data not present
* 🐛 Fix problem with position-data not present

* 🐛 Async set-objects wait before calculate-position-data
2026-05-26 09:50:23 +02:00
alonso.torres
eafd261ca6 🐛 Add a e2e test for undo after renaming 2026-05-26 09:46:18 +02:00
alonso.torres
63886d097b 🐛 Fix problem with undo rename tokens 2026-05-26 09:46:18 +02:00
Eva Marco
9439d63682
🐛 Fix rename on non empty page (#9850) 2026-05-26 08:58:09 +02:00