Skip to content
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(tools): remove ts-ignore pragmas from stories during migration #20575

Merged

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Nov 10, 2021

Depends on

Pull request checklist

Description of changes

  • when running migrate-converged-pkg to migrate package setup to TS solution config files, this will automatically remove @ts-ignores pragmas that were need - thus allow proper TS checking and DX

Focus areas to test

(optional)

@Hotell Hotell changed the title Hotell/build system/ts solution cfg 3 feat(tools): remove ts-ignore pragmas from stories during migration Nov 10, 2021
@Hotell Hotell added this to the November Project Cycle Q4 2021 milestone Nov 10, 2021
@Hotell Hotell mentioned this pull request Nov 10, 2021
9 tasks
@fabricteam
Copy link
Collaborator

fabricteam commented Nov 10, 2021

📊 Bundle size report

🤖 This report was generated against 9a4f32b634150921d3bf4fc89446fd3b8f9cb7fb

@size-auditor
Copy link

size-auditor bot commented Nov 10, 2021

Asset size changes

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

Baseline commit: 7e24bdf23e54c5d3c66b876711b99e1d83906046 (build)

@Hotell Hotell force-pushed the hotell/build-system/ts-solution-cfg-3 branch from a566f79 to c0664e8 Compare November 10, 2021 15:21
throw new Error('story file has no code');
}

let updatedContent = content.replace(/\/\/\s+@ts-ignore/g, '');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not rock solid but I don't think going to AST was necessary for this automation.

Copy link
Member

Choose a reason for hiding this comment

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

you could also do babel transform and strip comments, but it could also remove real comments I guess ?

@fabricteam
Copy link
Collaborator

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 937 974 5000
BaseButton mount 934 917 5000
Breadcrumb mount 2731 2722 1000
ButtonNext mount 530 528 5000
Checkbox mount 1598 1551 5000
CheckboxBase mount 1310 1358 5000
ChoiceGroup mount 4780 4782 5000
ComboBox mount 1045 990 1000
CommandBar mount 10270 10295 1000
ContextualMenu mount 8598 8627 1000
DefaultButton mount 1140 1138 5000
DetailsRow mount 3800 3876 5000
DetailsRowFast mount 3823 3861 5000
DetailsRowNoStyles mount 3649 3626 5000
Dialog mount 2531 2622 1000
DocumentCardTitle mount 170 182 1000
Dropdown mount 3350 3237 5000
FluentProviderNext mount 3968 3982 5000
FluentProviderWithTheme mount 228 229 10
FluentProviderWithTheme virtual-rerender 98 113 10
FluentProviderWithTheme virtual-rerender-with-unmount 259 263 10
FocusTrapZone mount 1830 1788 5000
FocusZone mount 1938 1905 5000
IconButton mount 1767 1812 5000
Label mount 354 360 5000
Layer mount 2978 3015 5000
Link mount 484 487 5000
MakeStyles mount 1888 1892 50000
MenuButton mount 1478 1557 5000
MessageBar mount 2034 2046 5000
Nav mount 3429 3304 1000
OverflowSet mount 1134 1194 5000
Panel mount 2480 2512 1000
Persona mount 866 857 1000
Pivot mount 1478 1451 1000
PrimaryButton mount 1319 1335 5000
Rating mount 7726 7852 5000
SearchBox mount 1353 1392 5000
Shimmer mount 2641 2582 5000
Slider mount 2000 2068 5000
SpinButton mount 4990 5067 5000
Spinner mount 447 444 5000
SplitButton mount 3459 3231 5000
Stack mount 568 519 5000
StackWithIntrinsicChildren mount 1746 1700 5000
StackWithTextChildren mount 4805 4673 5000
SwatchColorPicker mount 10522 10698 5000
TagPicker mount 2670 2752 5000
TeachingBubble mount 13213 13222 5000
Text mount 447 426 5000
TextField mount 1440 1406 5000
ThemeProvider mount 1203 1204 5000
ThemeProvider virtual-rerender 624 618 5000
ThemeProvider virtual-rerender-with-unmount 1872 1906 5000
Toggle mount 836 824 5000
buttonNative mount 129 136 5000

Perf Analysis (@fluentui/react-northstar)

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
TreeWith60ListItems.default 195 171 1.14:1
LayoutMinimalPerf.default 398 364 1.09:1
IconMinimalPerf.default 661 606 1.09:1
ButtonMinimalPerf.default 186 172 1.08:1
BoxMinimalPerf.default 359 335 1.07:1
SegmentMinimalPerf.default 357 335 1.07:1
AttachmentMinimalPerf.default 163 155 1.05:1
ListMinimalPerf.default 528 504 1.05:1
SliderMinimalPerf.default 1780 1697 1.05:1
ButtonSlotsPerf.default 560 538 1.04:1
GridMinimalPerf.default 359 345 1.04:1
RadioGroupMinimalPerf.default 458 442 1.04:1
ToolbarMinimalPerf.default 966 928 1.04:1
TooltipMinimalPerf.default 1063 1023 1.04:1
VideoMinimalPerf.default 650 624 1.04:1
AccordionMinimalPerf.default 161 156 1.03:1
ChatDuplicateMessagesPerf.default 308 299 1.03:1
ChatMinimalPerf.default 664 647 1.03:1
DropdownManyItemsPerf.default 689 672 1.03:1
FlexMinimalPerf.default 296 288 1.03:1
ImageMinimalPerf.default 369 357 1.03:1
MenuMinimalPerf.default 854 832 1.03:1
ProviderMinimalPerf.default 1193 1163 1.03:1
ReactionMinimalPerf.default 383 371 1.03:1
CarouselMinimalPerf.default 465 454 1.02:1
CheckboxMinimalPerf.default 2776 2731 1.02:1
DatepickerMinimalPerf.default 5601 5492 1.02:1
DialogMinimalPerf.default 769 757 1.02:1
HeaderSlotsPerf.default 750 735 1.02:1
InputMinimalPerf.default 1311 1282 1.02:1
ListNestedPerf.default 566 554 1.02:1
LoaderMinimalPerf.default 705 694 1.02:1
SkeletonMinimalPerf.default 354 347 1.02:1
TableMinimalPerf.default 416 407 1.02:1
TreeMinimalPerf.default 817 800 1.02:1
AlertMinimalPerf.default 271 268 1.01:1
ButtonOverridesMissPerf.default 1854 1834 1.01:1
CardMinimalPerf.default 547 541 1.01:1
ListWith60ListItems.default 659 651 1.01:1
MenuButtonMinimalPerf.default 1674 1662 1.01:1
PopupMinimalPerf.default 617 613 1.01:1
AttachmentSlotsPerf.default 1077 1074 1:1
ChatWithPopoverPerf.default 382 381 1:1
DividerMinimalPerf.default 373 374 1:1
DropdownMinimalPerf.default 3216 3224 1:1
EmbedMinimalPerf.default 4298 4278 1:1
HeaderMinimalPerf.default 357 357 1:1
ItemLayoutMinimalPerf.default 1241 1246 1:1
LabelMinimalPerf.default 382 383 1:1
ListCommonPerf.default 626 623 1:1
RefMinimalPerf.default 249 250 1:1
TableManyItemsPerf.default 1940 1936 1:1
RosterPerf.default 1199 1212 0.99:1
SplitButtonMinimalPerf.default 4241 4294 0.99:1
TextMinimalPerf.default 358 360 0.99:1
TextAreaMinimalPerf.default 497 501 0.99:1
CustomToolbarPrototype.default 4132 4179 0.99:1
AvatarMinimalPerf.default 188 191 0.98:1
ProviderMergeThemesPerf.default 1768 1799 0.98:1
AnimationMinimalPerf.default 406 419 0.97:1
FormMinimalPerf.default 396 408 0.97:1
StatusMinimalPerf.default 674 694 0.97:1
PortalMinimalPerf.default 176 189 0.93:1

@codesandbox-ci
Copy link

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

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

@Hotell Hotell marked this pull request as ready for review November 10, 2021 17:09
@Hotell Hotell requested a review from a team as a code owner November 10, 2021 17:09
@Hotell Hotell enabled auto-merge (squash) November 10, 2021 17:09
@@ -621,6 +623,37 @@ function setupStorybook(tree: Tree, options: NormalizedSchema) {
});
}

function removeTsIgnorePragmas() {
Copy link
Member

Choose a reason for hiding this comment

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

should this mark this to be removed after migration ? I don't see any point of keeping it there after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants