Skip to content

remotion-monorepo: Preserve computed styles from object spreads - #9462

Merged
JonnyBurger merged 4 commits into
mainfrom
codex/preserve-interactive-spread-values
Jul 22, 2026
Merged

remotion-monorepo: Preserve computed styles from object spreads#9462
JonnyBurger merged 4 commits into
mainfrom
codex/preserve-interactive-spread-values

Conversation

@JonnyBurger

@JonnyBurger JonnyBurger commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve runtime values for nested style properties that may come from object spreads
  • keep properties declared after a spread statically editable
  • document computed-value behavior in the interactivity best practices and public skill

Test plan

  • bun test packages/studio-server/src/test/compute-sequence-props-status.test.ts
  • bun run build
  • bun run stylecheck

Closes #9450

Preview

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Building Building Preview, Comment Jul 22, 2026 2:36pm
remotion Ready Ready Preview, Comment Jul 22, 2026 2:36pm

Request Review

…ctive-spread-values

# Conflicts:
#	packages/studio-server/src/preview-server/routes/can-update-sequence-props.ts

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — The PR makes Studio's nested-prop editor treat object-spread-derived values as computed, preserving their runtime values while still allowing explicitly declared post-spread properties to be edited statically.

  • getNestedPropStatus now scans object properties from right to left and bails to computedStatus() as soon as it hits a SpreadElement, so a value inherited from a spread is not misidentified as static.
  • Test coverage adds a case for style objects with a spread before, after, and surrounding a nested property.
  • Docs and skill explain that computed values are left untouched and that declaring a property after the spread makes it editable.

Pullfrog  | View workflow run | Using Kimi K2 (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes since 4d779e8 — The follow-up commits merge origin/main and simplify both the object-spread guidance and the nested-property scan.

  • getNestedPropStatus was refactored to a right-to-left loop using getObjectPropertyName and the existing cssShorthand helper.
  • Docs and skill were simplified to a blanket recommendation against object spreads.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Kimi K2 (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

Keep the input range and output range directly in the `interpolate()` call.
The input range must use hardcoded numbers, not variables or expressions such as `[sendStartFrame, sendStartFrame + duration]`.

Do not use object spreads for interactive props.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ The code explicitly preserves computed values from spreads and still allows a property declared after a spread to be edited. A blanket "Do not use object spreads" may push users/agents to over-refactor shared-style patterns that the implementation supports. Consider retaining the nuance that inherited values stay computed and that post-spread declarations remain editable.

To make an element or custom component interactive, use:
[Make a component interactive](https://www.remotion.dev/docs/studio/make-component-interactive.md)

## Avoid object spreads

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ Same as the docs note: since getNestedPropStatus supports spreads by treating them as computed, the skill may be more useful if it states that inherited values are computed and that a property declared after the spread is still editable, rather than prohibiting spreads outright.

@JonnyBurger
JonnyBurger merged commit f41f30c into main Jul 22, 2026
22 checks passed
@JonnyBurger
JonnyBurger deleted the codex/preserve-interactive-spread-values branch July 22, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactive.Div does not parse the color right

1 participant