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

fix(Carousel): Allows index as number only #13048

Merged
merged 4 commits into from
May 7, 2020

Conversation

assuncaocharles
Copy link
Contributor

@assuncaocharles assuncaocharles commented May 7, 2020

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ yarn change

Description of changes

Carousel active index as only number to avoid cast and conflicts with animations

Focus areas to test

(optional)

Microsoft Reviewers: Open in CodeFlow

@assuncaocharles assuncaocharles changed the title fix(Carousel): Allows index as string or number fix(Carousel): Allows index as number only May 7, 2020
Copy link
Contributor

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Let's add breaking change changelog entry for the prop type change

@@ -306,15 +307,11 @@ export const Carousel: React.FC<WithAsProp<CarouselProps>> &
unmountOnExit
visible={active}
name={
initialMounting
initialMounting || !active
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this in this PR ❤️

@layershifter
Copy link
Member

Please add to PR description why this change is needed

@msft-github-bot
Copy link
Contributor

Perf Analysis

No significant results to display.

All results

Scenario Master Ticks PR Ticks Iterations Status
BaseButton 821 794 5000
Checkbox 1465 1554 5000
CheckboxBase 1248 1284 5000
ChoiceGroup 4819 4676 5000
ComboBox 893 873 1000
CommandBar 6681 6806 1000
ContextualMenu 11590 11200 1000
DefaultButton 993 993 5000
DetailsRow 3152 3256 5000
DetailsRow (fast icons) 3146 3307 5000
DetailsRow without styles 2972 3102 5000
Dialog 1402 1348 1000
DocumentCardTitle with truncation 1427 1443 1000
Dropdown 2485 2286 5000
FocusZone 1457 1440 5000
IconButton 1574 1581 5000
Label 271 270 5000
Link 416 393 5000
MenuButton 1333 1305 5000
Nav 2999 2830 1000
Panel 1429 1427 1000
Persona 805 803 1000
Pivot 1263 1255 1000
PrimaryButton 1105 1162 5000
SearchBox 1217 1199 5000
Slider 1388 1363 5000
Spinner 362 351 5000
SplitButton 2798 2855 5000
Stack 439 406 5000
Stack with Intrinsic children 1022 1040 5000
Stack with Text children 4020 3887 5000
TagPicker 2472 2534 5000
Text 337 358 5000
TextField 1282 1291 5000
Toggle 819 800 5000
button 56 51 5000

Perf Analysis (Fluent)

Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🔧 Avatar.Fluent 0.47 0.43 1.09:1 2000 930
🦄 Button.Fluent 0.1 0.18 0.56:1 5000 523
🔧 Checkbox.Fluent 0.62 0.31 2:1 1000 617
🔧 Dialog.Fluent 0.34 0.2 1.7:1 5000 1705
🔧 Dropdown.Fluent 3.01 0.42 7.17:1 1000 3006
🔧 Icon.Fluent 0.13 0.05 2.6:1 5000 642
🎯 Image.Fluent 0.07 0.1 0.7:1 5000 337
🔧 Slider.Fluent 1.28 0.35 3.66:1 1000 1283
🔧 Text.Fluent 0.07 0.02 3.5:1 5000 361
🦄 Tooltip.Fluent 0.09 13.41 0.01:1 5000 445

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
PopupMinimalPerf.default 239 206 1.16:1
ListCommonPerf.default 961 864 1.11:1
FlexMinimalPerf.default 285 261 1.09:1
TextAreaMinimalPerf.default 482 442 1.09:1
Text.Fluent 361 331 1.09:1
ButtonMinimalPerf.default 167 155 1.08:1
ChatDuplicateMessagesPerf.default 399 370 1.08:1
ImageMinimalPerf.default 408 377 1.08:1
InputMinimalPerf.default 930 858 1.08:1
MenuButtonMinimalPerf.default 1545 1441 1.07:1
ProviderMinimalPerf.default 556 518 1.07:1
StatusMinimalPerf.default 726 685 1.06:1
IconMinimalPerf.default 711 668 1.06:1
TableMinimalPerf.default 388 365 1.06:1
Avatar.Fluent 930 876 1.06:1
LayoutMinimalPerf.default 547 521 1.05:1
LoaderMinimalPerf.default 677 645 1.05:1
HierarchicalTreeMinimalPerf.default 1082 1040 1.04:1
ListMinimalPerf.default 439 421 1.04:1
SplitButtonMinimalPerf.default 3301 3189 1.04:1
AlertMinimalPerf.default 287 279 1.03:1
CardMinimalPerf.default 557 542 1.03:1
CarouselMinimalPerf.default 449 436 1.03:1
ChatMinimalPerf.default 624 608 1.03:1
ItemLayoutMinimalPerf.default 1582 1542 1.03:1
LabelMinimalPerf.default 404 392 1.03:1
PortalMinimalPerf.default 305 295 1.03:1
TreeMinimalPerf.default 1224 1190 1.03:1
DividerMinimalPerf.default 338 330 1.02:1
FormMinimalPerf.default 754 742 1.02:1
HeaderMinimalPerf.default 496 487 1.02:1
ReactionMinimalPerf.default 1816 1782 1.02:1
Dropdown.Fluent 3006 2949 1.02:1
Slider.Fluent 1283 1255 1.02:1
AccordionMinimalPerf.default 143 142 1.01:1
AttachmentMinimalPerf.default 138 136 1.01:1
ChatWithPopoverPerf.default 545 541 1.01:1
DropdownMinimalPerf.default 3034 2993 1.01:1
SegmentMinimalPerf.default 924 911 1.01:1
CustomToolbarPrototype.default 3322 3302 1.01:1
DialogMinimalPerf.default 1700 1704 1:1
TooltipMinimalPerf.default 691 693 1:1
VideoMinimalPerf.default 629 626 1:1
Button.Fluent 523 525 1:1
Dialog.Fluent 1705 1708 1:1
AvatarMinimalPerf.default 500 504 0.99:1
ProviderMergeThemesPerf.default 1404 1424 0.99:1
TreeWith60ListItems.default 206 209 0.99:1
Checkbox.Fluent 617 622 0.99:1
AnimationMinimalPerf.default 626 640 0.98:1
AttachmentSlotsPerf.default 1101 1125 0.98:1
BoxMinimalPerf.default 316 321 0.98:1
CheckboxMinimalPerf.default 2679 2734 0.98:1
ListWith60ListItems.default 1019 1039 0.98:1
ToolbarMinimalPerf.default 829 842 0.98:1
Tooltip.Fluent 445 455 0.98:1
ButtonSlotsPerf.default 585 601 0.97:1
SliderMinimalPerf.default 1292 1329 0.97:1
DropdownManyItemsPerf.default 1232 1290 0.96:1
GridMinimalPerf.default 680 710 0.96:1
RadioGroupMinimalPerf.default 560 581 0.96:1
RefMinimalPerf.default 188 195 0.96:1
MenuMinimalPerf.default 1611 1700 0.95:1
EmbedMinimalPerf.default 1906 2024 0.94:1
TextMinimalPerf.default 319 341 0.94:1
ListNestedPerf.default 820 880 0.93:1
HeaderSlotsPerf.default 1482 1619 0.92:1
Icon.Fluent 642 695 0.92:1
Image.Fluent 337 371 0.91:1

@size-auditor
Copy link

size-auditor bot commented May 7, 2020

Asset size changes

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

Baseline commit: 74a66ffe2c378e953a9d94e67d2230477baee534 (build)

@assuncaocharles assuncaocharles merged commit 5b327a0 into microsoft:master May 7, 2020
@assuncaocharles assuncaocharles deleted the fix/carousel branch May 7, 2020 17: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.

None yet

5 participants