Skip to content

Conversation

@spmonahan
Copy link
Contributor

Previous Behavior

Option's checkIcon slot is nullable according to the types but the render code does not null-check the slot so code like

<Option checkIcon={null}>...

leads to a runtime error.

New Behavior

Options render code null checks the slot.
Tests added to verify the behavior.

The type for `checkIcon` is nullable but the render function
did not null check the slot so passing `null` to the
slot caused a runtime error.

Adds tests to verify the behavior.
@spmonahan spmonahan requested review from a team and smhigley as code owners March 31, 2023 22:06
@github-actions github-actions bot added this to the March Project Cycle Q1 2023 milestone Mar 31, 2023
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 31, 2023

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

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

@size-auditor
Copy link

size-auditor bot commented Mar 31, 2023

Asset size changes

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

Baseline commit: cb6569b754d05385466021717a283bdead3f3f34 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 31, 2023

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-combobox
Combobox (including child components)
88.73 kB
28.105 kB
88.743 kB
28.107 kB
13 B
2 B
react-combobox
Dropdown (including child components)
87.428 kB
27.853 kB
87.441 kB
27.855 kB
13 B
2 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-combobox
ComboboxField
85.147 kB
27.871 kB
react-components
react-components: Button, FluentProvider & webLightTheme
67.994 kB
18.395 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
207.512 kB
57.555 kB
react-components
react-components: FluentProvider & webLightTheme
38.819 kB
12.351 kB
react-portal-compat
PortalCompatProvider
6.446 kB
2.185 kB
🤖 This report was generated against cb6569b754d05385466021717a283bdead3f3f34

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 31, 2023

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 936 925 5000
Button mount 597 610 5000
Field mount 1714 1718 5000
FluentProvider mount 1207 1222 5000
FluentProviderWithTheme mount 313 319 10
FluentProviderWithTheme virtual-rerender 294 288 10
FluentProviderWithTheme virtual-rerender-with-unmount 320 328 10
InfoButton mount 218 215 5000
MakeStyles mount 1356 1310 50000
Persona mount 2312 2244 5000
SpinButton mount 2030 2027 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 31, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@spmonahan spmonahan merged commit 83c18ac into microsoft:master Apr 3, 2023
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Apr 4, 2023
* master: (39 commits)
  Added merge tests for custom styles (microsoft#27086)
  fix: make Option's checkIcon slot render conditionally (microsoft#27409)
  docs: add subcomponents to Combobox and Dropdown docs (microsoft#27410)
  Breadcrumb spec (microsoft#26742)
  bugfix(react-utilities): increments SlotRenderFunction signature to include children (microsoft#27377)
  fix: Menu should not steal focus on close (microsoft#27414)
  Fixed Overflow component when there's more then one children element (microsoft#27402)
  feat(scripts-executors): support custom base and printing all affected packages for checkIfPackagesAffected (microsoft#27364)
  applying package updates
  feat(scripts-tasks): make perf test setup generic (microsoft#26920)
  fix: ColorPicker preview color updated to ignore forced colors (microsoft#27394)
  fix: Fix babel build error on windows (microsoft#27406)
  chore(react-datepicker-compat): Add vr-tests and bundle-size fixtures for DatePicker (microsoft#27351)
  fix(react-dialog): DialogContent scrollbar always visible (microsoft#27367)
  docs: Add tokens search (microsoft#27265)
  chore(scripts-tasks): remove not needed api-extractor task logs (microsoft#27094)
  chore(react-tree): adds e2e flat tree tests (microsoft#27318)
  applying package updates
  Accessibility fix for empty vertical bar chart (microsoft#26254)
  fix(react-datepicker-compat): Fix theming issues with all themes and WHCM (microsoft#27361)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants