Test the v2 Affinity export scripts end to end, then retire the old library entries #205
Labels
No labels
build-dist
priority
P1
priority
P2
priority
P3
priority
P4
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Toilville/toilville-design#205
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Affinity export scripts now end with a hand-off panel instead of trying to submit anything themselves (#201). Affinity's scripting can't send data to Forgejo, so the panel lists the browser steps: upload the file, open a PR, add the
assets.ymlentry, add thebuild-distlabel. No tokens are involved.The updated scripts are in the Affinity script library as
export-icon v2andexport-plate v2. The library can't overwrite or delete entries from a script, so the oldexport-iconandexport-plateare still there next to them.export-doc-masterwas new, so it has no "v2".What to do
Panel test, in a scratch document. Run each of
export-icon v2,export-plate v2andexport-doc-master:Brand/source/icons/…,…/plates/…,…/documents/…);assets.ymlstep shows the entry to paste, or says it's already listed.One real browser hand-off, end to end. Use an existing asset or a throwaway shape. No new brand art, and no test icons or plates committed to
main. Follow the panel's steps exactly:asset/<id>with commit messageAdd <id>;build-dist.Check that the bot builds
dist/. Then close the PR without merging and delete the branch.Clean up the library. Once 1 and 2 pass, delete the old
export-iconandexport-plateby hand in Affinity.Report back anything the panel got wrong. Fixes go in the repo files under
Brand/source/_editor/affinity-scripts/; the repo is the source of truth and the library is only a local copy.Done when
Wish:
76894aa6. Related: #201 (the hand-off scripts).Test report for #205.
Results
Finding: export-icon exports the whole document, not the artwork bounds
Setup
@peterswimm
Status (2026-10-20): the panels and the end-to-end hand-off passed in ville's test report. Test PR #216 was closed unmerged, and its branch was deleted.
Two items left before this closes:
export-iconexports the whole A4 document (the test icon was 2481×3508), not the artwork bounds. The committed icons use tight viewBoxes, e.g. 562×467.Brand/source/_editor/affinity-scripts/to export the artwork bounds or selection.export-icon/export-platelibrary entries. ville's library had none, so I'll check mine and delete them there.Item 1 is up: #221.
export-iconnow exports the artwork's bounds, viaFileExportArea.createForSelectionover every layer.@ville, could you run
export-icononce on a small shape in an A4 document and confirm the SVG's viewBox fits the shape? The script can't run outside Affinity, so that's the one step the tests can't cover.Item 2 (the old library entries) is still mine to check.
Static pre-check of the three scripts against step 1, from the repo copies (
Brand/source/_editor/affinity-scripts/, which step 4 names as the source of truth). This does not replace the panel test — it is the part that can be checked without Affinity, so the manual pass can skip what is already known good and look hard at the one thing that is not.Checks that pass
dlg.initialWidth = 720(export-icon.js:161,export-plate.js:161,export-doc-master.js:166).assets.ymlstep appears_edit/<branch>/udg/config/assets.ymllink.export-icontarget foldersDIRS = { icon: 'icons', infographic: 'infographics', wireframe: 'wireframes' }(:179). All three exist underBrand/source/.1. This issue's step 1 names a folder that does not exist
Step 1 says the upload link should point at "
Brand/source/icons/…,…/plates/…,…/documents/…".There is no
Brand/source/plates/.export-platetargetsBrand/source/components/<folder>/—export-plate.js:201, and its own header comment at:4says so deliberately.Brand/source/components/exists and holds twelve entries.So the script is right and the acceptance criterion is stale. Worth correcting before the manual pass, because someone following step 1 literally will either record a false failure or, worse, "fix"
export-plateto write into a directory that has never existed.2.
export-doc-masteris the one to watch in step 2export-doc-masterwrites toBrand/source/documents/<role>/(:226), andBrand/source/documents/does not exist in the repo. The script creates it locally —FileSystemApi.createDirectories(...)at:229— so the local export will succeed and look fine.The hand-off is the untested half. The panel builds
…/_upload/main/<dir>from the file's own path (:149), so for this script it links at a directory with nothing in it. Forgejo's_uploadnormally creates intermediate directories on commit, so this probably works — but it has never been run, and it is the only one of the three pointing somewhere that does not yet exist.Worth noting this is not drift: the doc templates from #198/#199 landed as
dist/<brand>/invoice.odt, so nothing has ever populated aBrand/source/documents/tree.export-doc-masterwould be the first thing to create it.Suggestion: run step 2's single end-to-end hand-off with
export-doc-masterrather than with an icon. It is the only one whose upload path is unproven, and the other two point at directories that already hold assets.