penpot/frontend
Andrey Antukh 3cce47094e
♻️ Refactor font upload to process variants sequentially (#9921)
* ♻️ Refactor font upload to process variants sequentially

Change the batch upload handler so fonts are uploaded one at a time
instead of all concurrently, preventing excessive simultaneous
upload requests.

Previously `on-upload-all` used `run!` which fired all font variant
uploads simultaneously. Now it uses `rx/from` combined with
`rx/mapcat` to process each font sequentially.

As part of this change, extract the upload logic into a standalone
`handle-font-upload` helper for reuse between single and batch
upload paths, and remove the separately memoized `on-upload*` hook.

Also fix error logging to use `js/console.error` instead of
`js/console.log` for consistency with project conventions.

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

* 📎 Add code comment

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

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-05-28 15:51:46 +02:00
..
2026-01-22 13:55:41 +01:00
2026-04-28 10:21:56 +02:00
2026-03-26 14:12:11 +01:00
2025-12-23 13:10:58 +01:00
2026-05-13 14:14:10 +02:00
2026-05-13 14:14:10 +02:00
2026-02-10 08:29:24 +01:00
2025-11-05 17:15:19 +01:00