feat(studio): Timing inspector section + fix mixed-content text editing#893
Closed
miguel-heygen wants to merge 2 commits into
Closed
feat(studio): Timing inspector section + fix mixed-content text editing#893miguel-heygen wants to merge 2 commits into
miguel-heygen wants to merge 2 commits into
Conversation
Adds Start, End, and Duration fields to the Design panel when the selected element has data-start/data-duration attributes. Editing any field commits via the attribute patch pipeline (same as timeline edits) and refreshes the preview. End is computed from start+duration and writing End adjusts duration accordingly.
collectDomEditTextFields only captured child HTML elements, ignoring bare text nodes. For elements like: <div class="headline">If you're <span>turning 65</span> soon...</div> only the <span> was collected as a text field. When commitDomTextFields serialized back, "If you're " and " soon..." were lost. Now walks childNodes and creates text-node fields for bare text nodes alongside child element fields. serializeDomEditTextFields emits bare text for text-node fields, preserving the complete mixed content.
Collaborator
Author
|
Moving to Graphite stack |
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.
Summary
Stacked on #892.
data-start/data-durationattributes. Editing End adjusts duration accordingly. Uses the attribute patch pipeline.collectDomEditTextFieldsnow captures bare text nodes alongside child elements. Previously, selecting an element likeIf you're <span>turning 65</span> soon...and changing the font destroyed the surrounding text because only the<span>was serialized. Now all text nodes are preserved during serialization.Test plan
.headlinewith mixed content, change font — full text preserved