Skip to content

minor refactor#13

Merged
ValentinRapp merged 1 commit into
mainfrom
dev
Jun 5, 2026
Merged

minor refactor#13
ValentinRapp merged 1 commit into
mainfrom
dev

Conversation

@ValentinRapp

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 5, 2026 21:06
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
yafw Ready Ready Preview, Comment Jun 5, 2026 9:06pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the video editor UI to stop prop-drilling editor state through EditorPage and instead share the useVideoEditor() state via a new React context provider, simplifying component interfaces.

Changes:

  • Added VideoEditorContext + VideoEditorProvider and migrated editor components to consume state via useVideoEditorContext().
  • Simplified EditorPage to render editor subcomponents without passing large prop objects.
  • Updated App to wrap the editor route in the provider and added a layout-measurement wrapper for the landing/download card.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/mainview/context/VideoEditorContext.tsx Introduces context + provider for useVideoEditor() state.
src/mainview/components/Timeline.tsx Switches from prop-based state to context consumption.
src/mainview/components/Player.tsx Switches from prop-based state to context consumption.
src/mainview/components/ExportPanel.tsx Switches from prop-based state/callbacks to context consumption.
src/mainview/components/EncoderSettings.tsx Switches from prop-based state to context consumption; reads formats from constants.
src/mainview/components/EditorPage.tsx Removes extensive props surface; renders child components directly.
src/mainview/App.tsx Wraps editor page in provider; adds card-height measurement logic for landing/download.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to +13
start,
setStart,
end,
Comment thread src/mainview/App.tsx
Comment on lines +23 to +31
useLayoutEffect(() => {
const element = cardRef.current;
if (element) {
const newHeight = element.offsetHeight;
if (newHeight !== cardHeight) {
setCardHeight(newHeight);
}
}
});
@ValentinRapp ValentinRapp merged commit 6bb2077 into main Jun 5, 2026
7 checks passed
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.

2 participants