Validate SVG import (icon and illustration) against the live instance #211
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills#211
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?
Summary
Validate the SVG import path against the live instance with two real inputs — an icon and a small illustration — confirming the result is an editable shape tree, that matching colours resolve to library assets, and that unsupported nodes land as
svg-rawrather than disappearing.Background
Depends on: #210
The converter is deliberately a bounded subset with an explicit fallback, so this gate is about verifying the promises the tool makes rather than achieving high fidelity: no silent drops, honest reporting, and editable output. Fidelity gaps are expected and must be documented so the skill can tell a user what to expect.
The two inputs exercise different parts of the converter: an icon typically uses
pathwith curves and a single fill (stressing path conversion and colour matching), while a small illustration brings multiple nodes, groups, transforms and probably at least one unsupported feature (stressing the fallback path and the report).Prefer inputs from a real project where available; otherwise generate a small illustration that deliberately includes a gradient, a filter or a mask so the fallback is exercised rather than assumed.
Documentation Required
A separate process downloads these into the listed folders before this issue is implemented. Check the folders for the actual reference material before starting.
docs/reference/svg/docs/reference/penpot-api/svg-rawfields, for interpreting the imported object in the file data.docs/reference/librsvg/rsvg-convert(1)manual: used only to render the source SVG to PNG so the imported result can be compared visually. It is a validation aid, not part of the extension.Implementation Details
pathor a couple ofrect/circlenodes) into a scratch file with the library colours present:id/nameattributes;rsvg-convertand compare side by side);ggroup and at least one deliberately unsupported feature (gradient fill, filter or mask):svg-rawobjects that are visible on the canvas;translate/scaleand confirm the result's position/size matches the source; import one usingrotateand confirm the node is reported as unsupported rather than silently misplaced.revnunchanged.Record in
extensions/penpot/findings.mdunder "SVG import": the two fixtures used (with their commands/elements), the converted-vs-fallback breakdown per fixture, the UI observations, a plain statement of the fidelity limits discovered, and any case where the output was wrong rather than merely approximate.Acceptance Criteria
id/name-derived layer names, visually matching the source.svg-rawobjects — nothing is missing from the canvas.translate/scaleare applied correctly; arotatenode is reported unsupported rather than silently misplaced.extensions/penpot/findings.mdrecords both fixtures, the converted/fallback breakdown, the visual comparison, and the fidelity limits stated plainly.Test Plan
Manual, against the live instance:
Rendering the source for comparison:
Then in the Penpot UI:
svg-rawobjects; confirm the fallback objects are visible and named.pi-loop opened and merged a pull request for this issue: #244