Skip to content

Remove ShimmeredDetailsList from the DetailsList export#5468

Merged
dzearing merged 2 commits intomicrosoft:masterfrom
ThomasMichon:shimmer-bundle
Jul 31, 2018
Merged

Remove ShimmeredDetailsList from the DetailsList export#5468
dzearing merged 2 commits intomicrosoft:masterfrom
ThomasMichon:shimmer-bundle

Conversation

@ThomasMichon
Copy link
Copy Markdown
Member

@ThomasMichon ThomasMichon commented Jul 6, 2018

PR #5374 incorrectly added ShimmeredDetailsList to the DetailsList export root, defeating the purpose of factoring it into its own component to reduce bundle cost.

Microsoft Reviewers: Open in CodeFlow

@ThomasMichon
Copy link
Copy Markdown
Member Author

@dzearing technically this is a breaking change, but it's the only way to fix the bundle issue without burdening downstream projects.

export * from './DetailsList.types';
export * from './DetailsRow';
export * from './DetailsRowCheck';
export * from './ShimmeredDetailsList';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ThomasMichon As a solution you should maybe add a ShimmeredDetailsList.ts file at the packages/office-ui-fabric-react/src level to serve as an entry point to this component which will contain export ShimmeredDetailsList from './components/DetailsList/ShimmeredDetailslIst'. Plus the build is breaking cause I am using this ShimmeredDetailsList in a Shimmer Example page. My solution should fix this build error and give us the result we want regarding the bundle size. I am not an expert when it comes to bundling so I leave this to you...

import { createListItems } from '../../../utilities/exampleData';
import { IColumn, buildColumns, SelectionMode, Toggle } from 'office-ui-fabric-react/lib/index';
import { ShimmeredDetailsList } from '../../DetailsList';
import { ShimmeredDetailsList } from '../../DetailsList/ShimmeredDetailsList';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ThomasMichon This is in code examples and any user reading the documentation will see it... I don't believe this shows them how to appropriately import this component. Shouldn't it be import { ShimmeredDetailsList } from 'office-ui-fabric-react/lib/ShimmeredDetailsList';? Read my previous comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't even remember why I used ../../DetailsList

@cliffkoh
Copy link
Copy Markdown
Contributor

cliffkoh commented Jul 9, 2018

We should probably drop an email to the v-team informing of this breaking change "technicality". I am fine/supportive with making this kind of change in a minor bump otherwise (treating it as a bug fix).

@@ -0,0 +1 @@
export * from './components/DetailsList/ShimmeredDetailsList';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the top level bundle be called ShimmeredDetailsList? (unless we anticipate adding more shimmered components here over time?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I thought the same thing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

@dzearing dzearing left a comment

Choose a reason for hiding this comment

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

Please rename top level import

@dzearing
Copy link
Copy Markdown
Member

Ping @ThomasMichon can you please edit your filename and resolve conflicts?

@Vitalius1 Once that is complete, can you help review and get this checked in?

Thank you!

@dzearing dzearing merged commit 100076f into microsoft:master Jul 31, 2018
nulikartik pushed a commit to nulikartik/office-ui-fabric-react that referenced this pull request Aug 1, 2018
* Do not force ShimmeredDetailsList into the bundle with DetailsList

* Update change output
@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