mirror of
https://github.com/penpot/penpot.git
synced 2026-11-26 21:00:32 +00:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
805b648265
@ -23,7 +23,10 @@ stop — this skill needs the build agent to save the plan.
|
||||
in place. Once the plan has been implemented and reviewed (post
|
||||
`@review-code` findings on committed work), write a new derived plan
|
||||
file instead — never rewrite the executed plan. The `planner` skill
|
||||
defines the derived naming (`--review-NN`, `--task-NN`).
|
||||
defines the derived naming (`--review-NN`, `--task-NN`). For another
|
||||
review round on the same implemented work, create the next `--review-NN`
|
||||
sibling from the original plan; never append another review suffix to a
|
||||
review-derived plan.
|
||||
- The user says to apply additional review feedback to a still-unimplemented
|
||||
plan: apply the agreed changes, flip `Status` to `reviewed`, and append one
|
||||
UTC ISO 8601 line to `Review Log`. `review-plan` can also update the plan
|
||||
|
||||
@ -171,16 +171,20 @@ Valid names match:
|
||||
```
|
||||
|
||||
- `review-NN` — a new plan addressing findings of a `review-code` or
|
||||
`review-plan` on already-implemented work. `NN` counts reviews of
|
||||
that parent from `01`. Example: parent
|
||||
`review-plan` on already-implemented work. `NN` counts review rounds of
|
||||
the same implemented work from `01`. Every round is a sibling derived
|
||||
from the original plan, never from a `--review-NN` plan. Example:
|
||||
`2026-09-14-paste-before-init-crash.md` →
|
||||
`2026-09-14-paste-before-init-crash--review-01.md`,
|
||||
then `--review-02.md`.
|
||||
then `2026-09-14-paste-before-init-crash--review-02.md`, not
|
||||
`...--review-01--review-01.md`.
|
||||
- `task-NN-<short-slug>` — sub-plan for task `NN` of a high-level
|
||||
roadmap plan. `NN` is the roadmap task number. Example: parent
|
||||
`2026-09-20-upload-pipeline-roadmap.md` →
|
||||
`2026-09-20-upload-pipeline-roadmap--task-01-chunk-upload.md`.
|
||||
Levels chain: `...--task-02-gc--review-01.md`.
|
||||
Task plans may have a review suffix: `...--task-02-gc--review-01.md`.
|
||||
Further review rounds remain siblings of that first review plan:
|
||||
`...--task-02-gc--review-02.md`.
|
||||
|
||||
Never use `v2`, `final`, `new`, or `fix2` as suffixes. Keep the
|
||||
optional short slug to 3-4 lowercase hyphen-separated words.
|
||||
|
||||
@ -53,6 +53,17 @@ Act as a senior software engineer and perform a thorough code review.
|
||||
- **Stop:** end the review without edits. Any direct correction belongs to
|
||||
a separate task after the review.
|
||||
|
||||
### Do not review a review
|
||||
|
||||
Review code changes, not a review report, findings, or a plan derived from
|
||||
findings. To verify corrections, follow the procedure below and resume the
|
||||
original reviewer against the corrected code and the original findings. If the
|
||||
original reviewer cannot be resumed, delegate verification of those corrections
|
||||
with the original review context; do not start a fresh review of the review
|
||||
report. If the user requests another review round after fixes, review the new
|
||||
code changes and keep any resulting plan as the next sibling review round of
|
||||
the original plan, not as a child of the previous review plan.
|
||||
|
||||
### Follow-up after implementation
|
||||
|
||||
When the user agrees to verify corrections, resume the original reviewer using
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns app.health
|
||||
"Instance availability state.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns app.jobs
|
||||
"Public API for the unified jobs substrate.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns app.jobs.gc
|
||||
"A maintenance cron task for the unified `job` table:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns app.loggers.metrics
|
||||
"A reporter that counts the log records of this application, by logger and
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns app.rpc.management.jobs
|
||||
"Generic job management API for external workers (media and future
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns app.scripts.decode-file-data
|
||||
"Decode a file's `file_data` binary blob to `jq`-readable JSON.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.auth-login-lockout-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.binfile-svg-test
|
||||
"SVG sanitization on the binfile import path.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.climit-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.fdata-resolve-test
|
||||
"Resolution of file data by backend (`app.features.fdata/resolve-file-data`).
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.file-change-retention-test
|
||||
"Retention of `file_change` rows through the file lifecycle.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.file-change-schema-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.file-data-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.file-gc-scheduler-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.file-migration-read-test
|
||||
"Persisting the migrations applied on read is an optimization of the read:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.files-update-validation-timing-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.health-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.http-websocket-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.import-terminal-rpc-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.jobs-gc-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.jobs-request-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.jobs-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.loggers-metrics-test
|
||||
"The reporter that turns log records into a counter."
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.media-validation-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.migrations-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.objects-gc-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.redis-test
|
||||
"The redis wrapper swallows a command timeout and returns nil, so the log
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.restore-storage-objects-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.rpc-auth-override-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.rpc-climit-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.rpc-file-security-test
|
||||
"Tests for the nexus file-security backend prerequisite: the
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.rpc-management-jobs-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.rpc-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.scripts-decode-file-data-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.srepl-main-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.storage-gc-deleted-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.worker-cron-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.worker-dispatcher-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.worker-runner-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns backend-tests.worker-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns common-tests.logging-test
|
||||
(:require
|
||||
|
||||
109
frontend/playwright/ui/specs/typography.spec.js
Normal file
109
frontend/playwright/ui/specs/typography.spec.js
Normal file
@ -0,0 +1,109 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { WasmWorkspacePage } from "../pages/WasmWorkspacePage";
|
||||
|
||||
// workspace/multiselection-typography.json: "Text with no typography" is a
|
||||
// fixed 14px Rufina text, and the local library has the typographies
|
||||
// "typography one" (Agdasima) and "typography 2" (IM Fell French Canon SC).
|
||||
const FILE = {
|
||||
id: "c7ce0794-0992-8105-8004-38f280443849",
|
||||
pageId: "1062e0a0-8fe0-80ae-8007-e70b4993f5f0",
|
||||
};
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await WasmWorkspacePage.init(page);
|
||||
});
|
||||
|
||||
async function setupTypographyFile(page) {
|
||||
const workspace = new WasmWorkspacePage(page);
|
||||
await workspace.setupEmptyFile();
|
||||
await workspace.mockRPC(
|
||||
/get\-file\?/,
|
||||
"workspace/multiselection-typography.json",
|
||||
);
|
||||
await workspace.mockGoogleFont("rufina", "render-wasm/assets/ebgaramond.ttf");
|
||||
await workspace.mockGoogleFont(
|
||||
"agdasima",
|
||||
"render-wasm/assets/ebgaramond.ttf",
|
||||
);
|
||||
await workspace.mockGoogleFont(
|
||||
"im-fell-french-canon-sc",
|
||||
"render-wasm/assets/ebgaramond.ttf",
|
||||
);
|
||||
await workspace.goToWorkspace({ fileId: FILE.id, pageId: FILE.pageId });
|
||||
await workspace.waitForFirstRender();
|
||||
return workspace;
|
||||
}
|
||||
|
||||
function measureInput(workspace, name) {
|
||||
return workspace.rightSidebar
|
||||
.getByRole("region", { name: "shape-measures-section" })
|
||||
.getByRole("textbox", { name, exact: true });
|
||||
}
|
||||
|
||||
// Selects "Text with no typography", switches it to auto-width and returns
|
||||
// the Width input with the auto-width value.
|
||||
async function setupAutoWidthText(workspace) {
|
||||
// Exact match: "Text with no typography two" also exists and comes first.
|
||||
await workspace.layers
|
||||
.getByText("Text with no typography", { exact: true })
|
||||
.click();
|
||||
const widthInput = measureInput(workspace, "Width");
|
||||
const fixedWidth = await widthInput.inputValue();
|
||||
|
||||
await workspace.rightSidebar
|
||||
.getByRole("button", { name: "Auto width" })
|
||||
.click();
|
||||
await expect(
|
||||
workspace.rightSidebar.getByRole("button", {
|
||||
name: "Auto width",
|
||||
pressed: true,
|
||||
}),
|
||||
).toBeVisible();
|
||||
|
||||
// The resize is async: wait for the width to change, then check it shrank.
|
||||
await expect(widthInput).not.toHaveValue(fixedWidth);
|
||||
const autoWidth = await widthInput.inputValue();
|
||||
expect(Number(autoWidth)).toBeLessThan(Number(fixedWidth));
|
||||
|
||||
return { widthInput, autoWidth };
|
||||
}
|
||||
|
||||
// "typography 2" is larger (16px) than the text (14px) and uppercase, so the
|
||||
// text must grow, and one undo must revert both the typography and the size.
|
||||
async function expectGrowthAndUndo(page, widthInput, autoWidth) {
|
||||
await expect(widthInput).not.toHaveValue(autoWidth);
|
||||
expect(Number(await widthInput.inputValue())).toBeGreaterThan(
|
||||
Number(autoWidth),
|
||||
);
|
||||
|
||||
await page.keyboard.press("ControlOrMeta+z");
|
||||
await expect(widthInput).toHaveValue(autoWidth);
|
||||
}
|
||||
|
||||
test.describe("BUG 13124 - Applying a typography resizes an auto-width text", () => {
|
||||
test("from the assets panel", async ({ page }) => {
|
||||
const workspace = await setupTypographyFile(page);
|
||||
const { widthInput, autoWidth } = await setupAutoWidthText(workspace);
|
||||
|
||||
await workspace.clickAssets();
|
||||
// The Typographies group starts collapsed.
|
||||
await workspace.sidebar
|
||||
.getByRole("button", { name: /^Typographies/ })
|
||||
.click();
|
||||
await workspace.sidebar
|
||||
.getByTitle("typography 2 (IM Fell French Canon SC)")
|
||||
.click();
|
||||
|
||||
await expectGrowthAndUndo(page, widthInput, autoWidth);
|
||||
});
|
||||
|
||||
test("from the typographies palette", async ({ page }) => {
|
||||
const workspace = await setupTypographyFile(page);
|
||||
const { widthInput, autoWidth } = await setupAutoWidthText(workspace);
|
||||
|
||||
await page.getByRole("button", { name: "Typographies (Alt+T)" }).click();
|
||||
await page.getByTitle("typography 2", { exact: true }).click();
|
||||
|
||||
await expectGrowthAndUndo(page, widthInput, autoWidth);
|
||||
});
|
||||
});
|
||||
@ -1274,14 +1274,19 @@
|
||||
(assert (or (nil? ids) (and (set? ids) (every? uuid? ids))))
|
||||
(ptk/reify ::apply-typography
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(watch [_ state stream]
|
||||
(let [editor-state (:workspace-editor-state state)
|
||||
objects (dsh/lookup-page-objects state)
|
||||
ids (d/nilv ids (dsh/lookup-selected state))
|
||||
attrs (-> typography
|
||||
(assoc :typography-ref-file file-id)
|
||||
(assoc :typography-ref-id (:id typography))
|
||||
(dissoc :id :name))
|
||||
undo-id (js/Symbol)]
|
||||
auto-ids (into []
|
||||
(comp (mapcat #(resolve-text-ids objects %))
|
||||
(remove #(= :fixed (:grow-type (get objects %)))))
|
||||
ids)
|
||||
undo-id (js/Symbol)]
|
||||
|
||||
(rx/concat
|
||||
(rx/of (dwu/start-undo-transaction undo-id))
|
||||
@ -1289,6 +1294,9 @@
|
||||
(rx/map (fn [id]
|
||||
(let [editor (get editor-state id)]
|
||||
(update-text-attrs {:id id :editor editor :attrs attrs})))))
|
||||
;; WASM does not re-measure on its own; the new font may still be loading.
|
||||
(when (features/active-feature? state "render-wasm/v1")
|
||||
(await-font-resize stream auto-ids))
|
||||
(rx/of (dwu/commit-undo-transaction undo-id))))))))
|
||||
|
||||
(defn generate-typography-name
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
// Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
// Stacks the message and its links as a single item of the notification
|
||||
// pill's flex row.
|
||||
|
||||
@ -33,21 +33,11 @@
|
||||
(mf/use-callback
|
||||
(mf/deps typography selected-ids file-id current-file-id)
|
||||
(fn []
|
||||
(let [attrs (merge
|
||||
{:typography-ref-file file-id
|
||||
:typography-ref-id (:id typography)}
|
||||
(dissoc typography :id :name))]
|
||||
|
||||
(st/emit! (ev/event
|
||||
{::ev/name "use-library-typography"
|
||||
::ev/origin "text-palette"
|
||||
:external-library (not= file-id current-file-id)}))
|
||||
(run! #(st/emit!
|
||||
(dwt/update-text-attrs
|
||||
{:id %
|
||||
:editor (get @refs/workspace-editor-state %)
|
||||
:attrs attrs}))
|
||||
selected-ids))))]
|
||||
(st/emit! (ev/event
|
||||
{::ev/name "use-library-typography"
|
||||
::ev/origin "text-palette"
|
||||
:external-library (not= file-id current-file-id)})
|
||||
(dwt/apply-typography (into #{} selected-ids) typography file-id))))]
|
||||
[:div {:on-click handle-click
|
||||
:class (stl/css-case :typography-item true
|
||||
:mid-item (<= size 72)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns app.main.ui.workspace.tokens.tokens-source
|
||||
(:require-macros [app.main.style :as stl])
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
// Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
@use "ds/typography.scss" as *;
|
||||
@use "ds/_sizes" as *;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns frontend-tests.data.fix-deleted-fonts-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns frontend-tests.data.persistence-retry-test
|
||||
"Retry-episode tests for the file persistence save pipeline
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns frontend-tests.data.workspace-context-menu-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns frontend-tests.debug-logging-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns frontend-tests.errors-governor-test
|
||||
"Unit tests for the error report governor (`app.main.errors`).
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns frontend-tests.plugins.creation-parent-test
|
||||
(:require
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC Sucursal en España SL
|
||||
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
||||
|
||||
(ns frontend-tests.plugins.events-test
|
||||
"Unit tests for app.plugins.events, the plugin state-change listeners."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user