3.7 KiB
phase, plan, subsystem, tags, dependency_graph, tech_stack, key_files, decisions, metrics
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 09-md3-components | 01 | ui-components |
|
|
|
|
|
|
Phase 9 Plan 01: MD3 UI Primitives Summary
One-liner: CSS-only floating label TextFieldMD3 component + MD3 button class constants + DEBT-01 aria-label consistency fix across FieldRenderer, PasswordField, and tooltip buttons.
Tasks Completed
| Task | Name | Commit | Status |
|---|---|---|---|
| 1 | Create TextFieldMD3 + MD3 button constants | 9441dcd |
Complete |
| 2 | Fix DEBT-01 aria-label in FieldRenderer + tests | 532a994 |
Complete |
Verification
npx vitest run src/components/ui/TextFieldMD3.test.tsx— 9/9 tests passnpx vitest run src/components/ui/FieldRenderer.test.tsx— 4/4 tests passnpx vitest run --reporter=dot— 179/179 tests pass (zero regressions)src/styles/md3-buttons.tsexportsMD3_BTN_FILLED,MD3_BTN_OUTLINED,MD3_BTN_TEXT
Decisions Made
-
Tailwind v4
peer-[:not(:placeholder-shown)]arbitrary variant: Used the bracket syntax form directly — verified it passes through the test suite correctly. No need for thedata-has-valueJS fallback. -
placeholder=" "(space) for floating label: TextFieldMD3 always renders withplaceholder=" "andplaceholder-transparentCSS. This is the CSS-only detection mechanism for the:not(:placeholder-shown)pseudo-class — no React state needed. -
{ selector: 'input' }added to RemoteConfigStep.test.tsx: Once tooltip buttons receivedaria-label="More info about {field.label}", thegetByLabelText(/sas url/i)query matched both the input (via its<label>association) and the tooltip button (via itsaria-label). Fixed by scoping the query to{ selector: 'input' }in 6 call sites. This is correct behavior — the tests were too broad before.
Deviations from Plan
Auto-fixed Issues
1. [Rule 1 - Bug] Test regression from DEBT-01 aria-label fix
- Found during: Task 2, after fixing FieldRenderer.tsx
- Issue:
getByLabelText(/sas url/i)in RemoteConfigStep.test.tsx started matching both the PasswordField input (via label association) AND the new tooltip buttonaria-label="More info about SAS URL", causing "Found multiple elements" errors in 9 tests. - Fix: Added
{ selector: 'input' }option to 6getByLabelTextcall sites in RemoteConfigStep.test.tsx that queried fields with tooltip buttons. This scopes the accessible name lookup to input elements only. - Files modified:
src/components/wizard/RemoteConfigStep.test.tsx - Commit:
532a994(included in Task 2 commit)