Skip to content

@remotion/studio: Clamp sidebar width - #9584

Merged
JonnyBurger merged 1 commit into
mainfrom
codex/clamp-studio-sidebar-width
Jul 24, 2026
Merged

@remotion/studio: Clamp sidebar width#9584
JonnyBurger merged 1 commit into
mainfrom
codex/clamp-studio-sidebar-width

Conversation

@JonnyBurger

Copy link
Copy Markdown
Member

Summary

  • cap both Studio sidebars at 350px
  • keep splitter drag behavior aligned with the visible pixel cap
  • preserve the existing percentage-based sizing below the cap

Testing

  • bun run build
  • bun run stylecheck
  • bunx turbo run lint test --filter='@remotion/studio'
  • manually verified both sidebar caps and inward/outward dragging at a 1920px viewport

Closes #9583

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Jul 24, 2026 1:08pm
remotion Ready Ready Preview, Comment Jul 24, 2026 1:08pm

Request Review

@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 — caps both Studio sidebars at 350px via new pixel-based max-size props on the splitter component, while preserving the existing percentage-based flex model for all other splitters.

  • SplitterContainer / SplitterContext — adds maxFlexerSize and maxAntiFlexerSize (both number | null) to props, context type, and context defaults.
  • SplitterElement — applies maxWidth (vertical orientation) or maxHeight (horizontal orientation) as CSS from the context's cap value, resolved to undefined when null.
  • SplitterHandle — during drag start, translates pixel caps into flex-fraction bounds (minFlex/maxFlex) using getBoundingClientRect dimensions, clamps startFlex accordingly, and reuses these computed bounds for the drag-move clamp.
  • TopPanel — wires MAX_SIDEBAR_WIDTH = 350 as maxFlexerSize on the left sidebar splitter and maxAntiFlexerSize on the right sidebar splitter.
  • EditorContent and Timeline — pass null for both new props, keeping their existing pure-percentage behavior.

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

@JonnyBurger
JonnyBurger merged commit d9b1619 into main Jul 24, 2026
19 checks passed
@JonnyBurger
JonnyBurger deleted the codex/clamp-studio-sidebar-width branch July 24, 2026 13:10
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.

Studio sidebar width should be clamped

1 participant