Skip to content

Conversation

@bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented Sep 27, 2023

Previous Behavior

The getNativeElementProps has some type safety issues, allowing erroneous properties to be introduced.

New Behavior

  1. creates a method to replace getNativeElementProps on slot creation (getIntrinsicElementProps)

Related Issue(s)

@bsunderhus bsunderhus self-assigned this Sep 27, 2023
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 27, 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 cfc6394:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 27, 2023

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
InfoButton mount 13 18 5000 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 655 609 5000
Button mount 310 313 5000
Field mount 1122 1106 5000
FluentProvider mount 697 708 5000
FluentProviderWithTheme mount 80 86 10
FluentProviderWithTheme virtual-rerender 62 59 10
FluentProviderWithTheme virtual-rerender-with-unmount 76 70 10
InfoButton mount 13 18 5000 Possible regression
MakeStyles mount 831 864 50000
Persona mount 1746 1688 5000
SpinButton mount 1339 1336 5000

@bsunderhus bsunderhus marked this pull request as ready for review September 27, 2023 08:46
@bsunderhus bsunderhus requested a review from a team as a code owner September 27, 2023 08:46
@bsunderhus bsunderhus force-pushed the react-utilities/feat--getIntrinsicElementProps branch from 68b8dab to 30d6eaf Compare September 27, 2023 08:54
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 27, 2023

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
510 B
330 B
global-context
createContextSelector
537 B
342 B
react-accordion
Accordion (including children components)
91.684 kB
28.007 kB
react-alert
Alert
83.657 kB
22.915 kB
react-avatar
Avatar
49.185 kB
15.491 kB
react-avatar
AvatarGroup
18.716 kB
7.458 kB
react-avatar
AvatarGroupItem
63.841 kB
19.834 kB
react-badge
Badge
25.921 kB
8.354 kB
react-badge
CounterBadge
26.822 kB
8.657 kB
react-badge
PresenceBadge
24.327 kB
8.867 kB
react-button
Button
39.444 kB
10.738 kB
react-button
CompoundButton
46.799 kB
12.233 kB
react-button
MenuButton
44.218 kB
12.12 kB
react-button
SplitButton
52.232 kB
13.705 kB
react-button
ToggleButton
56.49 kB
12.641 kB
react-card
Card - All
91.484 kB
26.485 kB
react-card
Card
86.31 kB
24.946 kB
react-card
CardFooter
12.074 kB
5.034 kB
react-card
CardHeader
14.323 kB
5.8 kB
react-card
CardPreview
13.031 kB
5.404 kB
react-checkbox
Checkbox
35.959 kB
11.852 kB
react-combobox
Combobox (including child components)
90.121 kB
29.441 kB
react-combobox
Dropdown (including child components)
88.561 kB
29.081 kB
react-components
react-components: Button, FluentProvider & webLightTheme
69.227 kB
19.584 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
206.783 kB
59.085 kB
react-components
react-components: FluentProvider & webLightTheme
40.793 kB
13.521 kB
react-datepicker-compat
DatePicker Compat
210.557 kB
58.665 kB
react-dialog
Dialog (including children components)
88.307 kB
26.334 kB
react-divider
Divider
19.836 kB
7.392 kB
react-field
Field
21.443 kB
8.194 kB
react-image
Image
14.752 kB
5.875 kB
react-infobutton
InfoButton
128.844 kB
40.576 kB
react-infobutton
InfoLabel
132.535 kB
41.752 kB
react-input
Input
25.97 kB
8.77 kB
react-jsx-runtime
Classic Pragma
1.049 kB
531 B
react-jsx-runtime
JSX Dev Runtime
2.874 kB
1.307 kB
react-jsx-runtime
JSX Runtime
3.46 kB
1.542 kB
react-label
Label
13.159 kB
5.416 kB
react-link
Link
15.983 kB
6.492 kB
react-menu
Menu (including children components)
138.755 kB
42.86 kB
react-menu
Menu (including selectable components)
141.441 kB
43.37 kB
react-overflow
hooks only
12.419 kB
4.687 kB
react-persona
Persona
56.076 kB
17.369 kB
react-popover
Popover
117.589 kB
37.101 kB
react-portal
Portal
12.255 kB
4.504 kB
react-portal-compat
PortalCompatProvider
6.48 kB
2.203 kB
react-positioning
usePositioning
25.137 kB
9.109 kB
react-progress
ProgressBar
16.448 kB
6.545 kB
react-provider
FluentProvider
21.338 kB
7.945 kB
react-radio
Radio
29.72 kB
9.802 kB
react-radio
RadioGroup
14.355 kB
5.913 kB
react-select
Select
27.692 kB
9.849 kB
react-slider
Slider
36.87 kB
12.141 kB
react-spinbutton
SpinButton
35.857 kB
11.426 kB
react-spinner
Spinner
22.412 kB
8.118 kB
react-switch
Switch
32.179 kB
10.437 kB
react-table
DataGrid
155.92 kB
43.463 kB
react-table
Table (Primitives only)
42.715 kB
13.341 kB
react-table
Table as DataGrid
129.19 kB
34.771 kB
react-table
Table (Selection only)
74.557 kB
20.071 kB
react-table
Table (Sort only)
73.164 kB
19.67 kB
react-tags-preview
InteractionTag
14.275 kB
5.717 kB
react-tags-preview
Tag
28.998 kB
9.061 kB
react-tags-preview
TagGroup
72.507 kB
21.605 kB
react-text
Text - Default
15.766 kB
6.23 kB
react-text
Text - Wrappers
18.944 kB
6.551 kB
react-textarea
Textarea
30.03 kB
10.129 kB
react-toast
Toast (including Toaster)
91.124 kB
27.293 kB
react-tooltip
Tooltip
50.859 kB
17.955 kB
react-utilities
SSRProvider
180 B
159 B
🤖 This report was generated against 1e6d0bf0333df2443ccc842f002ba7f073b124bb

@bsunderhus bsunderhus force-pushed the react-utilities/feat--getIntrinsicElementProps branch from 30d6eaf to 2967661 Compare September 27, 2023 09:01
@size-auditor
Copy link

size-auditor bot commented Sep 27, 2023

Asset size changes

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

Baseline commit: 1e6d0bf0333df2443ccc842f002ba7f073b124bb (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 27, 2023

🕵 fluentuiv9 No visual regressions between this PR and main

@bsunderhus bsunderhus force-pushed the react-utilities/feat--getIntrinsicElementProps branch from 2967661 to bbfb27d Compare September 27, 2023 13:49
@bsunderhus bsunderhus requested a review from behowell September 29, 2023 09:15
@bsunderhus bsunderhus force-pushed the react-utilities/feat--getIntrinsicElementProps branch from bbfb27d to 16baf60 Compare September 29, 2023 09:27
@bsunderhus bsunderhus requested a review from a team as a code owner September 29, 2023 09:27
@bsunderhus bsunderhus force-pushed the react-utilities/feat--getIntrinsicElementProps branch from 16baf60 to cfc6394 Compare September 29, 2023 09:36
@bsunderhus bsunderhus merged commit f61033d into microsoft:master Oct 2, 2023
@bsunderhus bsunderhus deleted the react-utilities/feat--getIntrinsicElementProps branch October 2, 2023 10:38
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Oct 4, 2023
* master: (146 commits)
  remove a11y test ux from theme designer (microsoft#29379)
  feat: preview release (microsoft#29377)
  Fixed divider in the tooltip (microsoft#29357)
  fix (microsoft#29376)
  docs: Initial documentation pass (microsoft#29372)
  feat: Integrate Announce context (microsoft#29362)
  chore(react-tags): stable release (microsoft#29355)
  chore: delegate focus outline to layout components (microsoft#29293)
  Vertical bar chart line bug (microsoft#29299)
  applying package updates
  Adding axis title examples for line, area, vertical bar and vertical stacked bar charts (microsoft#29254)
  A11y: Pagination: Add tooltip for all icon buttons  (microsoft#29155)
  A11y: Fix aria attribute for page number and add correct role (microsoft#29349)
  feat: Implement motion for MessageBar (microsoft#29339)
  feat: creates getIntrinsicElementProps to replace getNativeElementProps on slots creation (microsoft#29310)
  chore: replace makeStyles with makeResetStyles (microsoft#29338)
  applying package updates
  ci(github/policies): remove bot rules that created and added `Component/Package $1`: labels on PRs (microsoft#29301)
  fix: handle multiple classes in PortalCompatProvider (microsoft#29351)
  applying package updates
  ...
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Oct 4, 2023
* master: (49 commits)
  remove a11y test ux from theme designer (microsoft#29379)
  feat: preview release (microsoft#29377)
  Fixed divider in the tooltip (microsoft#29357)
  fix (microsoft#29376)
  docs: Initial documentation pass (microsoft#29372)
  feat: Integrate Announce context (microsoft#29362)
  chore(react-tags): stable release (microsoft#29355)
  chore: delegate focus outline to layout components (microsoft#29293)
  Vertical bar chart line bug (microsoft#29299)
  applying package updates
  Adding axis title examples for line, area, vertical bar and vertical stacked bar charts (microsoft#29254)
  A11y: Pagination: Add tooltip for all icon buttons  (microsoft#29155)
  A11y: Fix aria attribute for page number and add correct role (microsoft#29349)
  feat: Implement motion for MessageBar (microsoft#29339)
  feat: creates getIntrinsicElementProps to replace getNativeElementProps on slots creation (microsoft#29310)
  chore: replace makeStyles with makeResetStyles (microsoft#29338)
  applying package updates
  ci(github/policies): remove bot rules that created and added `Component/Package $1`: labels on PRs (microsoft#29301)
  fix: handle multiple classes in PortalCompatProvider (microsoft#29351)
  applying package updates
  ...
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.

[Bug]: getNativeElementProps is not type safe

4 participants