feat: support search input autocomplete overrides - #1250
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)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughSelect 为搜索输入框新增可配置的 ChangesSelect autoComplete 支持
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR adds an opt-in autocomplete override for the Select search input while preserving the existing default behavior and keeping the attribute off the Select root. With the documented tests and validation passing, no actionable merge-blocking risk remains. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files. (1 skipped: 1 unsupported.)
✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1250 +/- ##
=======================================
Coverage 99.46% 99.46%
=======================================
Files 31 31
Lines 1304 1304
Branches 451 473 +22
=======================================
Hits 1297 1297
Misses 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
248073f to
cb4c9a3
Compare
cb4c9a3 to
103e4a9
Compare
Summary
autoCompleteas a public Select prop and forward it only to the internal search inputnew-passwordas the default to retain Chromium native-autocomplete suppressionoffpathsThe input remains
type="text"withrole="combobox", preserving the ARIA correction from #1222. Applications affected by password-manager UI can now opt intoautoComplete="off"without a TypeScript error or leaking the attribute onto the Select root, while existing consumers retain the established fallback.Closes #1249.
Closes #768.
Verification
29e9ddac1b8eb3dba4a6681d7c886b542a9d7425: the explicit override regression failed becauseautoComplete="off"did not reach the input, which still renderednew-passwordSelect.test.tsx: 110 tests and 5 snapshots passedgit diff --checkpassedThe initial revision proposed changing the global default to
off. Based on maintainer review and the history in #538/#1222, this revision deliberately retainsnew-passwordand narrows the change to an opt-in override.AI assistance disclosure: Codex was used to trace the input prop flow and prior changes, check for duplicate work, implement the regression coverage, and run the validation. I verified the cited behavior locally against the exact commits.
Summary by CodeRabbit
新功能
autoComplete配置,可自定义搜索输入框的浏览器自动补全行为。new-password,抑制浏览器自动补全提示。文档
autoComplete属性的类型、用途及默认值说明。