fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

feat: Implement Toast using composition API

Open ling1726 opened this issue 1 year ago • 5 comments

Implements the Toast component using the composition API. Also updates the toast imperative functions to be able to override the root slot.

Fixes #27773

ling1726 avatar Jun 01 '23 10:06 ling1726

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
88.516 kB
26.795 kB
88.552 kB
26.801 kB
36 B
6 B
react-alert
Alert
93.549 kB
22.537 kB
93.585 kB
22.546 kB
36 B
9 B
react-avatar
Avatar
57.797 kB
15.091 kB
57.833 kB
15.1 kB
36 B
9 B
react-avatar
AvatarGroup
15.646 kB
6.298 kB
15.682 kB
6.306 kB
36 B
8 B
react-avatar
AvatarGroupItem
73.973 kB
19.582 kB
74.009 kB
19.59 kB
36 B
8 B
react-badge
Badge
23.555 kB
7.256 kB
23.591 kB
7.264 kB
36 B
8 B
react-badge
CounterBadge
24.457 kB
7.559 kB
24.493 kB
7.565 kB
36 B
6 B
react-badge
PresenceBadge
32.135 kB
8.423 kB
32.171 kB
8.431 kB
36 B
8 B
react-button
Button
36.742 kB
9.5 kB
36.778 kB
9.51 kB
36 B
10 B
react-button
CompoundButton
43.896 kB
10.98 kB
43.932 kB
10.99 kB
36 B
10 B
react-button
MenuButton
41.427 kB
10.836 kB
41.463 kB
10.846 kB
36 B
10 B
react-button
SplitButton
49.649 kB
12.42 kB
49.685 kB
12.426 kB
36 B
6 B
react-button
ToggleButton
55.024 kB
11.436 kB
55.06 kB
11.446 kB
36 B
10 B
react-card
Card - All
88.716 kB
25.114 kB
88.752 kB
25.122 kB
36 B
8 B
react-card
Card
83.651 kB
23.658 kB
83.687 kB
23.666 kB
36 B
8 B
react-card
CardFooter
9.193 kB
3.892 kB
9.229 kB
3.9 kB
36 B
8 B
react-card
CardHeader
11.089 kB
4.588 kB
11.125 kB
4.596 kB
36 B
8 B
react-card
CardPreview
9.998 kB
4.24 kB
10.034 kB
4.248 kB
36 B
8 B
react-checkbox
Checkbox
34.5 kB
10.878 kB
34.536 kB
10.884 kB
36 B
6 B
react-combobox
Combobox (including child components)
87.735 kB
28.243 kB
87.771 kB
28.251 kB
36 B
8 B
react-combobox
Dropdown (including child components)
86.074 kB
27.848 kB
86.11 kB
27.855 kB
36 B
7 B
react-components
react-components: Button, FluentProvider & webLightTheme
64.899 kB
17.91 kB
64.935 kB
17.918 kB
36 B
8 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
206.425 kB
57.914 kB
206.461 kB
57.925 kB
36 B
11 B
react-components
react-components: FluentProvider & webLightTheme
36.132 kB
11.954 kB
36.168 kB
11.964 kB
36 B
10 B
react-datepicker-compat
DatePicker Compat
222.56 kB
59.204 kB
222.596 kB
59.214 kB
36 B
10 B
react-dialog
Dialog (including children components)
92.076 kB
27.492 kB
92.112 kB
27.498 kB
36 B
6 B
react-divider
Divider
17.441 kB
6.349 kB
17.477 kB
6.357 kB
36 B
8 B
react-field
Field
18.9 kB
7.083 kB
18.936 kB
7.092 kB
36 B
9 B
react-image
Image
11.514 kB
4.619 kB
11.55 kB
4.627 kB
36 B
8 B
react-infobutton
InfoButton
130.121 kB
39.785 kB
130.157 kB
39.793 kB
36 B
8 B
react-infobutton
InfoLabel
133.586 kB
40.852 kB
133.622 kB
40.861 kB
36 B
9 B
react-input
Input
24.183 kB
7.772 kB
24.219 kB
7.781 kB
36 B
9 B
react-label
Label
10.139 kB
4.231 kB
10.175 kB
4.243 kB
36 B
12 B
react-link
Link
12.339 kB
5.105 kB
12.375 kB
5.113 kB
36 B
8 B
react-menu
Menu (including children components)
130.848 kB
39.946 kB
130.884 kB
39.953 kB
36 B
7 B
react-menu
Menu (including selectable components)
133.832 kB
40.479 kB
133.868 kB
40.486 kB
36 B
7 B
react-persona
Persona
64.718 kB
17.012 kB
64.754 kB
17.021 kB
36 B
9 B
react-popover
Popover
117.083 kB
36.122 kB
117.119 kB
36.133 kB
36 B
11 B
react-progress
ProgressBar
13.891 kB
5.482 kB
13.927 kB
5.488 kB
36 B
6 B
react-provider
FluentProvider
18.079 kB
6.713 kB
18.115 kB
6.719 kB
36 B
6 B
react-radio
Radio
27.404 kB
8.722 kB
27.44 kB
8.73 kB
36 B
8 B
react-radio
RadioGroup
11.326 kB
4.743 kB
11.362 kB
4.753 kB
36 B
10 B
react-select
Select
25.373 kB
8.826 kB
25.409 kB
8.834 kB
36 B
8 B
react-slider
Slider
34.322 kB
11.099 kB
34.358 kB
11.107 kB
36 B
8 B
react-spinbutton
SpinButton
34.121 kB
10.421 kB
34.157 kB
10.429 kB
36 B
8 B
react-spinner
Spinner
21.327 kB
7.015 kB
21.363 kB
7.021 kB
36 B
6 B
react-switch
Switch
29.924 kB
9.342 kB
29.96 kB
9.353 kB
36 B
11 B
react-table
DataGrid
150.868 kB
41.518 kB
150.904 kB
41.525 kB
36 B
7 B
react-table
Table (Primitives only)
45.111 kB
12.567 kB
45.147 kB
12.577 kB
36 B
10 B
react-table
Table as DataGrid
133.356 kB
34.002 kB
133.392 kB
34.008 kB
36 B
6 B
react-table
Table (Selection only)
79.125 kB
19.379 kB
79.161 kB
19.386 kB
36 B
7 B
react-table
Table (Sort only)
78.455 kB
19.187 kB
78.491 kB
19.195 kB
36 B
8 B
react-tags
Tag
22.004 kB
7.93 kB
22.04 kB
7.94 kB
36 B
10 B
react-text
Text - Default
12.527 kB
4.963 kB
12.563 kB
4.972 kB
36 B
9 B
react-text
Text - Wrappers
15.677 kB
5.284 kB
15.713 kB
5.293 kB
36 B
9 B
react-textarea
Textarea
27.686 kB
9.126 kB
27.722 kB
9.135 kB
36 B
9 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
510 B
330 B
global-context
createContextSelector
537 B
342 B
react-overflow
hooks only
11.206 kB
4.266 kB
react-portal
Portal
11.676 kB
4.31 kB
react-portal-compat
PortalCompatProvider
6.473 kB
2.196 kB
react-positioning
usePositioning
24.249 kB
8.856 kB
react-tooltip
Tooltip
47.119 kB
16.528 kB
react-utilities
SSRProvider
180 B
159 B
🤖 This report was generated against 386ee70863eb4059b51cb85b41fbadcc76c94e6e

