-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: v0 Loader style migration from v9 #25169
feat: v0 Loader style migration from v9 #25169
Conversation
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 ebc3d74:
|
Asset size changes
Baseline commit: f43aae1493a49053f7fe866a5c56056e73b1d709 (build) |
📊 Bundle size report🤖 This report was generated against f43aae1493a49053f7fe866a5c56056e73b1d709 |
packages/fluentui/react-northstar/src/themes/teams/components/Loader/loaderVariables.ts
Outdated
Show resolved
Hide resolved
Perf Analysis (
|
Scenario | Current PR Ticks | Baseline Ticks | Ratio | Regression Analysis |
---|---|---|---|---|
TreeWith60ListItems.default | 178 | 154 | 1.16:1 | analysis |
ButtonMinimalPerf.default | 153 | 141 | 1.09:1 | analysis |
RefMinimalPerf.default | 209 | 203 | 1.03:1 | analysis |
AttachmentMinimalPerf.default | 140 | 140 | 1:1 | analysis |
AvatarMinimalPerf.default | 175 | 178 | 0.98:1 | analysis |
AccordionMinimalPerf.default | 144 | 149 | 0.97:1 | analysis |
PortalMinimalPerf.default | 155 | 162 | 0.96:1 | analysis |
Perf tests with no regressions
Scenario | Current PR Ticks | Baseline Ticks | Ratio |
---|---|---|---|
FormMinimalPerf.default | 376 | 351 | 1.07:1 |
LabelMinimalPerf.default | 378 | 358 | 1.06:1 |
ReactionMinimalPerf.default | 371 | 349 | 1.06:1 |
ChatWithPopoverPerf.default | 360 | 347 | 1.04:1 |
HeaderSlotsPerf.default | 759 | 731 | 1.04:1 |
SkeletonMinimalPerf.default | 343 | 330 | 1.04:1 |
BoxMinimalPerf.default | 327 | 316 | 1.03:1 |
ChatMinimalPerf.default | 712 | 693 | 1.03:1 |
RosterPerf.default | 2124 | 2054 | 1.03:1 |
TooltipMinimalPerf.default | 2288 | 2221 | 1.03:1 |
AttachmentSlotsPerf.default | 1092 | 1068 | 1.02:1 |
ButtonOverridesMissPerf.default | 1285 | 1255 | 1.02:1 |
CarouselMinimalPerf.default | 450 | 442 | 1.02:1 |
DropdownManyItemsPerf.default | 637 | 626 | 1.02:1 |
GridMinimalPerf.default | 332 | 327 | 1.02:1 |
LayoutMinimalPerf.default | 342 | 335 | 1.02:1 |
SegmentMinimalPerf.default | 333 | 326 | 1.02:1 |
SplitButtonMinimalPerf.default | 4366 | 4268 | 1.02:1 |
StatusMinimalPerf.default | 673 | 663 | 1.02:1 |
TableMinimalPerf.default | 397 | 389 | 1.02:1 |
TextMinimalPerf.default | 331 | 325 | 1.02:1 |
DividerMinimalPerf.default | 338 | 334 | 1.01:1 |
ImageMinimalPerf.default | 382 | 377 | 1.01:1 |
ItemLayoutMinimalPerf.default | 1131 | 1123 | 1.01:1 |
ListMinimalPerf.default | 483 | 476 | 1.01:1 |
MenuButtonMinimalPerf.default | 1668 | 1651 | 1.01:1 |
RadioGroupMinimalPerf.default | 422 | 417 | 1.01:1 |
TreeMinimalPerf.default | 768 | 760 | 1.01:1 |
VideoMinimalPerf.default | 703 | 697 | 1.01:1 |
AlertMinimalPerf.default | 256 | 255 | 1:1 |
CardMinimalPerf.default | 510 | 512 | 1:1 |
ChatDuplicateMessagesPerf.default | 253 | 254 | 1:1 |
DropdownMinimalPerf.default | 2611 | 2620 | 1:1 |
InputMinimalPerf.default | 1075 | 1071 | 1:1 |
ProviderMinimalPerf.default | 396 | 396 | 1:1 |
SliderMinimalPerf.default | 1566 | 1567 | 1:1 |
TextAreaMinimalPerf.default | 459 | 458 | 1:1 |
ToolbarMinimalPerf.default | 903 | 903 | 1:1 |
AnimationMinimalPerf.default | 515 | 518 | 0.99:1 |
DialogMinimalPerf.default | 726 | 733 | 0.99:1 |
EmbedMinimalPerf.default | 3531 | 3571 | 0.99:1 |
FlexMinimalPerf.default | 268 | 272 | 0.99:1 |
ListCommonPerf.default | 614 | 622 | 0.99:1 |
ListNestedPerf.default | 516 | 519 | 0.99:1 |
ProviderMergeThemesPerf.default | 1225 | 1243 | 0.99:1 |
TableManyItemsPerf.default | 1854 | 1871 | 0.99:1 |
CustomToolbarPrototype.default | 2616 | 2635 | 0.99:1 |
DatepickerMinimalPerf.default | 5499 | 5583 | 0.98:1 |
ListWith60ListItems.default | 588 | 601 | 0.98:1 |
MenuMinimalPerf.default | 801 | 819 | 0.98:1 |
PopupMinimalPerf.default | 616 | 628 | 0.98:1 |
HeaderMinimalPerf.default | 330 | 345 | 0.96:1 |
ButtonSlotsPerf.default | 524 | 554 | 0.95:1 |
CheckboxMinimalPerf.default | 2010 | 2108 | 0.95:1 |
IconMinimalPerf.default | 639 | 677 | 0.94:1 |
LoaderMinimalPerf.default | 308 | 629 | 0.49:1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/fluentui/react-northstar/src/components/Loader/Loader.tsx
Outdated
Show resolved
Hide resolved
packages/fluentui/react-northstar/src/themes/teams/components/Loader/loaderVariables.ts
Show resolved
Hide resolved
packages/fluentui/docs/src/examples/components/Loader/Variations/LoaderExampleSecondary.tsx
Outdated
Show resolved
Hide resolved
packages/fluentui/react-northstar/src/themes/teams/components/Loader/loaderStyles.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with small suggestions, nice job 👍
* Add new secondary svg loader * Remove the unused style * Generate loader svg based on theme color * Add new svg loader * Encode svg color with encodeURIComponent function * Loader gets rendered as <svg> and <circle> tags * Removed svg urls * Add stroke color variables and secondary stroke * Change svg heights * Styling the Loader's <svg> and <circle> * Use defined classname instead of nested selectors * Remove unused interface variables * Add @NoFlip to fix rtl rotate animation * Set the loader track color of HC theme in black * Set black background to HC secondary example * Renamed variable * Change loader's height when it is inside a button * Add changelog entry * Update changelog entry * Change background color to secondary examples * Function to get the common styles of the circles * Remove unused svg classname * Change loader's height when inside an attachment Co-authored-by: Enrico <[email protected]>
* Add new secondary svg loader * Remove the unused style * Generate loader svg based on theme color * Add new svg loader * Encode svg color with encodeURIComponent function * Loader gets rendered as <svg> and <circle> tags * Removed svg urls * Add stroke color variables and secondary stroke * Change svg heights * Styling the Loader's <svg> and <circle> * Use defined classname instead of nested selectors * Remove unused interface variables * Add @NoFlip to fix rtl rotate animation * Set the loader track color of HC theme in black * Set black background to HC secondary example * Renamed variable * Change loader's height when it is inside a button * Add changelog entry * Update changelog entry * Change background color to secondary examples * Function to get the common styles of the circles * Remove unused svg classname * Change loader's height when inside an attachment Co-authored-by: Enrico <[email protected]>
This Pull Request updates the v0 Loader to look like v9 Spinner.
Before this PR We were importing the SVG loader in the document as background-image in CSS.
The SVG Loader is now added to the document directly inside HTML code as
<svg>
tag.We have then applied styling to the new tag.The Loader gets the right stroke color based on the theme we are in.
We took the following design spec as a reference:
Current Behavior
New Behavior
Related Issue(s)
Fixes #