Skip to content

feat(antares): add DateField component#201

Open
egaitan-godaddy wants to merge 22 commits into
mainfrom
feat/date-field
Open

feat(antares): add DateField component#201
egaitan-godaddy wants to merge 22 commits into
mainfrom
feat/date-field

Conversation

@egaitan-godaddy

@egaitan-godaddy egaitan-godaddy commented May 29, 2026

Copy link
Copy Markdown
Contributor
  • Adds the DateField component — a segmented date input (Year/Month/Day). This is the first date component of the date-components family (DatePicker, DateRangePicker, Calendar, RangeCalendar).
  • I18NProvider component re-exported from RAC, as it is useful for date components that need to manage locales.
  • Unlike I18NProvider, @internationalized/date is not re-exported because it is a date utilities package that RAC components already expect users to import directly, we are just following the same direction.
  • field-frame updates to fix inconsistences across font properties (font, line-height) in date-field, text-field and number-field along with screenshot updates.

Storybook preview

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented May 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: afd3583

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

@github-actions

github-actions Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

📚 Storybook Preview

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

Preview will be automatically deleted when this PR is closed.

@github-actions

Copy link
Copy Markdown
Contributor

Docs Site Preview

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

Preview will be automatically deleted when this PR is closed.

@egaitan-godaddy

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

📸 Updating screenshots... View workflow run

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🎉 Successfully updated and committed screenshots!

@egaitan-godaddy

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

📸 Updating screenshots... View workflow run

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🎉 Successfully updated and committed screenshots!

@egaitan-godaddy

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

📸 Updating screenshots... View workflow run

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🎉 Successfully updated and committed screenshots!

@egaitan-godaddy egaitan-godaddy marked this pull request as ready for review June 2, 2026 00:11
@egaitan-godaddy egaitan-godaddy requested a review from a team as a code owner June 2, 2026 00:11
Copilot AI review requested due to automatic review settings June 2, 2026 00:11

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

Adds a new DateField component to @godaddy/antares (a segmented Year/Month/Day date input built on react-aria-components), along with supporting exports, docs, and tests. It also updates the shared internal FieldFrame styling to normalize font-related behavior across field-based inputs (DateField/TextField/NumberField).

Changes:

  • Introduces DateField component implementation, styles, Storybook stories, examples, and README docs.
  • Adds comprehensive browser/node/visual tests (plus SSR snapshots) for DateField.
  • Updates FieldFrame CSS (font inheritance/line-height) and wires up public exports + dependency on @internationalized/date.

Reviewed changes

Copilot reviewed 23 out of 45 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
packages/@godaddy/antares/package.json Adds @internationalized/date dependency required for CalendarDate typing/usage.
packages/@godaddy/antares/index.ts Exposes DateField (and I18nProvider) from the public API surface.
packages/@godaddy/antares/exports/DateField.ts Adds subpath export for DateField (+ I18nProvider).
packages/@godaddy/antares/components/date-field/src/index.tsx Implements DateField wrapper around RAC DateField using FieldFrame.
packages/@godaddy/antares/components/date-field/src/index.module.css Adds DateField-specific layout/segment styling.
packages/@godaddy/antares/components/date-field/README.mdx Documents DateField usage, date typing (CalendarDate), and i18n expectations.
packages/@godaddy/antares/components/date-field/date-field.stories.tsx Adds Storybook stories for all examples + playground.
packages/@godaddy/antares/components/date-field/examples/basic.tsx Basic usage example.
packages/@godaddy/antares/components/date-field/examples/controlled.tsx Controlled value/onChange example.
packages/@godaddy/antares/components/date-field/examples/date-field-playground.tsx Storybook playground wrapper and args surface.
packages/@godaddy/antares/components/date-field/examples/disabled-required-readonly.tsx Demonstrates disabled/required/read-only states.
packages/@godaddy/antares/components/date-field/examples/form.tsx Demonstrates native form submission behavior via name.
packages/@godaddy/antares/components/date-field/examples/min-max.tsx Demonstrates minValue/maxValue bounds.
packages/@godaddy/antares/components/date-field/examples/with-default-value.tsx Demonstrates defaultValue initialization.
packages/@godaddy/antares/components/date-field/examples/with-description.tsx Demonstrates description helper text.
packages/@godaddy/antares/components/date-field/examples/with-error.tsx Demonstrates isInvalid + errorMessage.
packages/@godaddy/antares/components/date-field/examples/with-i18n.tsx Demonstrates I18nProvider locale overrides (LTR + RTL).
packages/@godaddy/antares/components/date-field/test/date-field.browser.test.tsx Adds interaction/state assertions for browser runtime.
packages/@godaddy/antares/components/date-field/test/date-field.node.test.tsx Adds SSR snapshot/assertion coverage for examples.
packages/@godaddy/antares/components/date-field/test/date-field.visual.test.tsx Adds screenshot coverage across example variants.
packages/@godaddy/antares/components/date-field/test/snapshots/date-field.node.test.tsx.snap Stores SSR snapshots for DateField examples.
packages/@godaddy/antares/components/_internal/field-frame/src/index.module.css Adjusts shared field frame font/line-height handling.
.changeset/date-field-component.md Publishes @godaddy/antares minor release notes for DateField.

Comment thread packages/@godaddy/antares/components/date-field/src/index.tsx

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 24 out of 46 changed files in this pull request and generated 3 comments.

Comment thread packages/@godaddy/antares/components/date-field/src/index.tsx
Comment thread packages/@godaddy/antares/components/date-field/src/index.tsx Outdated

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 25 out of 47 changed files in this pull request and generated 3 comments.

Comment thread packages/@godaddy/antares/components/date-field/src/index.tsx
Comment thread packages/@godaddy/antares/components/date-field/README.mdx
Comment thread packages/@godaddy/antares/components/_internal/field-frame/src/index.module.css Outdated

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 26 out of 48 changed files in this pull request and generated 2 comments.

Comment thread packages/@godaddy/antares/components/date-field/README.mdx
Comment thread .changeset/date-field-component.md Outdated
}

input.input {
padding-block: var(--sp-md);

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.

There is a small difference in the figma design. In padding top/bottom for TextArea is density * 1 and for TextField it is density * 2

Image Image

Comment on lines +98 to +99
>
{(segment) => <RACDateSegment segment={segment} className={styles.segment} />}

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.

To be consisten with other components, use a named function instead please

placeholderValue?: CalendarDate;

/** Helper text shown below the frame. */
description?: string;

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.

If I'm not wrong yo don't need to re-define again description, errormessage and lable because (as far as I know) the Docs Site would autoextract them from the inherited interface


export const Props = getComponentDocs(DateField);

export const Default = getStory(DateFieldBasicExample);

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.

In other stories file, this is named Basic

Basic = getStory(DateFieldBasicExample)


it('renders with-error example', function withError() {
const result = renderToString(withTestLocale(<DateFieldWithErrorExample />));
expect(result).toContain('data-invalid');

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.

in my opinion all node test should have toMatchSnapshot

gap="sm"
>
<Flex
as={RACDateInput}

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.

I think it would be useful to have the reference for this field. Can you please ad forwardRef

}

&[data-invalid] {
color: var(--color-feedback-critical-strong, #ae1302);

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.

here you are missing the legacy token

"@bento/icon": "^0.2.0",
"@bento/svg-parser": "^0.1.1",
"@bento/use-data-attributes": "^0.1.1",
"@internationalized/date": "^3.12.2",

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.

you are missing the package-lock.json changes associated to this change

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