Skip to content

ShimmeredDetailsList: wrapper for DetailsList with Shimmer.#5374

Merged
ThomasMichon merged 10 commits intomicrosoft:masterfrom
Vitalius1:v-vibr/Ref_DetailsList_Shimmer
Jun 29, 2018
Merged

ShimmeredDetailsList: wrapper for DetailsList with Shimmer.#5374
ThomasMichon merged 10 commits intomicrosoft:masterfrom
Vitalius1:v-vibr/Ref_DetailsList_Shimmer

Conversation

@Vitalius1
Copy link
Copy Markdown
Contributor

@Vitalius1 Vitalius1 commented Jun 28, 2018

Pull request checklist

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

Description of changes

Introduces a wrapper component called ShimmeredDetailsList which can be used in place of regular DetailsList when you want to augment it with the Shimmer placeholder as an alternative to have it integrated internally which was causing a bundle size increase. The purpose of this wrapper is to give a quick default shimmer placeholder to users who don't modify the renderer of each row by just toggling the enableShimmer prop, plus the possibility to provide a custom shimmer skeleton through onRenderCustomPlaceholder prop when in need. The shimmerLines prop gives more control over the default 10 lines when necessary.

Focus areas to test

In DetailsList I added a conditional to trigger a forceUpdate as changing the prop compact was not propagated to the new wrapper for correct sizes of Shimmer Elements. How expensive is the forceUpate?

P.S.

There is a bunch of code related to the current implementation of Shimmer in DetailsList, most specifically in the DetailsRow.scss plus some props for DetailsRow and DetailsRowFields. Those will eventually be removed as soon as we have a v6 Fabric bump in our common repo and I can change the imports in there to use the Shimmer from Fabric and not from experiments package.

Microsoft Reviewers: Open in CodeFlow

@ThomasMichon ThomasMichon merged commit 6cf165d into microsoft:master Jun 29, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Jul 1, 2018
* master: (151 commits)
  Css updates for card components (microsoft#5393)
  DatePicker MergeStyles step 2 - Converts scss to js styles (microsoft#5362)
  Update stale with 60 day comment and updated ignored label names. (microsoft#5388)
  replaced await for ie compat syntax - but still needs promise (microsoft#5387)
  Slider - mergestyle conversion (microsoft#5379)
  Applying package updates.
  Enabling publishing for charting and gridlayout. (microsoft#5378)
  TilesList: fadeOut overlay. (microsoft#5381)
  Pivot: JS Styling (microsoft#5324)
  ShimmeredDetailsList: wrapper for DetailsList with Shimmer. (microsoft#5374)
  dashboard-grid-layout improved example (microsoft#5373)
  Applying package updates.
  Addressing Issue microsoft#5165 - Using Customizer with Nav Component (microsoft#5361)
  Applying package updates.
  Address issue microsoft#5353 (microsoft#5359)
  Change log to trigger release (microsoft#5358)
  Fluent updates (microsoft#5357)
  TextField render value undefined as empty string (microsoft#5349)
  Applying package updates.
  DetailsColumn: css class changes to show gripper when hover on draggable columns (microsoft#5309)
  ...
@Vitalius1 Vitalius1 deleted the v-vibr/Ref_DetailsList_Shimmer branch July 3, 2018 00:01
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 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.

4 participants