fabricteam avatar Jun 01 '23 11:06 fabricteam

Asset size changes

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

Baseline commit: 386ee70863eb4059b51cb85b41fbadcc76c94e6e (build)

size-auditor[bot] avatar Jun 01 '23 11:06 size-auditor[bot]

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 4aa6ef5bb72d25633856d6a082d64eb2eed3682a:

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

codesandbox-ci[bot] avatar Jun 01 '23 11:06 codesandbox-ci[bot]

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme mount 85 74 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 579 582 5000
Button mount 305 291 5000
Field mount 1002 1022 5000
FluentProvider mount 632 649 5000
FluentProviderWithTheme mount 85 74 10 Possible regression
FluentProviderWithTheme virtual-rerender 74 72 10
FluentProviderWithTheme virtual-rerender-with-unmount 69 77 10
InfoButton mount 15 12 5000
MakeStyles mount 854 888 50000
Persona mount 1649 1570 5000
SpinButton mount 1269 1267 5000

fabricteam avatar Jun 01 '23 12:06 fabricteam

🕵 fluentuiv9 No visual regressions between this PR and main

fabricteam avatar Jun 01 '23 13:06 fabricteam

:tada:@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

msft-fluent-ui-bot avatar Jun 21 '23 07:06 msft-fluent-ui-bot

:tada:@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

msft-fluent-ui-bot avatar Jun 21 '23 07:06 msft-fluent-ui-bot