Skip to content

Conversation

@miroslavstastny
Copy link
Member

Current Behavior

In #23608 we changed global/colors.ts file to reduce number of shared color tokes. The problem is that this file is generated by token pipeline.
Alias shared colors are currently generated by the FUI library (not the token pipeline). For that reason the split to status, persona and other colors should be the responsibility of the FUI library as well.

New Behavior

Reverts global/colors.ts to the shape generated by token pipeline, splits to status, persona and other colors in alias/colorPalette.ts

Related Issue(s)

Part of #24161.

@@ -0,0 +1,7 @@
{
"type": "none",
Copy link
Member Author

Choose a reason for hiding this comment

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

Does not affect public API surface.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 19, 2022

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 6f0f10d:

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

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 19, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: FluentProvider & webLightTheme
32.895 kB
10.778 kB
33.19 kB
10.921 kB
295 B
143 B
react-theme
Teams: all themes
29.224 kB
6.255 kB
29.479 kB
6.396 kB
255 B
141 B
react-theme
Teams: Light theme
17.088 kB
4.89 kB
17.385 kB
5.024 kB
297 B
134 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
79.349 kB
24.053 kB
react-alert
Alert
83.79 kB
20.841 kB
react-avatar
Avatar
48.283 kB
13.644 kB
react-avatar
AvatarGroup
14.859 kB
5.939 kB
react-avatar
AvatarGroupItem
68.251 kB
18.987 kB
react-badge
Badge
22.503 kB
7.153 kB
react-badge
CounterBadge
23.406 kB
7.449 kB
react-badge
PresenceBadge
23.947 kB
7.022 kB
react-button
Button
36.396 kB
9.579 kB
react-button
CompoundButton
43.469 kB
10.812 kB
react-button
MenuButton
39.014 kB
10.456 kB
react-button
SplitButton
46.544 kB
11.84 kB
react-button
ToggleButton
51.91 kB
11.003 kB
react-card
Card - All
67.458 kB
19.264 kB
react-card
Card
63.14 kB
18.176 kB
react-card
CardFooter
8.461 kB
3.555 kB
react-card
CardHeader
9.504 kB
3.896 kB
react-card
CardPreview
8.562 kB
3.61 kB
react-combobox
Combobox (including child components)
72.549 kB
23.686 kB
react-combobox
Dropdown (including child components)
71.741 kB
23.559 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.818 kB
51.901 kB
react-dialog
Dialog (including children components)
85.361 kB
25.458 kB
react-divider
Divider
16.359 kB
5.853 kB
react-image
Image
10.68 kB
4.215 kB
react-input
Input
23.554 kB
7.644 kB
react-label
Label
9.238 kB
3.815 kB
react-link
Link
12.231 kB
4.925 kB
react-menu
Menu (including children components)
115.697 kB
35.316 kB
react-menu
Menu (including selectable components)
118.896 kB
35.806 kB
react-overflow
hooks only
10.685 kB
4.104 kB
react-popover
Popover
102.837 kB
31.496 kB
react-portal
Portal
10.576 kB
3.875 kB
react-positioning
usePositioning
19.7 kB
7.404 kB
react-provider
FluentProvider
15.655 kB
5.835 kB
react-radio
Radio
36.025 kB
11.914 kB
react-radio
RadioGroup
14.148 kB
5.654 kB
react-select
Select
20.746 kB
7.299 kB
react-slider
Slider
32.07 kB
10.033 kB
react-spinbutton
SpinButton
43.899 kB
12.362 kB
react-spinner
Spinner
19.848 kB
6.384 kB
react-switch
Switch
32.562 kB
10.253 kB
react-text
Text - Default
11.682 kB
4.561 kB
react-text
Text - Wrappers
14.992 kB
4.995 kB
react-textarea
Textarea
23.674 kB
7.83 kB
react-theme
Single theme token import
69 B
89 B
react-tooltip
Tooltip
41.504 kB
14.622 kB
🤖 This report was generated against 8484a3ec4abb520d716d199ea79a3cde57fa1da2

@size-auditor
Copy link

size-auditor bot commented Aug 19, 2022

Asset size changes

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

Baseline commit: 7f7f925f576751f77c612bfdd6557232451f9990 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 19, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1582 1558 5000
Button mount 1161 1122 5000
FluentProvider mount 1828 1833 5000
FluentProviderWithTheme mount 708 725 10
FluentProviderWithTheme virtual-rerender 677 679 10
FluentProviderWithTheme virtual-rerender-with-unmount 712 714 10
MakeStyles mount 2216 2153 50000
SpinButton mount 2898 2893 5000

@miroslavstastny miroslavstastny marked this pull request as draft August 22, 2022 06:25
@miroslavstastny
Copy link
Member Author

I do not like the bundle size increase, exploring another ways...

@miroslavstastny
Copy link
Member Author

By exporting all the global shared colors individually from packages/react-components/react-theme/src/global/colors.ts instead of through the sharedColors object the bundle size is ~back at the original numbers.

We might need to refactor the approach agains once we explore the ways to make the global colors public (#23562).

@miroslavstastny miroslavstastny marked this pull request as ready for review August 23, 2022 13:15
@miroslavstastny miroslavstastny merged commit faf2328 into microsoft:master Aug 23, 2022
@miroslavstastny miroslavstastny deleted the chore/react-theme-shared-colors branch August 23, 2022 16:10
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