Skip to content

feat: add real-time crop and aspect ratio preview overlay in VideoPre…#986

Merged
magic-peach merged 2 commits into
magic-peach:mainfrom
Pranav-IIITM:feat/realtime-crop-preview-overlay
May 23, 2026
Merged

feat: add real-time crop and aspect ratio preview overlay in VideoPre…#986
magic-peach merged 2 commits into
magic-peach:mainfrom
Pranav-IIITM:feat/realtime-crop-preview-overlay

Conversation

@Pranav-IIITM
Copy link
Copy Markdown
Contributor

Description

Added a real-time crop/aspect ratio preview overlay to VideoPreview.tsx that gives users instant visual feedback on how their video will look post-export — no test exports needed.

FILL mode (crop): renders a dashed amber bounding box showing the exact crop boundary:

  • Portrait target (e.g. 9:16 Reels) → pillarbox crop indicators on left/right
  • Ultrawide target (e.g. 47:10 Panoramic) → letterbox crop indicators on top/bottom

FIT mode (letterbox): renders semi-transparent black bars:

  • Portrait target → bars on left/right
  • Ultrawide target → bars on top/bottom

Also fixed an inverted aspect ratio comparison bug where wide and narrow targets were getting the wrong overlay axis applied.

Overlay is position: absolute, pointer-events-none, sits on top of the video without affecting layout or playback. Updates instantly on preset or framing change. Hidden when no preset selected or preset is custom.

No new dependencies. All existing VideoPreview logic unchanged.


Related Issue

Closes #891


Type of Contribution

  • Bug fix
  • New feature
  • Documentation update
  • GSSoC contribution

Participant Info

  • GitHub username: @Pranav-IIITM
  • Contribution level: Intermediate

Screen Recording

feat-crop-boundary-preview.1.mp4

Checklist

  • I have read the contribution guidelines
  • My changes follow the project structure
  • I have tested my changes in Chrome, Firefox, and Safari
  • bun run lint passes (no ESLint errors)
  • bunx tsc --noEmit passes (no TypeScript errors)
  • New interactive elements have aria-label / accessible names
  • No console.log statements left in
  • This PR is related to a valid issue
  • Screen recording attached above (required for UI/feature/design changes)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

@Pranav-IIITM is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added level:intermediate Intermediate level - 35 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:testing Testing labels May 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @Pranav-IIITM!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

🟠 GSSoC'26 PR detected — thanks for contributing under GirlScript Summer of Code 2026!

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 23, 2026

✅ PR Format Check Passed — @Pranav-IIITM

Basic format checks passed. A maintainer will review your code changes.

This does not mean the PR is approved — it just means the format is correct.

@github-actions github-actions Bot added the gssoc'26 GirlScript Summer of Code 2026 label May 23, 2026
@github-actions github-actions Bot added the level:beginner Beginner level - 20 pts label May 23, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

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

Project Deployment Actions Updated (UTC)
reframe Ready Ready Preview, Comment May 23, 2026 10:53am

@magic-peach magic-peach added gssoc:approved Approved for GSSoC'26 quality:clean Well-implemented, clean code and removed level:intermediate Intermediate level - 35 pts labels May 23, 2026
@magic-peach magic-peach merged commit 4b95655 into magic-peach:main May 23, 2026
11 checks passed
chavanGaneshDatta pushed a commit to chavanGaneshDatta/reframe that referenced this pull request May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved for GSSoC'26 gssoc'26 GirlScript Summer of Code 2026 level:beginner Beginner level - 20 pts quality:clean Well-implemented, clean code type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature type:testing Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Real-Time Crop and Aspect Ratio Preview Overlay in VideoPreview

2 participants