Skip to content

Migrate /contact-sales to design tokens + extract shared form primitives - #93

Merged
filipagr merged 1 commit into
mainfrom
filipa/fil-846-migrate-contact-sales-to-design-tokens-shared-components
Jul 29, 2026
Merged

Migrate /contact-sales to design tokens + extract shared form primitives#93
filipagr merged 1 commit into
mainfrom
filipa/fil-846-migrate-contact-sales-to-design-tokens-shared-components

Conversation

@filipagr

Copy link
Copy Markdown
Collaborator

Anchor page for the form/contact bucket (FIL-846 / FIL-693). Migrates /contact-sales onto design tokens and extracts the reusable form building blocks that the remaining six form pages (FIL-847…FIL-852) will consume.

What changed

  • New src/components/FormControls.tsx — shared, composable form primitives: FIELD_INPUT_CLASS, FormField, TextField, RadioField, Checkbox, SubmitButton, FormSuccess. Tokenized visuals with baked-in a11y (role="status"/role="alert", keyboard focus rings). Deliberately primitives, not a monolithic form template — the waitlist pages use a per-field/checkbox-group shape that wouldn't fit one.
  • src/lib/hubspot.ts — new submitHubSpotForm() helper centralizes the Forms-API fetch + error parsing; pages just build their fields array.
  • src/pages/ContactSales.tsx — rebuilt on the primitives + SectionLabel. Zero inline style={{}}, zero hardcoded hex, zero raw font strings (was 26 / 28 / 3). HubSpot submit and data-hs-do-not-collect preserved.

Notable

  • Text inputs now show the site-wide brand focus-visible ring (previously suppressed by an inline outline:none) — a WCAG 2.4.7 improvement.
  • RadioField spaces its legend from the options via a margin on the <legend>: a <legend> in a display:flex fieldset is not a flex item, so the fieldset gap never applied to the heading→options spacing (it was 0px). Commented in-code.

Verification

  • Typecheck + lint clean.
  • In-browser (dev): renders with no console errors; radio selection, consent checkbox, input focus ring, full-width submit, two-column name row, and legend spacing all confirmed.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fil-one Ready Ready Preview, Comment Jul 29, 2026 1:57pm

Request Review

Anchor page for the form/contact bucket (FIL-693). Tokenizes ContactSales
(zero inline styles, hex, or raw font strings) and extracts the reusable
form building blocks the other six form pages will consume:

- FormControls.tsx: FIELD_INPUT_CLASS, FormField, TextField, RadioField,
  Checkbox, SubmitButton, FormSuccess. Tokenized visuals + baked-in a11y
  (role=status/alert, keyboard focus rings). Composable primitives, not a
  monolithic form template (waitlist pages use a different shape).
- hubspot.ts: submitHubSpotForm() centralizes the Forms-API fetch + error
  parsing; pages just build their fields array.
- ContactSales.tsx: rebuilt on the primitives + SectionLabel; keeps the
  HubSpot submit and data-hs-do-not-collect intact.

Also: text inputs now show the site-wide brand focus-visible ring (was
suppressed) and RadioField spaces its legend from the options via a legend
margin, since a <legend> in a flex fieldset is not a flex item so `gap`
never applied.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@filipagr
filipagr merged commit 854d0ac into main Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants