-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat: react-combobox space conditionally inserts character when freeform is true #27025
Conversation
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: fa0f2ce25e94ddc8759f545638e01cc34e0e99f4 (build) |
📊 Bundle size report
Unchanged fixtures
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
InfoButton | mount | 22 | 20 | 5000 | Possible regression |
All results
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 697 | 735 | 5000 | |
Button | mount | 380 | 362 | 5000 | |
Field | mount | 1247 | 1259 | 5000 | |
FluentProvider | mount | 893 | 905 | 5000 | |
FluentProviderWithTheme | mount | 116 | 113 | 10 | |
FluentProviderWithTheme | virtual-rerender | 98 | 92 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 100 | 101 | 10 | |
InfoButton | mount | 22 | 20 | 5000 | Possible regression |
MakeStyles | mount | 1110 | 1134 | 50000 | |
Persona | mount | 2001 | 1994 | 5000 | |
SpinButton | mount | 1538 | 1572 | 5000 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1964974:
|
🕵 fluentuiv9 No visual regressions between this PR and main |
packages/react-components/react-combobox/src/components/Combobox/useCombobox.tsx
Show resolved
Hide resolved
* master: chore: enforce files naming to use .styles.ts [cxe-prg files] (microsoft#27707) chore: migrate to NodeJS v16 (microsoft#27711) remove react-avatar-context package (microsoft#27709) test: migrate all v9 libraries to use new conformance setup which improves test execution by approx 46% (microsoft#27669) chore: Add caret to react-datepicker-compat dependencies (microsoft#27671) test(fluentui/react): fix initial global leaks that were causing OOM issues (microsoft#27661) chore(react-utilities): simplifies useControllableState hook internals (microsoft#27702) chore: enforce files naming to use .styles.ts (microsoft#27698) feat: adds lazy loading example (microsoft#27587) feat: react-combobox space conditionally inserts character when freeform is true (microsoft#27025) chore(react-tree): updates useOpenItemsState internals (microsoft#27697) feat(tools): add conformance setup migration to migrate-converged-pkg generator (microsoft#27668) test: use `isolatedModules` for all ts-jest configs to lower memory footprint on CI (microsoft#27670) chore: bump @griffel/eslint-plugin & enable @griffel/hook-naming (microsoft#27687) feat(react-tree): makes useFlatTree generic (microsoft#27682) Enable export to codepen for charting library (microsoft#27539) Overflow: added useOverflowCount to exports (microsoft#27678) fix: Menu should not steal focus on re-render (microsoft#27688) feat(react-conformance): add new TS config api to be able to specify configName and configDir (microsoft#27664)
* feat/drawer-components: (28 commits) docs: update API feat: add style overrides for upcoming drawer components feat: add support to override drawer styles fix: prevent elements from stretching chore: upgrade devcontainer node version to 16 (microsoft#27716) fix: rename styles file to use the newer naming conventions test: add cypress tests for scroll positions chore: enforce files naming to use .styles.ts [cxe-prg files] (microsoft#27707) feat: add support to override drawer body styles chore: migrate to NodeJS v16 (microsoft#27711) remove react-avatar-context package (microsoft#27709) test: migrate all v9 libraries to use new conformance setup which improves test execution by approx 46% (microsoft#27669) chore: Add caret to react-datepicker-compat dependencies (microsoft#27671) test(fluentui/react): fix initial global leaks that were causing OOM issues (microsoft#27661) chore(react-utilities): simplifies useControllableState hook internals (microsoft#27702) chore: enforce files naming to use .styles.ts (microsoft#27698) feat: adds lazy loading example (microsoft#27587) feat: react-combobox space conditionally inserts character when freeform is true (microsoft#27025) chore(react-tree): updates useOpenItemsState internals (microsoft#27697) feat(tools): add conformance setup migration to migrate-converged-pkg generator (microsoft#27668) ...
🎉 Handy links: |
Previous Behavior
Out of the box, the space key always selected the current option.
New Behavior
Only for freeform comboboxes, a separate typing/not typing state is tracked, and when the user is typing the space key inserts a character instead of selecting an option. The conditions for this to happen are:
An example: if the user types "hello" and then space, the space character will be inserted. If the user types "hello" and then moves the text insertion character to "h" and presses space, the space character will also be inserted (since they didn't open the dropdown or navigate options since they last typed).
If the user types "hello" and then arrows through a few options and then presses space, the space key will select the highlighted option.
Non-freeform comboboxes do not change behavior and always use space to select.
Related Issue(s)