Skip to content

Feature/save load localstorage#754

Open
Flux07-gezz wants to merge 2 commits into
magic-peach:mainfrom
Flux07-gezz:feature/save-load-localstorage
Open

Feature/save load localstorage#754
Flux07-gezz wants to merge 2 commits into
magic-peach:mainfrom
Flux07-gezz:feature/save-load-localstorage

Conversation

@Flux07-gezz
Copy link
Copy Markdown
Contributor

Description

This PR introduces a client-side project state serialization and restoration framework utilizing browser localStorage under the versioned key reframe-projects-v1. Because Reframe functions as a static export application, this enables persistent timeline editing progress across browser reloads without requiring an external database backend.

Key Changes:

  • src/hooks/useVideoEditor.ts: Created saveProject(), listProjects(), loadProject(), and deleteProject() hooks wrapped in safe error boundaries to avoid browser storage quota crashes.
  • src/components/VideoEditor.tsx: Constructed clean, responsive Save and Load action modals matching Reframe's structural design language.
  • Accessibility & Linting Fixes: Refactored layout container rows inside the modal loops to use semantically accurate html interactive buttons to pass strict jsx-a11y/click-events-have-key-events and no-static-element-interactions checks. Removed autoFocus hooks to maintain cross-device usability.

Note: Due to standard browser memory limitations, raw video binary files/blobs are intentionally not stringified. A dynamic UX callout banner has been integrated into the restoration modal to remind users to re-select their source file after state hydration.

Related Issue

Closes #688
Closes #686

Type of Contribution

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

Participant Info

  • GitHub username: saurabh19304
  • Contribution level (Beginner/Intermediate/Advanced): Intermediate

Screen Recording

Recording / Loom link: ## 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) — Verified clean locally with npm run lint
  • bunx tsc --noEmit passes (no TypeScript errors) — Verified clean locally with npx tsc --noEmit
  • 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 19, 2026

@Flux07-gezz 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 19, 2026

⚠️ PR Format Issues — @Flux07-gezz

Please fix the following before your PR can be reviewed:

  • ⚠️ Use a conventional PR title. Examples:
    • feat: add dark mode support
    • fix: resolve aria label missing on slider
    • docs: add deployment guide to README

Push new commits after fixing — this comment will update automatically.

📖 CONTRIBUTING.md

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @Flux07-gezz!

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 level:advanced Advanced level - 55 pts type:bug Bug fix type:design UI/UX design type:docs Documentation type:feature New feature gssoc'26 GirlScript Summer of Code 2026 labels May 19, 2026
@Flux07-gezz Flux07-gezz force-pushed the feature/save-load-localstorage branch from 72cc50f to 20c9dae Compare May 19, 2026 18:05
@Flux07-gezz Flux07-gezz force-pushed the feature/save-load-localstorage branch from 20c9dae to bc0d699 Compare May 19, 2026 23:30
@Flux07-gezz
Copy link
Copy Markdown
Contributor Author

Hey @magic-peach! 👋

Just wanted to give you a heads-up that PR #754 is ready for review — it implements the save/load project state feature using localStorage (closes #686 and #688) .

Here's a quick summary of what's in it:

  • saveProject(), listProjects(), loadProject(), deleteProject() added to useVideoEditor.ts
  • Modal-based Save and Load UI in VideoEditor.tsx
  • SSR-safe localStorage access with typeof window guards
  • Full error handling for private browsing / quota exceeded
  • Schema versioning (schemaVersion: "v1") and savedAt timestamps for future migrations
  • Warning shown to users that the video file needs to be re-selected after loading

All CI checks are passing. Would love to get your feedback whenever you get a chance! 🙏

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.

[FEATURE] Add Save/Load Project State using LocalStorage [Feature] Save/Load Project State using LocalStorage

1 participant