Fix/remove duplicates default recipe#886
Open
rahul-rajak-nsut wants to merge 4 commits into
Open
Conversation
- Validate width/height in handleWidthChange and handleHeightChange - Reject values outside 16–7680 range and NaN before updating state - Add autoComplete='off' to width and height inputs Fixes magic-peach#24
…d ratios Previously, any video that didn't closely match 9:16, 16:9, or 1:1 always fell back to 'vertical-9-16' (portrait), regardless of actual orientation. A 1440x900 (16:10) landscape video would be suggested a portrait preset. Fix the fallback to check width vs height: - wide videos (width >= height) → 'landscape-16-9' - tall videos (height < width) → 'vertical-9-16' Also updates the test that was encoding the wrong behavior as expected, and adds coverage for 4:3 and 16:10 landscape/portrait inputs. Fixes magic-peach#880
…s.ts DEFAULT_RECIPE was defined in both types.ts and constants.ts with diverged values. types.ts had contrast:0 and saturation:0, while constants.ts had the correct neutral values contrast:1 and saturation:1. FFmpeg's eq filter treats contrast=0 as fully grey and saturation=0 as greyscale, so any reset via the wrong definition would corrupt output. useKeyboardShortcuts.ts was importing DEFAULT_RECIPE from types.ts (the broken one). Fixed to import from constants.ts instead. SPEED_STEPS was also duplicated — removed from types.ts since constants.ts is the canonical source already used everywhere else. All 54 tests pass with no regressions. Fixes #YOUR_ISSUE_NUMBER
|
@rahul-rajak-nsut 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. |
Contributor
👋 Thanks for your PR, @rahul-rajak-nsut!Welcome to Reframe — a browser-based video editor built for everyone 🎬
What happens next
Quick checklist
Useful links
Happy coding! 🎉 |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
DEFAULT_RECIPE and SPEED_STEPS were defined in both src/lib/types.ts
and src/lib/constants.ts, and the two DEFAULT_RECIPE definitions had
silently diverged. types.ts had contrast:0 and saturation:0 — values
that cause fully grey and greyscale video output via FFmpeg's eq filter.
constants.ts had the correct neutral values (contrast:1, saturation:1).
useKeyboardShortcuts.ts was importing DEFAULT_RECIPE from types.ts
(the wrong source). This PR removes the duplicates from types.ts and
fixes the import to point to constants.ts.
Related Issue
Closes #881
Type of Contribution
Participant Info
Screen Recording
Not applicable — no UI or visual changes. Fix is purely in module
imports and type definitions. No component or DOM element was modified.
Changes made
src/lib/types.ts — removed duplicate exports:
src/hooks/useKeyboardShortcuts.ts — fixed import:
Checklist