fix(frontend): resolve disabled export button and synchronize editor …#1095
Open
Rucha0901 wants to merge 1 commit into
Open
fix(frontend): resolve disabled export button and synchronize editor …#1095Rucha0901 wants to merge 1 commit into
Rucha0901 wants to merge 1 commit into
Conversation
|
@Rucha0901 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, @Rucha0901!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.
📝 Summary of Changes
This pull request resolves the issue where the Export button remained disabled or locked after successfully uploading and processing valid videos, and ensures all editing parameters and export states synchronize seamlessly.
Specifically, it:
"loading"state toExportStatusthat tracks the asynchronous metadata extraction and magic-byte checks after a video is selected.FileUploadwith anisLoadingprop and a modern visual loader. While a video is loading, a high-quality pulsing visual is rendered rather than returning the user to the blank drop-zone, significantly improving user experience.VideoEditorto include the"loading"status inisProcessing. All controls and the Export button are appropriately disabled, displaying"PROCESSING"until the video file is completely parsed and loaded.useEffecthook inuseVideoEditorthat monitors changes in the editing recipe or audio options. If the current status is"done"or"error", any new edit resets the status back to"idle"and clears out old results/error banners, preventing any stale or false disabled states.🛠️ Technical Details & Files Changed
src/lib/types.ts: Updated theExportStatustype to include the new"loading"state.src/hooks/useVideoEditor.ts:statusto"loading"at the start ofhandleFileSelectand to"idle"when successful.src/components/FileUpload.tsx: Created a premium visualLoadingStatespinner that renders whenisLoadingis true.src/components/VideoEditor.tsx: Passed the loading status toFileUploadand integrated the"loading"state to safely disable editor controls and update the Export button.🧪 Verification & Testing
npx tsc --noEmitand confirmed zero type check or compiler errors.npx vitest runand ensured all existing unit tests pass successfully."PROCESSING"and becomes fully enabled as"EXPORT"as soon as the video metadata extraction succeeds."idle".☑️ Checklist