feat(date-picker): add restartable range selection#202
Open
singkia wants to merge 2 commits intocloudflare:mainfrom
Open
feat(date-picker): add restartable range selection#202singkia wants to merge 2 commits intocloudflare:mainfrom
singkia wants to merge 2 commits intocloudflare:mainfrom
Conversation
Collaborator
|
Before we run the workflows on this PR do you mind updating all comments from Chinese into English so we can evaluate the text easier and also for the sake of consistency with the rest of the repository? :) |
Add an opt-in restart mode for range pickers so popover flows treat the next click after a completed range as a new draft instead of mutating the previous selection. Expose an onRangeComplete callback, add regression coverage, update the docs demos, and record the module changeset/documentation.
Remove the PR-specific CLAUDE.md file and file-level protocol headers from the date-picker changes so the branch stays aligned with the repository's normal documentation style.
72433e3 to
266c779
Compare
Contributor
Author
|
Updated. I removed the Chinese comments / PR-specific documentation scaffolding for consistency with the rest of the repo, rebased the branch onto current main, and re-ran the relevant local checks. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
rangeSelectionBehavior="restart"mode forDatePickerrange selectiononRangeCompleteso popover-based range pickers can close after the second clickWhy
Popover range pickers should behave like a bounded form interaction: first click starts a draft, second click confirms the range, and the next click after completion should start a new draft instead of mutating the previously confirmed range.
Verification
pnpm --dir packages/kumo exec oxlint --config .oxlintrc.json src/components/date-picker/date-picker.tsx src/components/date-picker/date-picker.test.tsx --type-awarepnpm --dir packages/kumo exec eslint src/components/date-picker/date-picker.tsx src/components/date-picker/date-picker.test.tsx src/components/date-picker/index.ts src/index.tspnpm --filter @cloudflare/kumo exec vitest run --project=unit src/components/date-picker/date-picker.test.tsxpnpm --filter @cloudflare/kumo buildNotes
pnpm --filter @cloudflare/kumo-docs-astro exec astro checkstill reports unrelated existingechartstype errors outside the DatePicker docs files.