Skip to content

refactor(antares): rebuild form controls with field primitives#234

Open
egaitan-godaddy wants to merge 19 commits into
mainfrom
refactor/field-frame
Open

refactor(antares): rebuild form controls with field primitives#234
egaitan-godaddy wants to merge 19 commits into
mainfrom
refactor/field-frame

Conversation

@egaitan-godaddy

@egaitan-godaddy egaitan-godaddy commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Select
TextField
NumberField
Checkbox
Radio
Field

This PR refactors the current FieldFrame into a set of composable field primitives. Presentation and layout are handled by these primitives, while context wiring is delegated internally to RAC, removing the need for manual context wiring on our side. Also, all components and primitives are now aligned with the Design Specs.

  • Split the internal field box into composable primitives: Field, FieldLabel, FieldGroup, FieldDescription, FieldError, FieldInput, FieldTextArea, and FieldButton.
  • Rebuilt TextField, NumberField, Checkbox, Radio, and Select on top of these primitives.
  • Added support for a size?: 'sm' | 'md' prop on TextField, NumberField, and Select. The sm size aligns with the Figma design specs.
  • Added standalone ListBox and ListBoxItem primitives.
  • Rebuilt Select on top of the field primitives, along with Popover and ListBox.
  • Migrated Radio and Checkbox from the deprecated RAC Radio and Checkbox components to RadioField + RadioButton and CheckboxField + CheckboxButton.
  • Rebuilt RadioGroup and CheckboxGroup on top of the field primitives so labels, descriptions, required indicators, and error rendering are consistent across all field components.

Copilot AI review requested due to automatic review settings June 19, 2026 14:11
@egaitan-godaddy egaitan-godaddy requested a review from a team as a code owner June 19, 2026 14:11
@changeset-bot

changeset-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3267f92

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@godaddy/antares Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@egaitan-godaddy egaitan-godaddy changed the title Refactor/field frame refactor(antares): rebuild form controls with field primitives Jun 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Docs Site Preview

Preview URL: https://godaddy.github.io/antares/pr-234-site/

Preview will be automatically deleted when this PR is closed.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

📚 Storybook Preview

Preview URL: https://godaddy.github.io/antares/pr-234-storybook/

Preview will be automatically deleted when this PR is closed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors Antares form controls away from the monolithic internal FieldFrame and into composable field primitives (Field, FieldLabel, FieldGroup, etc.), then rebuilds TextField, NumberField, Select, RadioGroup, and CheckboxGroup on top of those primitives. It also introduces standalone ListBox / ListBoxItem primitives and updates stories/tests/snapshots accordingly, while adding a size?: 'sm' | 'md' visual prop to several boxed fields.

Changes:

  • Introduces new internal field primitives (components/_internal/field) and removes the legacy components/_internal/field-frame.
  • Rebuilds TextField, NumberField, Select, Radio, Checkbox, and their group components to use the primitives; adds small/medium sizing examples + tests.
  • Adds a public ListBox / ListBoxItem primitive and updates exports + documentation.

Reviewed changes

