There are already related attempts in #387, #388, and #389. Compared with those branches, this version also fixes the runtime issues that blocked a clean handoff:
fixes unbound createInstance behavior for nested SVG elements
removes the private @nodegui/nodegui/dist/... dependency
adds SVG-specific text update handling in the reconciler
fixes reorder semantics so moved SVG children are not duplicated
codifies acceptance coverage in-repo instead of relying only on ad hoc smoke commands
Verification
Ran locally:
npm run build
npm run verify:svg
npm run verify:svg covers:
root import smoke
README helper shapes
lowercase rect
SvgText
content / buffer / src
adjacent text serialization
mixed tspan serialization
mixed text update after mount
reorder / move behavior
Notes
SVG text should use SvgText rather than the existing host Text component.
Verification is now repo-local and repeatable, though it is still an acceptance harness rather than a full unit/integration test suite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds SVG component support to react-nodegui using QSvgWidget, and includes the runtime fixes needed to make the feature work reliably.
It covers:
Fixes #31.
Why this PR
There are already related attempts in #387, #388, and #389. Compared with those branches, this version also fixes the runtime issues that blocked a clean handoff:
Verification
Ran locally:
npm run verify:svg covers:
Notes