fix: prevent trim end input from stripping decimal points while typing#907
fix: prevent trim end input from stripping decimal points while typing#907Nightcoder-26 wants to merge 5 commits into
Conversation
The Trim End input field previously bound its value directly to 'recipe.trimEnd'. Because 'trimEnd' is stored as a parsed float, typing a decimal point (e.g. '1.') caused the trailing decimal to be immediately stripped by parseFloat during the change handler, making it impossible to type decimal values manually. Fix: Introduce a local 'endInput' state variable for the Trim End input, mirroring the existing architecture used for 'startInput'. This acts as an intermediary text state, allowing users to type decimals naturally while keeping the underlying recipe state synchronized.
|
Someone 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. |
✅ PR Format Check Passed — @Nightcoder-26Basic 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. |
👋 Thanks for your PR, @Nightcoder-26!Welcome to Reframe — a browser-based video editor built for everyone 🎬
What happens next
Quick checklist
Useful links
Happy coding! 🎉 |
|
@magic-peach kindly review the PR and merge it |
# Conflicts: # src/components/TrimControl.tsx
|
@magic-peach please review it and merge or close it, if you want me to any changes kindly mention that i am happy to work accordingly |
|
@Nightcoder-26 The fix looks correct — introducing a local However, build/lint/typecheck CI hasn't run on this PR. Could you push a minor update to trigger the full CI suite? We need build, lint, and typecheck to pass before merging. Note: PR #945 also fixes the same Once CI passes, this will be merged quickly! |
|
Hi! @magic-peach Both follow-up commits are pushed and the local build passes with ✓ Compiled successfully. However, I can see the CI is still blocked by "5 workflows awaiting approval" — this is GitHub's fork protection policy and the workflows cannot start until a maintainer approves them. Could you please click "Approve and run workflows" in the Checks section of this PR? That single click will unblock all 5 workflows and CI should pass immediately after. 🙏 |
|
@magic-peach kindly check the PR and merge it and close it as soon as possible. the issues has been solved please review it humble request Thank you! |
Description
Fixes a bug where typing a decimal point in the Trim End input field would immediately strip the decimal, making it impossible to type values like 1.5 manually.
Previously, the Trim End input field bound its value directly to recipe.trimEnd. Because trimEnd is stored as a parsed float, typing a decimal point (e.g., 1.) caused the trailing decimal to be immediately stripped by parseFloat during the React re-render.
Fix: Introduced a local endInput state variable for the Trim End input, mirroring the existing architecture used for the startInput field. This acts as an intermediary text state, allowing users to type decimals naturally while keeping the underlying recipe state synchronized.
Related Issue
fixes #904
Type of Contribution
Participant Info
Screen Recording
Recording.2026-05-22.125056.mov
Checklist
bun run lintpasses (no ESLint errors)bunx tsc --noEmitpasses (no TypeScript errors)aria-label/ accessible namesconsole.logstatements left in