Repository navigation
Open
Labels
feature: Design systemRelated to design patterns and componentsmilestone: missingp-feature: Check Inrole: Front Endsize: 5ptCan be done in 19-30 hours
Description
Trillium Firstmate 🤖
Overview
Convert the public check-in screens (new volunteer and returning volunteer) to Tailwind and the shared components, replace the MUI date picker with the new month/year picker, and remove @mui/x-date-pickers from the app. This is the first screen volunteers see, and it is the slice that removes the most JavaScript (about 70 kB measured in an earlier trial).
Dependencies
- UI kit: Button component #2262
- UI kit: Input, Textarea, Label, and field message #2263
- UI kit: RadioGroup and Switch #2264
- UI kit: Heading, Text, and Link #2269
- UI kit: Spinner, Stack, Container, and Card #2270
- UI kit: month/year picker (popover grid) to replace the MUI X DatePicker #2272
- Migrate the app shell, navbar, and footer to Tailwind #2273
Action Items
- Migrate these files to the shared components from
client/src/components/ui/and Tailwind classes. Keep the same text, props, routes and behavior:client/src/components/presentational/newUserForm.jsx(25 MUI tags; the only user of@mui/x-date-pickers; has 8.Mui…selectors insx)client/src/components/presentational/returnUserForm.jsxclient/src/components/presentational/upcomingEvent.jsxclient/src/components/presentational/CheckInButtons.jsxclient/src/pages/NewUser.jsxclient/src/pages/ReturningUser.jsxclient/src/pages/CheckInForm.jsx(oneBox; usesmomentanddate-fns)client/src/sass/CheckIn.scss(213 lines of global SCSS, including a barelabel { width: 300px; ... }rule that leaks onto every form on the page)
- Replace the
DatePicker+LocalizationProvider+AdapterDateFnsblock innewUserForm.jsxwithMonthYearPicker. Keep the rules: earliest month Jan 2013, latest month = current month, default = current month, and the same value passed to the submit handler. - Remove
@mui/x-date-pickersfromclient/package.json.date-fnsmust stay as a direct dependency (it was added in the picker ticket) becauseCheckInForm.jsximports it. - Use
Inputwith the floating-label option for the name, email and other fields,RadioGroupfor the radio question, andButtonfor submit, matching today's disabled/enabled behavior. - Record the
yarn buildJS size before and after in the PR. - Take before/after screenshots (desktop about 1280 px, phone 390 px) of each state listed in the Acceptance Criteria.
- Add Vitest checks for
newUserFormandreturnUserForm: fields render by label; submit is blocked or shows the same errors as today when required fields are empty; filling the fields and submitting calls the handler with the same values; the month/year picker changes the date; the radio answer is submitted. Add one test forupcomingEventshowing the formatted event date. - Delete the
.scssfiles or rules that become unused, and remove their imports.
Acceptance Criteria
- None of the files listed above imports from
@mui/*or@emotion/*, and none still containssx=orstyled(. - The screen looks the same as before (pixel parity). The PR shows before/after screenshots at desktop width (about 1280 px) and phone width (390 px), including each state named in the Action Items (empty, loading, error, open dialog, and so on). The PR template has sections for these.
- New Vitest checks are included (see Action Items) and
yarn testpasses. -
yarn typecheckandyarn buildpass inclient/. - Any
.scssfile (or part of one) that this change makes unused is deleted, and nothing outside the listed files is left depending on it. - Keyboard-only pass done and noted in the PR: Tab order is sensible, every control can be used without a mouse, and dialogs/menus close with Escape.
- The behavior is unchanged: same requests, same validation messages, same routes and redirects.
-
git grep -n "x-date-pickers"finds nothing inclient/. - States in the screenshots: new-volunteer form empty, with errors, picker open, returning-volunteer form, and the upcoming event card.
- Each check-in route still works (
/new,/returning,/checkIn/:userType,/newProfile).
Resources/Instructions
- Conventions and class cheat sheet: Document the styling and component conventions in CONTRIBUTING.md #2259 draft, which will live in
CONTRIBUTING.md. - Component catalogue: the
/design-systempage (see Add a /design-system page that catalogues tokens and components #2260). - Local setup: CONTRIBUTING.md, "Part 2". Run the client with
yarn startfrom the repo root. - Compare before/after with the app running at the same window size. Use the browser device toolbar for 390 px.
- Rule of thumb for conversion: MUI spacing numbers are 8 px steps (
mt: 2= 16 px = Tailwindmt-4); MUIxs/sm/mdbreakpoints are 0/600/900 px, which the tokens ticket maps to Tailwind's breakpoints.
Additional Notes
- The
.scssis global: old label rules affect every component rendered on the same page. Remove those rules as part of this ticket so the new components are not affected. - Decided: month/year popover grid. The old year-first list and the typed
MM/YYYYkeyboard entry go away. - Decided for the whole epic: every screen keeps pixel parity with today. This is a change of tooling, not a redesign. Fonts, colors, spacing, sizes, and breakpoints must look the same after the change.
- The temporary Tailwind
importantflag is on while MUI is still in the app (decided). That is what lets a Tailwind class beat MUI/emotion and the old global SCSS. It is removed in Final cleanup: remove the Tailwind 'important' flag and the old global SCSS #2288.
Metadata
Metadata
Assignees
Labels
feature: Design systemRelated to design patterns and componentsmilestone: missingp-feature: Check Inrole: Front Endsize: 5ptCan be done in 19-30 hours
Type
Projects
- StatusShow more project fieldsNew Issue Approval
Activity