Skip to content

Migrate /partners/apply to design tokens + shared form primitives - #95

Merged
filipagr merged 1 commit into
mainfrom
filipa/fil-848-migrate-partners-apply-to-design-tokens-shared-components
Jul 30, 2026
Merged

Migrate /partners/apply to design tokens + shared form primitives#95
filipagr merged 1 commit into
mainfrom
filipa/fil-848-migrate-partners-apply-to-design-tokens-shared-components

Conversation

@filipagr

Copy link
Copy Markdown
Collaborator

Third page in the form/contact bucket (FIL-848 / FIL-693). Migrates /partners/apply (~63 → 0 inline/hex/font-string). The page now has zero raw form elements — every control runs through a shared primitive.

Stacked on #94#93. Base is the fil-847 branch; retarget to main after the parents merge. Review the 2-file diff vs fil-847.

What changed

  • src/pages/PartnerApplyPage.tsx — rebuilt on TextField / TextAreaField / SelectField / RadioCardField / Checkbox / SubmitButton / FormSuccess / FormError + SectionLabel. HubSpot submit + data-hs-do-not-collect intact.
  • src/components/FormControls.tsx — new primitives extracted from this page:
    • SelectField — native select with the shared chevron.
    • RadioCardField — card-style single-select with per-option descriptions + brand-tinted selection.
    • FormError — boxed role="alert" error.
    • FormSuccess extended with optional align + action (backward-compatible — contact-sales/support unaffected), so the centered "Back to Partners" success reuses it.
    • Fixed a className-merge bug: TextField/TextAreaField/SelectField now append a caller's className instead of overwriting the base styles.

Bug fix (live)

The Company-size dropdown rendered "1-10 employees employees" — the <option> appended a suffix the array values already had. Removed the duplicate. Submitted value unchanged (company_size still posts "1-10 employees"); only the visible label is fixed.

Verification

  • Build + prerender (60 routes), tests 21/21, typecheck + lint all clean; zero inline/hex/rgba/font-string/em-dash debt.
  • In-browser: partner-type cards (select + brand tint, vertically centered), select + chevron, textarea, consent, and the centered success state 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 Jul 30, 2026 6:35pm

Request Review

@filipagr
filipagr force-pushed the filipa/fil-848-migrate-partners-apply-to-design-tokens-shared-components branch from ee2bcf9 to bf86ba2 Compare July 30, 2026 18:32
Base automatically changed from filipa/fil-847-migrate-support-to-design-tokens-shared-components to main July 30, 2026 18:34
Third page in the form/contact bucket (FIL-693); stacked on FIL-847.
Tokenizes PartnerApplyPage (63 → 0 inline/hex/font-string) and moves every
form control onto shared primitives — the page now has zero raw form elements.

- PartnerApplyPage.tsx: rebuilt on TextField/TextAreaField/SelectField/
  RadioCardField/Checkbox/SubmitButton/FormSuccess/FormError + SectionLabel.
  HubSpot submit + data-hs-do-not-collect intact.
- FormControls.tsx: new primitives extracted from this page —
  * SelectField (native select + shared chevron)
  * RadioCardField (card-style single-select with descriptions)
  * FormError (boxed role="alert" error)
  extend FormSuccess with optional `align` + `action` (backward-compatible;
  contact-sales/support unaffected) so the centered "Back to Partners" success
  reuses it. Fix a className-merge bug so TextField/TextAreaField/SelectField
  append a caller's className instead of clobbering the base styles.

Fix a live display bug: the Company-size dropdown rendered "1-10 employees
employees" (the option template appended a suffix the values already had).
Submitted value is unchanged; only the visible label is fixed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@filipagr
filipagr force-pushed the filipa/fil-848-migrate-partners-apply-to-design-tokens-shared-components branch from bf86ba2 to 4c35176 Compare July 30, 2026 18:34

@filecoinfoundation-inf filecoinfoundation-inf left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same shared-form-primitives refactor pattern; also extends FormControls with SelectField, RadioCardField, and a reusable FormError/FormSuccess (with align/action options). No security concerns.

@filipagr
filipagr merged commit 6752889 into main Jul 30, 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