Upload button ignores clicks right after the page loads #53
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#53
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's wrong
The Upload button in the navbar is visible as soon as the HTML arrives, but it does nothing until React has finished loading (hydration). On a slow connection, clicking it right away does nothing and the click is lost.
How to reproduce
Expected
The button either works when clicked or looks disabled until it can.
Where to look
web/src/app/components/Navbar.tsx: the Upload button. The theme toggle next to it already waits formounted; do the same here, or render the button disabled until mounted.web/src/app/components/ModalRender.tsx:ModalUploadOneis loaded withdynamic(..., { ssr: false }), so the first open also waits for a code chunk; consider preloading it once mounted.mountedflags with auseSyncExternalStorehook; either is fine here.Done when