Skip to content

feat: add visual aspect ratio thumbnails to presets#934

Open
jaygaikar-09 wants to merge 1 commit into
magic-peach:mainfrom
jaygaikar-09:feat/preset-visual-thumbnails
Open

feat: add visual aspect ratio thumbnails to presets#934
jaygaikar-09 wants to merge 1 commit into
magic-peach:mainfrom
jaygaikar-09:feat/preset-visual-thumbnails

Conversation

@jaygaikar-09
Copy link
Copy Markdown
Contributor

@jaygaikar-09 jaygaikar-09 commented May 22, 2026

Description

Added visual aspect-ratio thumbnails to the preset selector to improve discoverability and quick scanning of export formats.

Implemented lightweight SVG-based previews that accurately represent each preset ratio (9:16, 16:9, 1:1, 21:9, etc.) while preserving the original compact preset grid layout.

The thumbnails scale proportionally within a consistent 24×24px bounding box and integrate with the existing Reframe design system without introducing new dependencies.


Related Issue

Closes #672


Type of Contribution

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

Participant Info

  • GitHub username: jaygaikar-09
  • Contribution level (Beginner/Intermediate/Advanced): Advanced

Screen Recording

(https://drive.google.com/file/d/1VdfixuydPqy1JWnHqW2ltPZVgh2ohYCg/view?usp=sharing)


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)

Summary of Changes

Added

  • src/components/ui/AspectRatioThumbnail.tsx
    • Lightweight SVG-based aspect-ratio preview component
    • Accurate proportional scaling using actual preset dimensions
    • Centered rendering within fixed 24×24px bounds

Updated

  • src/components/PresetSelector.tsx
    • Integrated visual ratio thumbnails into preset cards
    • Improved thumbnail alignment and spacing consistency
    • Preserved original responsive preset grid layout

Rendering Improvements

  • Uses contain-fit scaling:
    • scale = min(24 / width, 24 / height)
  • Correctly distinguishes:
    • 9:16 (vertical)
    • 16:9 / 21:9 (horizontal)
    • 1:1 (square)
    • portrait/cinematic formats
  • Rounded SVG rectangles with subtle stroke/fill styling
  • Active preset state aligned with existing film accent theme

Accessibility

  • Decorative thumbnails use aria-hidden="true"
  • Existing preset button labels and accessibility semantics preserved
  • No impact on keyboard navigation or responsive behavior

UX Improvements

  • Faster visual scanning of export presets
  • Better distinction between portrait, square, and cinematic formats
  • Preserves original compact UI without redesigning the selector
  • No additional package dependencies added

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@jaygaikar-09 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

✅ PR Format Check Passed — @jaygaikar-09

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
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @jaygaikar-09!

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 github-actions Bot added gssoc'26 GirlScript Summer of Code 2026 level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature labels May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GirlScript Summer of Code 2026 level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: preset visual thumbnails — show aspect ratio preview in the preset dropdown

1 participant