fix: mobile layout for the volunteer flow - #80
Merged
Merged
Conversation
…keeping the invite flow dormant
…he computed style
…rack still references
…lear the option highlight when hovering the footer
…e nav island stays visible
…hed on overscroll
…t locked chip padding
…ng self-specific message
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🚅 Deployed to the nexus-pr-80 environment in nexus
|
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
Makes the volunteer half of the app usable on a phone: auth, home, join, onboarding, the form viewer, tournament overview, profile view/edit, and account settings. TD tools are deliberately untouched.
The viewport switch is a CSS media query rather than a
useIsMobile()branch. These pages prerender on the server, which has no viewport, so a JS check necessarily renders desktop on the first frame and corrects itself after hydration — the rail visibly flashed before becoming a drawer.useIsMobilesurvives only where the two arrangements are different elements rather than different styling.Two touch bugs surfaced along the way that were broken at any screen size, not just phone width.
What changed
Frontend
Responsive foundation
lib/useNavDrawer.tsx— holds the mobile drawer's open state for one shell, so the toggle can live in the Topbar while the drawer is its sibling.Sidebar,Topbar,Shell,Settings,Profile,FormFlow,Overview,PageHeader,Banner,FloatingEditButton,Onboarding.CenteredCard.module.css— one centred-card stylesheet for the auth pages and/join, replacing the per-route copies.100vh→100dvhon every full-height shell; on iOS100vhis the viewport with the URL bar retracted, so the layout overran the screen.Navigation
position: fixedoverlay. A fixed element anchors to the viewport and a sticky Topbar to the document, so overscroll visibly separated them./dashboardrenders no rail for non-admins, whose only entry was a link to the page they were on.Volunteer pages
left: -34px, so editing your own experience was impossible on a phone, not just cramped.SettingsRowstacks label above control; a 220px label plus a 60%-capped control needs ~370px.FormUpdateFlowgained the same container asFormFillFlow— it had none at all, at any width.repeat(4, 1fr)status tiles,110px 1frlegend rows.UnsavedChangesProvidervia a new route layout.Touch behaviour (broken at any width)
RankedListsplitsPointerSensorintoMouseSensor+TouchSensorwith a 200ms press, and rows drop totouch-action: manipulation. A 4px activation plustouch-action: nonemeant every drag was a reorder and a long list could never be scrolled past.:hoverinSidebar,SettingsNav,BannerandFloatingEditButton— on touch they fire but never un-fire, leaving rows stuck.Shared UI
PageHeader—min-width: 0on the text block; a one-word serif heading's min-content width and aflex-shrink: 0action overflowed the card. Latent on desktop too.Banner— samemin-width: 0fix, plus wrapping with anorderswap so the dismiss stays on the message's line.ButtonGroup— wraps instead of overflowing; six shirt sizes don't fit a phone.Tooltip— the bubble is nowposition: fixedoff the trigger's measured rect instead of absolute inside the wrapper, so no ancestor'soverflow: hiddencan clip it. (fix — in the roster's roles cell and insidePopover's scrolling list it rendered as an arrow with no bubble under it.)Tooltip— clamps its width to the viewport and nudges back inside near a screen edge, with the arrow shifting the opposite way to keep pointing at its trigger.AvatarCircle— rendersIconUserinstead of"?"when there's no name yet.Topbar—showWordmarkandshowAvatartake"mobile-only"/"logout-only"; theextraLeftPadprop is replaced byshowNavToggle.IconShield— solid shield with the check knocked out viafill-rule: evenodd.Removed
CompetitionExperienceCompactEditor/VolunteerExperienceCompactEditor— exported, imported nowhere, and an earlier attempt at the same card-stack idea.app/settings/constants.tsandapp/(auth)/auth.module.css— no remaining importers.Out of scope
GridWarpstill runs a requestAnimationFrame loop on the home page for a cursor effect a touchscreen can't drive.Test plan
pytestpasses locally — N/A, no backend change on this branchAutomated
package.jsonhaslint, notest).tsc --noEmit,eslint, andnext buildclean after every commit.Manual — verified on an iPhone during development
Manual — still to check on a device
FormUpdateFlow)./joinfrom an invite link.Popover's scrolling list, on desktop.