-
Notifications
You must be signed in to change notification settings - Fork 1
feat(date-field): integrate date controls with Field wiring #392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
IzumiSy
wants to merge
18
commits into
main
Choose a base branch
from
refactor/date-field-field-composition
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ccdac38
refactor(date-field): align date inputs with Field composition
IzumiSy b783da1
fix(date-field): restore semantic props and form validation
IzumiSy c1345e1
Merge branch 'main' into refactor/date-field-field-composition
IzumiSy d9bb279
Merge branch 'main' into refactor/date-field-field-composition
interacsean 80dbc54
refactor(date-field): drop Base UI field integration
IzumiSy 77e3677
refactor(date-field): drop proxy validity effects
IzumiSy c891a58
Merge branch 'main' into refactor/date-field-field-composition
IzumiSy eb230c6
refactor(date-field): narrow react imports
IzumiSy e53dcb5
fix(vite-app): tighten date picker demo typing
IzumiSy a2af364
test(date-field): restore standalone regression coverage
IzumiSy 090599b
test(date-field): restore test comments
IzumiSy 37e33bf
test: restore date-field tests from main baseline
IzumiSy 0ad0835
feat: integrate date controls with Field wiring
IzumiSy bc8a659
docs(date-field): clarify proxy input bridge
IzumiSy 7833711
Merge branch 'main' into refactor/date-field-field-composition
IzumiSy 344f611
Fix DatePicker popup focus and Field label wiring
IzumiSy 98fbc50
Refine date field docs and typing
IzumiSy 86abe76
Merge branch 'main' into refactor/date-field-field-composition
IzumiSy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| "@tailor-platform/app-shell": minor | ||
| --- | ||
|
|
||
| Refactor `DateField` / `DatePicker` to follow the same composition model as `Field`, `Select`, `Combobox`, and `Autocomplete`. | ||
|
|
||
| The date controls are now **control-first**: field chrome moved out of the control props and into `Field.Root` composition. | ||
|
|
||
| Breaking changes: | ||
|
|
||
| - `label`, `description`, and `errorMessage` were removed from `DateField` / `DatePicker`; compose them with `Field.Root`, `Field.Label`, `Field.Description`, and `Field.Error` instead. | ||
| - `hideTimeZone` was removed because it was unused. | ||
|
|
||
| `isInvalid` still remains a top-level prop for externally-controlled invalid styling, and the semantic date props (`isRequired`, `isDisabled`, `isReadOnly`, `minValue`, `maxValue`, `isDateUnavailable`) remain top-level and aligned with `Calendar`. | ||
|
|
||
| Before: | ||
|
|
||
| ```tsx | ||
| <DatePicker | ||
| label="Delivery date" | ||
| description="When should we ship your order?" | ||
| minValue={today(getLocalTimeZone())} | ||
| errorMessage={error} | ||
| isInvalid={!!error} | ||
| /> | ||
| ``` | ||
|
|
||
| After: | ||
|
|
||
| ```tsx | ||
| <Field.Root invalid={!!error}> | ||
| <Field.Label>Delivery date</Field.Label> | ||
| <DatePicker aria-label="Delivery date" minValue={today(getLocalTimeZone())} /> | ||
| <Field.Description>When should we ship your order?</Field.Description> | ||
| <Field.Error match={!!error}>{error}</Field.Error> | ||
| </Field.Root> | ||
| ``` | ||
|
|
||
| Standalone usage still works with accessible naming: | ||
|
|
||
| ```tsx | ||
| <DateField aria-label="Invoice date" /> | ||
| ``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this flipped for native HTML
form?Our real form pages would use RHF
FormWhen restoring this, we encounter a runtime error
(Also occurs when a non-null defaultValue is provided)