Copilot reviewed 89 out of 89 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/@godaddy/antares/index.ts Updates public exports for new ListBox API and revised Select exports.
packages/@godaddy/antares/exports/Select.ts Updates subpath export to match new Select surface (SelectKey, fewer exports).
packages/@godaddy/antares/exports/ListBox.ts Adds subpath export for new ListBox primitive.
packages/@godaddy/antares/components/text-field/text-field.stories.tsx Adds size control + new “Sizes” story.
packages/@godaddy/antares/components/text-field/test/text-field.visual.test.tsx Adds visual coverage for the new sizes example.
packages/@godaddy/antares/components/text-field/test/text-field.node.test.tsx Adds SSR snapshot coverage for sizes (expects data-size="sm").
packages/@godaddy/antares/components/text-field/test/snapshots/text-field.node.test.tsx.snap Updates snapshots to new field primitive markup + adds sizes snapshot.
packages/@godaddy/antares/components/text-field/src/index.tsx Rebuilds TextField on Field* primitives and adds size prop wiring.
packages/@godaddy/antares/components/text-field/src/index.module.css Removes old .multiline rule (textarea sizing now handled by primitives).
packages/@godaddy/antares/components/text-field/examples/text-field-playground.tsx Adds size passthrough in playground.
packages/@godaddy/antares/components/text-field/examples/sizes.tsx Adds example showing md vs sm TextField.
packages/@godaddy/antares/components/select/test/select.visual.test.tsx Adds visual regression tests for rebuilt Select examples.
packages/@godaddy/antares/components/select/test/select.node.test.tsx Replaces old snapshot set with updated examples and size assertions.
packages/@godaddy/antares/components/select/test/select.browser.test.tsx Updates interaction tests to new examples and new invalid-from-form behavior.
packages/@godaddy/antares/components/select/test/snapshots/select.node.test.tsx.snap Updates snapshots for new Select structure and examples.
packages/@godaddy/antares/components/select/src/index.tsx Rebuilds Select using Field* primitives + Popover + ListBox; trims API surface.
packages/@godaddy/antares/components/select/src/index.module.css Replaces legacy Select styling with minimal SelectValue + icon styling (rest comes from primitives).
packages/@godaddy/antares/components/select/select.stories.tsx Renames/reorganizes stories to match new examples and adds size control.
packages/@godaddy/antares/components/select/README.mdx Rewrites docs to match new API and examples; removes sections for dropped APIs.
packages/@godaddy/antares/components/select/examples/sizes.tsx Adds example demonstrating md vs sm Select.
packages/@godaddy/antares/components/select/examples/select-validation.tsx Removes deprecated/old validation example (replaced by invalid + form examples).
packages/@godaddy/antares/components/select/examples/select-sizes.tsx Removes old sizes example file (replaced with new one).
packages/@godaddy/antares/components/select/examples/select-sections.tsx Removes old sections example (SelectSection/SelectHeader removed).
packages/@godaddy/antares/components/select/examples/select-render-props.tsx Removes render-props example (render-function children removed).
packages/@godaddy/antares/components/select/examples/select-label-styles.tsx Removes label-style examples (labelStyle removed).
packages/@godaddy/antares/components/select/examples/select-dynamic.tsx Removes dynamic items example (items prop removed).
packages/@godaddy/antares/components/select/examples/select-controlled.tsx Removes legacy controlled example (replaced with new controlled example).
packages/@godaddy/antares/components/select/examples/playground.tsx Updates playground to the new Select API and default args.
packages/@godaddy/antares/components/select/examples/multiple.tsx Adds new multiple-selection example using new controlled API.
packages/@godaddy/antares/components/select/examples/invalid.tsx Renames/repurposes invalid example to exercise error rendering + required indicator.
packages/@godaddy/antares/components/select/examples/form.tsx Adds native form submission example (incl. required validation).
packages/@godaddy/antares/components/select/examples/disabled.tsx Renames disabled example and aligns to new API.
packages/@godaddy/antares/components/select/examples/controlled.tsx Adds new controlled example using value/onChange.
packages/@godaddy/antares/components/select/examples/basic.tsx Adds new basic example component used across docs/tests.
packages/@godaddy/antares/components/radio/src/index.tsx Migrates from deprecated RAC Radio to RadioField + RadioButton and uses field primitives for group layout.
packages/@godaddy/antares/components/radio/src/index.module.css Removes label-required/error styles now handled by primitives; adds minor UX tweak (user-select: none).
packages/@godaddy/antares/components/popover/src/index.tsx Adjusts Popover container/content props typing; moves elevation/rounding to the popover root; adds content class merging.
packages/@godaddy/antares/components/popover/src/index.module.css Adds .content { overflow: auto; }.
packages/@godaddy/antares/components/number-field/test/number-field.visual.test.tsx Adds visual coverage for NumberField sizes example.
packages/@godaddy/antares/components/number-field/test/number-field.node.test.tsx Adds SSR snapshot coverage for sizes (expects data-size="sm").
packages/@godaddy/antares/components/number-field/test/snapshots/number-field.node.test.tsx.snap Updates snapshots to new primitives markup + adds sizes snapshot.
packages/@godaddy/antares/components/number-field/src/index.tsx Rebuilds NumberField on field primitives and adds size prop.
packages/@godaddy/antares/components/number-field/number-field.stories.tsx Adds sizes story and size playground control.
packages/@godaddy/antares/components/number-field/examples/sizes.tsx Adds example showing md vs sm NumberField.
packages/@godaddy/antares/components/number-field/examples/number-field-playground.tsx Adds size to playground props and passes through.
packages/@godaddy/antares/components/modal/test/snapshots/modal.node.test.tsx.snap Updates snapshots due to RadioGroup structural changes.
packages/@godaddy/antares/components/listbox/test/listbox.node.test.tsx Adds SSR snapshot tests for ListBox examples.
packages/@godaddy/antares/components/listbox/test/listbox.browser.test.tsx Adds browser interaction tests for ListBox selection behaviors.
packages/@godaddy/antares/components/listbox/test/snapshots/listbox.node.test.tsx.snap Adds initial snapshots for ListBox examples.
packages/@godaddy/antares/components/listbox/src/index.tsx Introduces new ListBox/ListBoxItem wrapper components over RAC with Flex layout + textValue derivation.
packages/@godaddy/antares/components/listbox/src/index.module.css Adds baseline ListBoxItem styling and state selectors.
packages/@godaddy/antares/components/listbox/README.mdx Adds docs for new public ListBox primitive.
packages/@godaddy/antares/components/listbox/listbox.stories.tsx Adds Storybook stories + playground for ListBox.
packages/@godaddy/antares/components/listbox/examples/playground.tsx Adds playground example for ListBox.
packages/@godaddy/antares/components/listbox/examples/multiple.tsx Adds multiple-selection example.
packages/@godaddy/antares/components/listbox/examples/controlled.tsx Adds controlled single-selection example.
packages/@godaddy/antares/components/listbox/examples/basic.tsx Adds basic single-selection example.
packages/@godaddy/antares/components/checkbox/src/index.tsx Migrates to CheckboxField + CheckboxButton and uses field primitives for group label/description/error.
packages/@godaddy/antares/components/checkbox/src/index.module.css Removes label-required/error styles now handled by primitives; adds user-select: none.
packages/@godaddy/antares/components/checkbox/README.mdx Updates docs: directionorientation.
packages/@godaddy/antares/components/checkbox/examples/playground.tsx Updates example prop from direction to orientation.
packages/@godaddy/antares/components/checkbox/examples/horizontal.tsx Updates example to use orientation="horizontal".
packages/@godaddy/antares/components/checkbox/checkbox.stories.tsx Updates Storybook controls/args to orientation.
packages/@godaddy/antares/components/button/src/index.module.css Lowers specificity using :where(:not(.inline)).
packages/@godaddy/antares/components/_internal/field/test/field.node.test.tsx Updates internal field primitive SSR tests from FieldFrame to FieldGroup.
packages/@godaddy/antares/components/_internal/field/test/field.browser.test.tsx Updates internal field primitive browser tests from FieldFrame to FieldGroup.
packages/@godaddy/antares/components/_internal/field/test/snapshots/field.node.test.tsx.snap Adds new snapshots for FieldGroup examples.
packages/@godaddy/antares/components/_internal/field/src/index.tsx Adds new internal primitives (Field, FieldLabel, FieldGroup, Input/TextArea, FieldButton, etc.).
packages/@godaddy/antares/components/_internal/field/src/index.module.css Adds shared field primitive styling, markers, sizing cascade, and state styles.
packages/@godaddy/antares/components/_internal/field/README.mdx Adds internal documentation for field primitives and composition model.
packages/@godaddy/antares/components/_internal/field/field.stories.tsx Adds Storybook stories for internal primitives (for development reference).
packages/@godaddy/antares/components/_internal/field/examples/trailing-control.tsx Adds internal example demonstrating trailing control composition.
packages/@godaddy/antares/components/_internal/field/examples/leading-control.tsx Adds internal example demonstrating leading control composition.
packages/@godaddy/antares/components/_internal/field/examples/icon-accessories.tsx Adds internal example demonstrating icon + button accessories.
packages/@godaddy/antares/components/_internal/field/examples/field-playground.tsx Adds playground wrapper for FieldGroup basic example.
packages/@godaddy/antares/components/_internal/field/examples/basic.tsx Adds basic composed example for Field primitives.
packages/@godaddy/antares/components/_internal/field-frame/test/snapshots/field-frame.node.test.tsx.snap Removes legacy FieldFrame snapshots.
packages/@godaddy/antares/components/_internal/field-frame/src/index.tsx Removes legacy FieldFrame implementation.
packages/@godaddy/antares/components/_internal/field-frame/src/index.module.css Removes legacy FieldFrame styling.
packages/@godaddy/antares/components/_internal/field-frame/README.mdx Removes legacy FieldFrame docs.
packages/@godaddy/antares/components/_internal/field-frame/field-frame.stories.tsx Removes legacy FieldFrame Storybook stories.
packages/@godaddy/antares/components/_internal/field-frame/examples/trailing-control.tsx Removes legacy FieldFrame example.
packages/@godaddy/antares/components/_internal/field-frame/examples/leading-control.tsx Removes legacy FieldFrame example.
packages/@godaddy/antares/components/_internal/field-frame/examples/icon-accessories.tsx Removes legacy FieldFrame example.
packages/@godaddy/antares/components/_internal/field-frame/examples/field-frame-playground.tsx Removes legacy FieldFrame playground example.
packages/@godaddy/antares/components/_internal/field-frame/examples/basic.tsx Removes legacy FieldFrame basic example.
.changeset/field-frame.md Adds changeset describing the refactor, new primitives, and breaking changes.

