Skip to content

Conversation

@layershifter
Copy link
Member

New Behavior

This PR exports:

  • AnnounceProvider to inject implementation of announce() function
  • useAnnounce() to trigger announcements

Also adds documentation for useAnnounce().

Sample implementation of announcer will be added separately.

  • Deprecates exports of AnnounceProvider_unstable, useAnnounce_unstable & AnnounceContextValue_unstable in @fluentui/react-shared-components in favor of "stable" exports
  • Exports AnnounceOptions type

Related Issue(s)

Related #29371.
Related #28654.

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 16, 2024

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
510 B
328 B
global-context
createContextSelector
537 B
339 B
react-accordion
Accordion (including children components)
93.962 kB
28.706 kB
react-alert
Alert
83.737 kB
23.474 kB
react-avatar
Avatar
50.175 kB
15.944 kB
react-avatar
AvatarGroup
19.704 kB
7.796 kB
react-avatar
AvatarGroupItem
64.831 kB
20.274 kB
react-badge
Badge
26.905 kB
8.729 kB
react-badge
CounterBadge
27.806 kB
9.024 kB
react-badge
PresenceBadge
25.311 kB
9.306 kB
react-button
Button
39.513 kB
11.169 kB
react-button
CompoundButton
46.874 kB
12.661 kB
react-button
MenuButton
44.292 kB
12.542 kB
react-button
SplitButton
52.306 kB
14.134 kB
react-button
ToggleButton
56.559 kB
13.068 kB
react-calendar-compat
Calendar Compat
142.236 kB
37.172 kB
react-card
Card - All
94.653 kB
27.242 kB
react-card
Card
89.477 kB
25.731 kB
react-card
CardFooter
13.064 kB
5.385 kB
react-card
CardHeader
15.307 kB
6.143 kB
react-card
CardPreview
14.015 kB
5.752 kB
react-checkbox
Checkbox
34.746 kB
11.902 kB
react-combobox
Combobox (including child components)
97.318 kB
31.442 kB
react-combobox
Dropdown (including child components)
98.511 kB
31.431 kB
react-components
react-components: Button, FluentProvider & webLightTheme
69.901 kB
20.261 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
210.494 kB
60.055 kB
react-components
react-components: FluentProvider & webLightTheme
42.388 kB
14.103 kB
react-datepicker-compat
DatePicker Compat
214.065 kB
60.087 kB
react-dialog
Dialog (including children components)
95.522 kB
28.482 kB
react-divider
Divider
20.82 kB
7.763 kB
react-field
Field
22.427 kB
8.573 kB
react-image
Image
15.736 kB
6.228 kB
react-infobutton
InfoButton
132.952 kB
41.844 kB
react-infobutton
InfoLabel
136.64 kB
42.986 kB
react-input
Input
26.887 kB
9.118 kB
react-jsx-runtime
Classic Pragma
1.057 kB
530 B
react-jsx-runtime
JSX Dev Runtime
3.783 kB
1.648 kB
react-jsx-runtime
JSX Runtime
4.377 kB
1.881 kB
react-label
Label
14.149 kB
5.759 kB
react-link
Link
17.082 kB
6.911 kB
react-menu
Menu (including children components)
142.794 kB
43.72 kB
react-menu
Menu (including selectable components)
145.48 kB
44.227 kB
react-message-bar
MessageBar (all components)
25.181 kB
9.039 kB
react-overflow
hooks only
12.837 kB
4.818 kB
react-persona
Persona
57.066 kB
17.821 kB
react-popover
Popover
121.146 kB
38.235 kB
react-portal
Portal
12.788 kB
4.67 kB
react-portal-compat
PortalCompatProvider
7.099 kB
2.385 kB
react-positioning
usePositioning
26.162 kB
9.465 kB
react-progress
ProgressBar
17.428 kB
6.898 kB
react-provider
FluentProvider
22.928 kB
8.472 kB
react-radio
Radio
32.042 kB
10.046 kB
react-radio
RadioGroup
15.345 kB
6.263 kB
react-select
Select
28.609 kB
10.205 kB
react-slider
Slider
39.15 kB
12.769 kB
react-spinbutton
SpinButton
36.774 kB
11.788 kB
react-spinner
Spinner
23.402 kB
8.467 kB
react-switch
Switch
34.23 kB
10.995 kB
react-table
DataGrid
157.363 kB
43.948 kB
react-table
Table (Primitives only)
44.493 kB
13.921 kB
react-table
Table as DataGrid
130.321 kB
35.173 kB
react-table
Table (Selection only)
75.365 kB
20.367 kB
react-table
Table (Sort only)
74.031 kB
19.976 kB
react-tags
InteractionTag
15.259 kB
6.058 kB
react-tags
Tag
29.982 kB
9.439 kB
react-tags
TagGroup
74.404 kB
22.31 kB
react-text
Text - Default
16.705 kB
6.569 kB
react-text
Text - Wrappers
19.878 kB
6.896 kB
react-textarea
Textarea
30.947 kB
10.476 kB
react-timepicker-compat
TimePicker
99.152 kB
32.873 kB
react-toast
Toast (including Toaster)
93.274 kB
28.044 kB
react-tooltip
Tooltip
53.515 kB
18.907 kB
react-utilities
SSRProvider
180 B
160 B
🤖 This report was generated against d98dd58264f2dbfaaf0c3cc1c7149acf0b8a6266

@layershifter layershifter force-pushed the feat/export-useannounce branch from c90cce2 to 360097e Compare January 16, 2024 17:33
@fabricteam
Copy link
Collaborator

fabricteam commented Jan 16, 2024

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 646 625 5000
Button mount 293 311 5000
Field mount 1142 1170 5000
FluentProvider mount 695 724 5000
FluentProviderWithTheme mount 77 81 10
FluentProviderWithTheme virtual-rerender 62 72 10
FluentProviderWithTheme virtual-rerender-with-unmount 70 72 10
MakeStyles mount 864 862 50000
Persona mount 1753 1777 5000
SpinButton mount 1375 1406 5000

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 16, 2024

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 a64c26d:

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

@size-auditor
Copy link

size-auditor bot commented Jan 16, 2024

Asset size changes

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

Baseline commit: d98dd58264f2dbfaaf0c3cc1c7149acf0b8a6266 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jan 16, 2024

🕵 fluentuiv9 No visual regressions between this PR and main

@layershifter layershifter force-pushed the feat/export-useannounce branch from 360097e to 2c19189 Compare January 16, 2024 18:29
@layershifter layershifter marked this pull request as ready for review January 16, 2024 19:20
@layershifter layershifter requested review from a team as code owners January 16, 2024 19:20
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.

4 participants