fix: preserve alternate format input while typing - #1008
Conversation
|
@nrps9909 is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. Walkthrough组件新增输入文本保留判断。输入状态统一通过更新函数维护。日期选择器现在支持在短日期格式匹配时继续输入四位年份,并验证受控值变化行为。 Changes输入值保留流程
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The picker preserves equivalent alternate-format text while typing while continuing to apply different controlled date updates normally. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Regression
With
format={['DD-MM-YYYY', 'DD-MM-YY']}, exact base16084b6a1593d8815a6ae65cba4e6f7ce8d48c9arewrites the typed prefix01-12-20to01-12-2020, preventing normal continuation to a four-digit year.The new regression types
01-12-2024character by character, asserts that the ambiguous short prefix remains untouched, submits the completed value, and then verifies that a controlled update to a different date still replaces the input.Validation
Overlap audit
Current open PRs #1005, #1006, #986, and #947 touch one or more of the same selector files for Android IME handling, manual clearing, or keyboard semantics. None addresses alternate-format input normalization or the
YY/YYYYboundary. This PR stays scoped to that distinct state-synchronization behavior.Fixes #956.
Related to #911.
AI assistance disclosure: Codex was used to trace the input/value synchronization path, construct the causal regression, run the validation matrix, audit open changed-file overlap, and draft this description. I verified the base failure, head behavior, test results, diff, and signed commit before submission.
Summary by CodeRabbit