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

ScrollablePane: Optimization on how component works #4491

Merged
merged 48 commits into from
May 4, 2018
Merged

ScrollablePane: Optimization on how component works #4491

merged 48 commits into from
May 4, 2018

Conversation

leddie24
Copy link
Collaborator

@leddie24 leddie24 commented Apr 9, 2018

Pull request checklist

Description of changes

  • Fixes ScrollablePane with DetailsList does not show (virtualized) items #4204
  • Changes how ScrollablePane calculates whether Sticky components are Sticky or not (does not rely on expensive getBoundingClientRect anymore)
  • Fixes mounting/unmounting Sticky component after ScrollablePane has already been mounted. No more using unreliable setTimeouts to wait and re-render the pane/Stickies.
  • Changes scrollablepane positioning to use position: absolute to occupy parent space
  • Uses MutationObserver to observe DOM changes and update ScrollablePane appropriately.

Focus areas to test

(optional)

edwlmsft added 18 commits April 5, 2018 14:33
…instead of root. Need to fix sticky bottom behavior still.
… setState once. Need to fix DetailsList behavior
… on StickyTop and StickyBottom after mounting/unmounting sticky.
…lsList example. Remove unused componentDidUpdate in Sticky.
… if props/state changes (preventing excessive setState with updateStickyRefHeights). Change this.root to this.contentContainer for check for initialScrollPosition prop. Move logic for appending child to this.stickyAbove/Below into sortSticky.
…. Fix _removeStickyFromContainers not removing stickies properly.
edwlmsft added 2 commits April 8, 2018 22:48
…hts. Change getScrollPosition to check for contentContainer.scrollTop
edwlmsft added 14 commits April 19, 2018 12:52
…c-react into edwl/fixScrollablePaneBehavior

# Conflicts:
#	packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePane.base.tsx
#	packages/office-ui-fabric-react/src/components/Sticky/Sticky.tsx
…sing duplicate props.children to placeholder divs
…c-react into edwl/fixScrollablePaneBehavior

# Conflicts:
#	packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePane.base.tsx
#	packages/office-ui-fabric-react/src/components/ScrollablePane/examples/ScrollablePane.Default.Example.tsx
#	packages/office-ui-fabric-react/src/components/Sticky/Sticky.tsx
…c-react into edwl/fixScrollablePaneBehavior

# Conflicts:
#	packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePane.base.tsx
@leddie24
Copy link
Collaborator Author

leddie24 commented May 1, 2018

@ThomasMichon @MaxLustig can you re-review at your earliest convenience please?

edwlmsft added 4 commits May 2, 2018 14:12
…c-react into edwl/fixScrollablePaneBehavior

# Conflicts:
#	packages/office-ui-fabric-react/src/components/ScrollablePane/ScrollablePane.styles.ts
… stickytop/bottom. Add width on sticky component so element doesn't extend past to scrollbar.
zIndex: ZIndexes.ScrollablePane
};

return ({
root: [
classNames.root,
{
WebkitOverflowScrolling: 'touch',
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 be a lowercase w?

overflowY: 'hidden',
overflowX: 'auto'
};

Copy link
Member

Choose a reason for hiding this comment

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

Can we get rid of the maxHeightStyles altogether now?

edwlmsft added 3 commits May 3, 2018 16:31
…StickyPlaceholder to use position absolute instead of display block/none.
@leddie24 leddie24 merged commit 34683b1 into microsoft:master May 4, 2018
@leddie24 leddie24 deleted the edwl/fixScrollablePaneBehavior branch May 4, 2018 00:25
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScrollablePane with DetailsList does not show (virtualized) items
3 participants