feat: react-combobox space conditionally inserts character when freeform is true#27025
Merged
smhigley merged 3 commits intomicrosoft:masterfrom Apr 26, 2023
Merged
feat: react-combobox space conditionally inserts character when freeform is true#27025smhigley merged 3 commits intomicrosoft:masterfrom
smhigley merged 3 commits intomicrosoft:masterfrom
Conversation
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: fa0f2ce25e94ddc8759f545638e01cc34e0e99f4 (build) |
Collaborator
📊 Bundle size report
Unchanged fixtures
|
Collaborator
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:
|
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
GeoffCoxMSFT
reviewed
Apr 6, 2023
packages/react-components/react-combobox/src/components/Combobox/useCombobox.tsx
Show resolved
Hide resolved
GeoffCoxMSFT
approved these changes
Apr 6, 2023
spmonahan
approved these changes
Apr 6, 2023
2 tasks
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Apr 27, 2023
* 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)
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Apr 27, 2023
* 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) ...
Collaborator
|
🎉 Handy links: |
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.

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)