Skip to content

studio: GSAP Design panel does not surface fromTo from-values #1121

@calcarazgre646

Description

@calcarazgre646

The GSAP tween editing panel from #1102 (behind VITE_STUDIO_ENABLE_GSAP_PANEL) renders and edits the to state of a tween, but a fromTo tween's from state is not visible or editable in the panel, even though the parser and serializer already model it end to end.

Already supported in core

  • gsapParser.ts parses fromProperties for fromTo (L502-524) and tests assert the values round-trip (gsapParser.test.ts L65-96, plus the "edits the from-vars of a fromTo in place" case).
  • applyUpdatesToCall already reconciles updates.fromProperties when call.method === "fromTo" (gsapParser.ts L702), and buildTweenStatementCode serializes the from-vars (L741).
  • The UI constants already carry METHOD_LABELS.fromTo / METHOD_TOOLTIPS.fromTo (gsapAnimationConstants.ts L7/L14).

Not wired in the panel

  • AnimationCard.tsx only reads animation.properties for both the summary (L25) and the editable rows (L235-237); fromProperties is never rendered, so the start state of a fromTo is invisible and silently un-editable.
  • ADD_METHODS = ["to", "from", "set"] (gsapAnimationConstants.ts L124) and the add mutation's method union (files.ts L550) omit fromTo, so a fromTo cannot be authored from the panel.
  • update-property / add-property / remove-property only address properties; there is no path to edit fromProperties.

Net effect: selecting an element animated with tl.fromTo(...) shows a card whose start values cannot be seen or changed.

Is surfacing the fromTo from-state already on the rollout plan for the panel, or would a follow-up PR wiring it through be welcome? The core mutation primitive is already in place, so the change would be confined to the panel (AnimationCard, the commit hooks, and the files.ts mutation types). Happy to take it if it is not already in progress.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions