Remove serialization from Table<T> and make TaggedValue only store tooling/widget node inputs#4129
Merged
Remove serialization from Table<T> and make TaggedValue only store tooling/widget node inputs#4129
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the TaggedValue enum and its associated serialization/deserialization logic to move away from storing large, type-erased Table<T> structures in favor of more compact, type-specific variants. It introduces TypeDefault to handle default values for types where the specific variant has been removed, and implements custom migration logic for legacy document formats. I have identified a potential infinite recursion issue in the to_dynany and to_any methods regarding TypeDefault handling, which should be refactored into a shared helper function.
…peDefault on load Documents written before the TypeDefault mechanism existed have empty Table<Vector>/<Raster>/<Graphic>/<Artboard> values baked into every unwired exposed input. Walk each migrated node's inputs and rewrite any such placeholder NodeInput::Value into the equivalent NodeInput::type_default, so re-saved documents shed the placeholder payloads. Marked with a TODO for eventual removal once enough documents have been re-saved.
…ent(GradientStops)
…hStrokes(Vec<BrushStroke>)
c88455d to
f759669
Compare
Member
Author
|
22.92 MB -> 22.24 MB Wasm bundle size, nice! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Split commit by commit.
Partly closes #3779.