Skip to content

Add 'allowParentArrowNavigation' prop to ComboBox.#31805

Merged
spmonahan merged 3 commits into
microsoft:masterfrom
spmonahan:feat/combobox-navigation
Jun 25, 2024
Merged

Add 'allowParentArrowNavigation' prop to ComboBox.#31805
spmonahan merged 3 commits into
microsoft:masterfrom
spmonahan:feat/combobox-navigation

Conversation

@spmonahan

Copy link
Copy Markdown
Contributor

Previous Behavior

When using ComboBox inside DetailsList arrow navigation would get stuck on ComboBox. This is because the code would hit this break and then call stopPropagation() and preventDefault() on the keyboard event, preventing navigation.

New Behavior

This PR introduces a new prop allowing users to opt in to a behavior that will skip the calls to stopPropagation() and preventDefault().

Related Issue(s)

Allows parent controls like DetailsList to use arrow
navigation with Comboboxes.
Comment thread packages/react/src/components/ComboBox/ComboBox.tsx
@fabricteam

fabricteam commented Jun 24, 2024

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react
ComboBox
251.774 kB
72.184 kB
251.89 kB
72.222 kB
116 B
38 B
react
Fluent UI React (entire library)
1.013 MB
281.385 kB
1.013 MB
281.426 kB
118 B
41 B
react
TimePicker
241.578 kB
69.953 kB
241.694 kB
69.983 kB
116 B
30 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react
ActivityItem
71.147 kB
23.33 kB
react
Announced
38.419 kB
13.288 kB
react
Autofill
15.365 kB
4.743 kB
react
Breadcrumb
202.005 kB
60.362 kB
react
Button
195.473 kB
56.558 kB
react
ButtonGrid
180.416 kB
54.61 kB
react
Calendar
121.67 kB
36.976 kB
react
Callout
84.236 kB
27.607 kB
react
Check
53.091 kB
17.837 kB
react
Checkbox
59.879 kB
19.865 kB
react
ChoiceGroup
65.404 kB
21.469 kB
react
ChoiceGroupOption
58.659 kB
19.356 kB
react
Coachmark
93.065 kB
29.412 kB
react
Color
7.737 kB
3.106 kB
react
ColorPicker
133.113 kB
41.536 kB
react
CommandBar
203.042 kB
60.075 kB
react
ContextualMenu
154.998 kB
48.158 kB
react
DatePicker
184.067 kB
56.121 kB
react
DateTimeUtilities
5.244 kB
1.849 kB
react
DetailsList
229.445 kB
65.681 kB
react
Dialog
211.329 kB
63.082 kB
react
Divider
19.531 kB
6.862 kB
react
DocumentCard
217.014 kB
64.363 kB
react
DragDrop
8.343 kB
2.724 kB
react
DraggableZone
34.241 kB
11.491 kB
react
Dropdown
233.935 kB
68.547 kB
react
ExtendedPicker
96.693 kB
27.85 kB
react
Fabric
41.665 kB
14.358 kB
react
Facepile
210.59 kB
63.132 kB
react
FloatingPicker
242.06 kB
68.931 kB
react
FocusTrapZone
16.979 kB
5.921 kB
react
FocusZone
54.972 kB
17.442 kB
react
Grid
180.416 kB
54.61 kB
react
GroupedList
134.762 kB
40.629 kB
react
GroupedListV2
122.379 kB
37.737 kB
react
HoverCard
97.097 kB
30.782 kB
react
Icon
51.772 kB
17.252 kB
react
Icons
66.309 kB
24.381 kB
react
Image
46.829 kB
15.701 kB
react
Keytip
81.61 kB
26.75 kB
react
KeytipData
13.973 kB
4.573 kB
react
KeytipLayer
103.406 kB
32.004 kB
react
Keytips
106.174 kB
33.006 kB
react
Label
38.266 kB
13.244 kB
react
Layer
48.015 kB
16.337 kB
react
Link
39.616 kB
13.649 kB
react
List
39.304 kB
12.441 kB
react
MarqueeSelection
74.449 kB
22.441 kB
react
MessageBar
190.52 kB
57.042 kB
react
Modal
93.568 kB
30.235 kB
react
Nav
187.998 kB
56.464 kB
react
OverflowSet
33.319 kB
11.317 kB
react
Overlay
40.822 kB
14.083 kB
react
Panel
201.04 kB
59.952 kB
react
Persona
114.745 kB
36.478 kB
react
PersonaCoin
114.745 kB
36.478 kB
react
PersonaPresence
57.961 kB
19.359 kB
react
Pickers
293.75 kB
82.262 kB
react
Pivot
188.912 kB
57.213 kB
react
Popup
12.242 kB
4.181 kB
react
Positioning
22.736 kB
7.685 kB
react
PositioningContainer
73.775 kB
23.762 kB
react
ProgressIndicator
39.414 kB
13.548 kB
react
Rating
81.89 kB
26.097 kB
react
ResizeGroup
13.286 kB
4.365 kB
react
ResponsiveMode
8.078 kB
2.95 kB
react
ScrollablePane
55.457 kB
17.735 kB
react
SearchBox
188.795 kB
56.649 kB
react
SelectableOption
724 B
413 B
react
SelectedItemsList
232.559 kB
67.863 kB
react
Selection
42.38 kB
12.255 kB
react
Separator
35.315 kB
12.157 kB
react
Shimmer
49.177 kB
16.256 kB
react
ShimmeredDetailsList
240.22 kB
68.444 kB
react
Slider
57.577 kB
19.194 kB
react
SpinButton
192.523 kB
57.748 kB
react
Spinner
41.609 kB
14.458 kB
react
Stack
41.675 kB
14.283 kB
react
Sticky
32.541 kB
10.49 kB
react
Styling
45.981 kB
15.121 kB
react
SwatchColorPicker
190.742 kB
58.094 kB
react
TeachingBubble
205.795 kB
60.984 kB
react
Text
36.851 kB
12.828 kB
react
TextField
80.683 kB
25.303 kB
react
Theme
43.449 kB
14.169 kB
react
ThemeGenerator
12.34 kB
4.106 kB
react
Toggle
46.148 kB
15.96 kB
react
Tooltip
87.264 kB
28.207 kB
react
Utilities
82.623 kB
25.106 kB
react
Viewport
23.831 kB
7.638 kB
react
WeeklyDayPicker
101.814 kB
31.796 kB
react
WindowProvider
1.059 kB
541 B
🤖 This report was generated against e53f719a894a85ee35e2d8c3a535a9ce040dec3e

