Skip to content

Select spec#20564

Merged
smhigley merged 3 commits into
microsoft:masterfrom
smhigley:react-select-spec
Jan 26, 2022
Merged

Select spec#20564
smhigley merged 3 commits into
microsoft:masterfrom
smhigley:react-select-spec

Conversation

@smhigley

Copy link
Copy Markdown
Contributor

Pull request checklist

Description of changes

Adds a package and spec for Select, though the implementation itself is still a draft/lacks styles.

@fabricteam

fabricteam commented Nov 10, 2021

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

🤖 This report was generated against 131c59c96177944b46ac63905a592f22e20ec67c

@codesandbox-ci

codesandbox-ci Bot commented Nov 10, 2021

Copy link
Copy Markdown

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 96cec0b:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor

size-auditor Bot commented Nov 10, 2021

Copy link
Copy Markdown

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 131c59c96177944b46ac63905a592f22e20ec67c (build)

@fabricteam

fabricteam commented Nov 10, 2021

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
Avatar mount 1115 1128 5000
BaseButton mount 1214 1213 5000
Breadcrumb mount 2860 2967 1000
ButtonNext mount 755 714 5000
Checkbox mount 1851 1865 5000
CheckboxBase mount 1623 1567 5000
ChoiceGroup mount 5598 5592 5000
ComboBox mount 1215 1268 1000
CommandBar mount 11274 11025 1000
ContextualMenu mount 9328 9416 1000
DefaultButton mount 1465 1458 5000
DetailsRow mount 4385 4398 5000
DetailsRowFast mount 4346 4434 5000
DetailsRowNoStyles mount 4318 4237 5000
Dialog mount 2956 3022 1000
DocumentCardTitle mount 347 329 1000
Dropdown mount 3704 3819 5000
FluentProviderNext mount 2002 1977 5000
FluentProviderWithTheme mount 335 319 10
FluentProviderWithTheme virtual-rerender 247 274 10
FluentProviderWithTheme virtual-rerender-with-unmount 343 341 10
FocusTrapZone mount 2116 2164 5000
FocusZone mount 2193 2173 5000
IconButton mount 2171 2186 5000
Label mount 550 548 5000
Layer mount 3548 3457 5000
Link mount 750 702 5000
MakeStyles mount 2138 2150 50000
MenuButton mount 1839 1874 5000
MessageBar mount 2356 2331 5000
Nav mount 3762 3819 1000
OverflowSet mount 1390 1472 5000
Panel mount 2855 2788 1000
Persona mount 1107 1094 1000
Pivot mount 1716 1719 1000
PrimaryButton mount 1608 1620 5000
Rating mount 8967 9027 5000
SearchBox mount 1735 1698 5000
Shimmer mount 3168 3048 5000
Slider mount 2314 2390 5000
SpinButton mount 5964 5773 5000
Spinner mount 665 627 5000
SplitButton mount 3714 3718 5000
Stack mount 742 719 5000
StackWithIntrinsicChildren mount 2118 2174 5000
StackWithTextChildren mount 5512 5529 5000
SwatchColorPicker mount 11801 11740 5000
TagPicker mount 3104 3147 5000
TeachingBubble mount 13918 14289 5000
Text mount 662 629 5000
TextField mount 1691 1697 5000
ThemeProvider mount 1406 1420 5000
ThemeProvider virtual-rerender 814 806 5000
ThemeProvider virtual-rerender-with-unmount 2219 2188 5000
Toggle mount 1129 1113 5000
buttonNative mount 308 281 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ImageMinimalPerf.default 461 425 1.08:1
AttachmentSlotsPerf.default 1273 1185 1.07:1
ListMinimalPerf.default 620 581 1.07:1
AttachmentMinimalPerf.default 191 181 1.06:1
BoxMinimalPerf.default 418 395 1.06:1
RefMinimalPerf.default 271 256 1.06:1
SliderMinimalPerf.default 1862 1763 1.06:1
TreeMinimalPerf.default 953 899 1.06:1
AlertMinimalPerf.default 327 312 1.05:1
DatepickerMinimalPerf.default 6396 6092 1.05:1
GridMinimalPerf.default 408 389 1.05:1
InputMinimalPerf.default 1425 1354 1.05:1
TableMinimalPerf.default 468 447 1.05:1
ButtonSlotsPerf.default 646 624 1.04:1
FormMinimalPerf.default 491 471 1.04:1
MenuMinimalPerf.default 996 954 1.04:1
PortalMinimalPerf.default 198 190 1.04:1
AvatarMinimalPerf.default 235 228 1.03:1
ChatDuplicateMessagesPerf.default 345 335 1.03:1
LabelMinimalPerf.default 457 443 1.03:1
RosterPerf.default 1359 1322 1.03:1
ReactionMinimalPerf.default 445 433 1.03:1
IconMinimalPerf.default 725 703 1.03:1
ButtonOverridesMissPerf.default 1915 1882 1.02:1
ChatMinimalPerf.default 753 737 1.02:1
CheckboxMinimalPerf.default 3021 2968 1.02:1
DividerMinimalPerf.default 429 421 1.02:1
FlexMinimalPerf.default 337 332 1.02:1
ItemLayoutMinimalPerf.default 1419 1385 1.02:1
LoaderMinimalPerf.default 757 744 1.02:1
PopupMinimalPerf.default 664 648 1.02:1
RadioGroupMinimalPerf.default 532 520 1.02:1
TableManyItemsPerf.default 2231 2197 1.02:1
TooltipMinimalPerf.default 1194 1171 1.02:1
ButtonMinimalPerf.default 203 200 1.01:1
DropdownManyItemsPerf.default 806 795 1.01:1
DropdownMinimalPerf.default 3280 3255 1.01:1
EmbedMinimalPerf.default 4626 4587 1.01:1
HeaderSlotsPerf.default 885 879 1.01:1
ListWith60ListItems.default 754 746 1.01:1
ProviderMergeThemesPerf.default 1852 1838 1.01:1
ProviderMinimalPerf.default 1282 1274 1.01:1
StatusMinimalPerf.default 790 785 1.01:1
CustomToolbarPrototype.default 4582 4543 1.01:1
ToolbarMinimalPerf.default 1097 1091 1.01:1
CardMinimalPerf.default 632 632 1:1
ChatWithPopoverPerf.default 417 419 1:1
DialogMinimalPerf.default 846 845 1:1
SegmentMinimalPerf.default 416 416 1:1
SkeletonMinimalPerf.default 418 416 1:1
CarouselMinimalPerf.default 525 532 0.99:1
HeaderMinimalPerf.default 424 428 0.99:1
LayoutMinimalPerf.default 417 420 0.99:1
TextMinimalPerf.default 393 395 0.99:1
AnimationMinimalPerf.default 496 505 0.98:1
MenuButtonMinimalPerf.default 1888 1924 0.98:1
VideoMinimalPerf.default 736 752 0.98:1
ListCommonPerf.default 711 736 0.97:1
SplitButtonMinimalPerf.default 4846 5016 0.97:1
TextAreaMinimalPerf.default 607 624 0.97:1
TreeWith60ListItems.default 211 218 0.97:1
ListNestedPerf.default 641 669 0.96:1
AccordionMinimalPerf.default 183 201 0.91:1

