Skip to content

Conversation

@ThomasMichon
Copy link
Member

Description of changes

The expectation of skipViewportMeasures on withViewport (and thus on DetailsList) is that when set, no measurement of the viewport size occurs and thus viewport will never be set to a non-empty size in the props of the wrapped component.
However, somewhere along the way, skipViewportMeasures got partially repurposed so that it only disables usage of ResizeObserver and does not fully prevent the wrapped component from re-rendering in response to viewport size changes.
This change restores skipViewportMeasures to its original intent and how existing apps already expect it to work.
This change also fixes the comment in order to explain why to use it.

Focus areas to test

The justified layout behavior of DetailsList relies on viewport measurement continuing to work correctly. Test code and 'fixed layout' behaviors rely on skipViewportMeasures completely disabling measurment.

@msft-github-bot msft-github-bot added the needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master label Nov 17, 2020
}
}

public componentDidUpdate(newProps: TProps) {
Copy link
Member Author

Choose a reason for hiding this comment

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

I have no idea why people didn't notice that the contract was wrong here for so long.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 17, 2020

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

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Nov 17, 2020

Perf Analysis

No significant results to display.

All results

Scenario Render type 7.0 Ticks PR Ticks Iterations Status
BaseButton mount 965 977 5000
Breadcrumb mount 42818 42322 5000
Checkbox mount 1696 1644 5000
CheckboxBase mount 1415 1386 5000
ChoiceGroup mount 5456 5389 5000
ComboBox mount 932 969 1000
CommandBar mount 7914 7882 1000
ContextualMenu mount 14001 14038 1000
DefaultButton mount 1210 1199 5000
DetailsRow mount 3842 3907 5000
DetailsRowFast mount 3978 3950 5000
DetailsRowNoStyles mount 3653 3662 5000
Dialog mount 1572 1593 1000
DocumentCardTitle mount 1842 1846 1000
Dropdown mount 2701 2735 5000
FocusTrapZone mount 1806 1801 5000
FocusZone mount 1892 1893 5000
IconButton mount 1913 1921 5000
Label mount 341 352 5000
Layer mount 2073 2031 5000
Link mount 498 482 5000
MenuButton mount 1605 1618 5000
MessageBar mount 2135 2116 5000
Nav mount 3463 3455 1000
OverflowSet mount 1523 1476 5000
Panel mount 1534 1549 1000
Persona mount 880 857 1000
Pivot mount 1492 1517 1000
PrimaryButton mount 1425 1366 5000
Rating mount 8290 8318 5000
SearchBox mount 1380 1374 5000
Shimmer mount 2846 2794 5000
Slider mount 1625 1571 5000
SpinButton mount 5331 5341 5000
Spinner mount 435 440 5000
SplitButton mount 3386 3354 5000
Stack mount 548 534 5000
StackWithIntrinsicChildren mount 1633 1611 5000
StackWithTextChildren mount 5169 5139 5000
SwatchColorPicker mount 10673 10803 5000
TagPicker mount 2926 2919 5000
TeachingBubble mount 51136 51055 5000
Text mount 462 452 5000
TextField mount 1487 1437 5000
Toggle mount 884 892 5000
button mount 111 114 5000

@size-auditor
Copy link

size-auditor bot commented Nov 17, 2020

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react office-ui-fabric-react-DetailsList 215.386 kB 215.474 kB ExceedsBaseline     88 bytes
office-ui-fabric-react office-ui-fabric-react-ShimmeredDetailsList 225.794 kB 225.882 kB ExceedsBaseline     88 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 922a86f8f337a2fb1d6bf480736aac8118dfffb8 (build)

@msft-github-bot
Copy link
Contributor

Hello @KevinTCoughlin!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msft-github-bot) and give me an instruction to get started! Learn more here.

@msft-github-bot msft-github-bot merged commit ffb733f into microsoft:7.0 Nov 18, 2020
@msft-github-bot
Copy link
Contributor

🎉office-ui-fabric-react@v7.152.0 has been released which incorporates this pull request.:tada:

Handy links:

@theerebuss theerebuss self-assigned this Feb 19, 2021
@ecraig12345 ecraig12345 removed the needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master label Feb 22, 2021
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.

7 participants