Comment thread packages/@godaddy/antares/components/select/src/index.tsx Outdated
Comment thread packages/@godaddy/antares/components/number-field/src/index.tsx Outdated
Comment thread packages/@godaddy/antares/components/checkbox/src/index.tsx
Comment thread packages/@godaddy/antares/components/_internal/field/README.mdx Outdated
@egaitan-godaddy

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

📸 Updating screenshots... View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Successfully updated and committed screenshots!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 89 out of 121 changed files in this pull request and generated 7 comments.

Comment thread packages/@godaddy/antares/components/listbox/src/index.tsx Outdated
Comment thread packages/@godaddy/antares/components/listbox/src/index.tsx Outdated
Comment thread packages/@godaddy/antares/components/select/src/index.tsx
Comment thread packages/@godaddy/antares/components/text-field/src/index.tsx Outdated
Comment thread packages/@godaddy/antares/components/number-field/src/index.tsx Outdated
Comment thread .changeset/field-frame.md Outdated
Comment thread packages/@godaddy/antares/components/_internal/field/README.mdx Outdated
egaitan-godaddy and others added 10 commits June 19, 2026 10:13
… RACTextFieldProps

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ts/field

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r with Select

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…des Promise)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…and FieldSelect

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@egaitan-godaddy

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

📸 Updating screenshots... View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

✅ No screenshot changes detected. Screenshots are already up to date.

egaitan-godaddy and others added 2 commits June 19, 2026 16:34
@egaitan-godaddy

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

Copy link
Copy Markdown
Contributor

📸 Updating screenshots... View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

🎉 Successfully updated and committed screenshots!

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.

2 participants