- _**Public**_

```tsx
<label htmlFor="selectID">Choose a color</label>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you expect that Field will handle providing a label for the Select in the future for forms scenarios?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup! As I understand, that's the plan, which is why I left it out of Select. The example code is essentially showing how one would use Select in isolation (and also b/c we don't have a Field component yet).

@varholak-peter

Copy link
Copy Markdown
Contributor

@smhigley could you please split this into smaller PRs? Right now it seems that this PR includes bootstrapping of the component, some work on spec and some work on preliminary implementation.

I'd like to avoid blockers caused by incomplete implementation or other unrelated parts.

@smhigley

smhigley commented Dec 2, 2021

Copy link
Copy Markdown
Contributor Author

@varholak-peter just removed the implementation from this PR :)

@smhigley

smhigley commented Dec 7, 2021

Copy link
Copy Markdown
Contributor Author

Here's the separate PR for the Select component itself: #20944

@varholak-peter varholak-peter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🇯🇵


### Children

Children of the `Select` component are rendered as children of the internal `<select>` element. The only children that are supported in practice are the `<optgroup>` and `<option>` elements.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there plan to add SelectOption / SelectOptionGroup? If no, can you please add clarification to the spec?

@smhigley smhigley merged commit 05da13b into microsoft:master Jan 26, 2022
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.

6 participants