fix(reviewer): instant video upload on attach instead of submit#441
Merged
Conversation
The submit button lives outside the .video-drop element, so as a Stimulus target it never resolved and the submit lock silently did nothing. Move the controller up to the verdict form, make the drop zone a target, and also guard the form's submit event so Enter can't sneak a submit through mid-upload. Replacing the file while an upload is in flight now invalidates the old upload's callbacks (token check) and removes the previous signed-id field instead of stacking hidden inputs. Also: drop the now-unused accepted class, give the progress bar a proper progressbar role with min/max, and tidy the percent formatting.formatting.
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
what's this do?
Previously, the proof video only uploaded when the reviewer hit "Submit", which made the whole thing feel slow and clunky. Now it uploads as soon as a file is attached :)
Also threw in a little progress bar :)
Under the hood there's some optimization too:
show it works
ai?
Claude