Comment thread change/@fluentui-react-4c9ebee6-1e61-4e67-87f3-50ef560ab2dc.json
@fabricteam

fabricteam commented Jun 24, 2024

Copy link
Copy Markdown
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 639 627 5000
Breadcrumb mount 1710 1659 1000
Checkbox mount 1734 1731 5000
CheckboxBase mount 1503 1503 5000
ChoiceGroup mount 2999 2953 5000
ComboBox mount 680 688 1000
CommandBar mount 6627 6607 1000
ContextualMenu mount 13081 13248 1000
DefaultButton mount 816 808 5000
DetailsRow mount 2280 2224 5000
DetailsRowFast mount 2230 2215 5000
DetailsRowNoStyles mount 2047 2091 5000
Dialog mount 2707 2620 1000
DocumentCardTitle mount 221 234 1000
Dropdown mount 2024 2037 5000
FocusTrapZone mount 1163 1151 5000
FocusZone mount 1090 1091 5000
GroupedList mount 38197 42582 2
GroupedList virtual-rerender 20208 20426 2
GroupedList virtual-rerender-with-unmount 51821 51321 2
GroupedListV2 mount 230 232 2
GroupedListV2 virtual-rerender 206 214 2
GroupedListV2 virtual-rerender-with-unmount 225 231 2
IconButton mount 1145 1130 5000
Label mount 340 350 5000
Layer mount 2779 2814 5000
Link mount 411 394 5000
MenuButton mount 959 1008 5000
MessageBar mount 21881 21826 5000
Nav mount 2046 2023 1000
OverflowSet mount 798 782 5000
Panel mount 1844 1818 1000
Persona mount 767 736 1000
Pivot mount 893 907 1000
PrimaryButton mount 937 945 5000
Rating mount 4772 4658 5000
SearchBox mount 934 935 5000
Shimmer mount 1902 1905 5000
Slider mount 1370 1351 5000
SpinButton mount 2981 2999 5000
Spinner mount 400 395 5000
SplitButton mount 1915 1860 5000
Stack mount 422 435 5000
StackWithIntrinsicChildren mount 854 866 5000
StackWithTextChildren mount 2793 2775 5000
SwatchColorPicker mount 6449 6429 5000
TagPicker mount 1473 1450 5000
Text mount 379 375 5000
TextField mount 943 977 5000
ThemeProvider mount 857 856 5000
ThemeProvider virtual-rerender 584 588 5000
ThemeProvider virtual-rerender-with-unmount 1289 1333 5000
Toggle mount 626 606 5000
buttonNative mount 191 188 5000

@spmonahan
spmonahan merged commit 9de8ede into microsoft:master Jun 25, 2024
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Jun 26, 2024
* master: (90 commits)
  fix(react-drawer): do not create global header/footer roles (microsoft#31799)
  release: applying package updates - react v8
  release: applying package updates - web-components
  Add 'allowParentArrowNavigation' prop to `ComboBox`. (microsoft#31805)
  Add drawer web component (microsoft#31521)
  fix: MenuButton is styled correctly when aria-expanded is a string (microsoft#31809)
  chore: Updating version of `@fluentui/react-icons` to `^2.0.245` (microsoft#31802)
  chore:(docs) Migrate e2e Cypress testing doc (microsoft#31796)
  chore:(docs) Update API Extractor file (microsoft#31651)
  chore: migrate to nx 18 (microsoft#31746)
  release: applying package updates - react v8
  release: applying package updates - web-components
  feat: update text to use element internals for custom states (microsoft#31770)
  chore(web-components): Remove define imports from story modules (microsoft#31622)
  fix(`merge-styles`): Correctly processing selectors when value is a class name and they are not wrapped in `selectors` wrapper (microsoft#31798)
  style(react-combobox): turn off react-compiler lints for non compliant code (microsoft#31795)
  docs: Add AriaLiveAnnouncer to all examples (microsoft#31794)
  fix(public-docsite-v9): disable storybook keyboard shortcuts (microsoft#31762)
  feat: V0 Attachment compact component (microsoft#31634)
  release: applying package updates - react v8
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Combobox Keyboard Navigation Bug in DetailsList

3 participants