mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
📚 Update the memories for the second simplify pass
- common/core: the variant logic namespaces now build transform into a variant, combine as variants and the layers-panel rename of a member, and the sync walk is two plain functions whose change pairs go through pcb/add-changes. - frontend/composable-component-tests: renaming a member in the layers panel, removing empty properties and setting a member's error are variant property edits both runners run; case AW joins the JVM set. AI-assisted-by: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0fcb3ad27a
commit
129faa51c6
@ -7,7 +7,7 @@
|
||||
- `app.common.data` and `app.common.data.macros`: generic data helpers and performance macros that do not depend on Penpot domain entities.
|
||||
- `app.common.types.*`: shared shape/file/page/component/token data types, schemas, predicates, and entity-local operations. `app.common.types.organization` contains organization schemas, `apply-organization`, and fail-closed organization/team permission rules (`allowed?`, `can-send-invitations?`).
|
||||
- `app.common.files.*`: file-level operations, shape tree helpers, change application, migrations, validation, and undo/redo-related logic.
|
||||
- `app.common.logic.*`: higher-level workflows/algorithms over files, shapes, components, variants, libraries, tokens, etc. Component logic: `libraries` (`cll`, sync, reset, update main, attribute and placement sync), `instances` (`cli`, create, instantiate, restore, detach), `swap` (`clsw`, swap and the switch's override carry), `duplicate` (`cld`), `library-assets` (`clla`, color and typography sync); `variants` (`clv`) drives the switch. Each may require `libraries`, never the reverse.
|
||||
- `app.common.logic.*`: higher-level workflows/algorithms over files, shapes, components, variants, libraries, tokens, etc. Component logic: `libraries` (`cll`, sync, reset, update main, attribute and placement sync), `instances` (`cli`, create, instantiate, restore, detach), `swap` (`clsw`, swap and the switch's override carry), `duplicate` (`cld`), `library-assets` (`clla`, color and typography sync); `variants` (`clv`) drives the switch and builds transform into a variant and combine as variants; `variant-properties` (`clvp`) the property edits and the layers-panel rename of a member. Each may require `libraries`, never the reverse. The sync walk is two plain functions in `libraries` (`sync-copy-recursive`, `update-main-recursive`); sync change pairs go through `pcb/add-changes`.
|
||||
- `app.common.geom.*`: geometry helpers and transformations.
|
||||
- `app.common.schema` / `app.common.schema.*`: Malli abstraction layer.
|
||||
- `app.common.math`, `app.common.time`, `app.common.uuid`, `app.common.json`, etc.: cross-runtime utilities.
|
||||
|
||||
@ -77,7 +77,7 @@ Layout:
|
||||
`frontend_tests/runner.cljs`).
|
||||
- JVM/JS: `common-tests.logic.composable-sync-test` runs the shared cases through the pure
|
||||
runner; all except those that need frontend code: N, Z, AI and the rotation case (placement
|
||||
step), X (pending sync), AJ (reflow), AT..AX (variant action events).
|
||||
step), X (pending sync), AJ (reflow), AT, AU, AV, AX (variant action events).
|
||||
|
||||
Judging (both runners): each variant is judged before the next one runs (`r/run-each`, and the
|
||||
interpreter's `check`), while the label map still names its shapes; a variant whose inline
|
||||
@ -184,9 +184,14 @@ Two pure runners (no store, JVM + CLJS):
|
||||
`n/add-variant set member` duplicates a member (`clv/generate-add-new-variant`; `dwv/add-new-variant`,
|
||||
whose delayed DOM focus `check` neutralises by stubbing `dom/get-element`); ask the node for the
|
||||
new component (`n/added-variant-component-id`).
|
||||
`n/rename-variant-in-layers` (the layers panel's rename to a properties formula, which also
|
||||
removes the empty properties; `clvp/generate-rename-member`, `dw/rename-shape-or-variant`),
|
||||
`n/remove-empty-properties` and `n/set-variant-error` are edits of `EditVariantProperty` too.
|
||||
Frontend-only variant actions are one node, `n/VariantAction` (`n/transform-in-variant`,
|
||||
`combine-as-variants`, `rename-variant`, `rename-variant-in-layers`, `remove-empty-properties`,
|
||||
`set-variant-error`, `variant-shortcut`); the interpreter's `variant-action-events` sends them.
|
||||
`combine-as-variants`, `rename-variant`, `variant-shortcut`); the interpreter's
|
||||
`variant-action-events` sends them. Transform and combine have common generators
|
||||
(`clv/generate-transform-in-variant`, `generate-combine-as-variants`), but the pure runner does
|
||||
not reflow layouts or apply the modifiers that size a combined board, so they stay frontend only.
|
||||
A set they build has no `variant-set` record: read it with `n/component-of` and
|
||||
`n/variant-component-ids`; `switch-variant` takes the value as a fn for it.
|
||||
- Tokens: `n/add-tokens` (assembly: an active set of border radius tokens), `n/apply-token`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user