Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Add imageErrorAs to IIconProps",
"type": "minor"
}
],
"packageName": "office-ui-fabric-react",
"email": "staylo@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ exports[`ActivityItem renders compact with an icon correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand Down Expand Up @@ -594,7 +593,6 @@ exports[`ActivityItem renders with an icon correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ export class Breadcrumb extends BaseComponent<IBreadcrumbProps, any> {
directionalHint: DirectionalHint.bottomLeftEdge
} }
/>
{ Icon({
className: css('ms-Breadcrumb-chevron', styles.chevron),
iconName: getRTL() ? 'ChevronLeft' : 'ChevronRight'
}) }
{ <Icon
className={ css('ms-Breadcrumb-chevron', styles.chevron) }
iconName={ getRTL() ? 'ChevronLeft' : 'ChevronRight' }
/> }
</li>
) }
{ renderedItems.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ exports[`Breadcrumb renders breadcumb correctly 1`] = `
</span>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Breadcrumb-chevron
{
Expand Down Expand Up @@ -73,7 +72,6 @@ exports[`Breadcrumb renders breadcumb correctly 1`] = `
</span>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Breadcrumb-chevron
{
Expand Down Expand Up @@ -102,7 +100,6 @@ exports[`Breadcrumb renders breadcumb correctly 1`] = `
</span>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Breadcrumb-chevron
{
Expand Down Expand Up @@ -131,7 +128,6 @@ exports[`Breadcrumb renders breadcumb correctly 1`] = `
</span>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Breadcrumb-chevron
{
Expand Down Expand Up @@ -253,7 +249,6 @@ exports[`Breadcrumb renders breadcumb correctly 2`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Button-icon
{
Expand All @@ -278,7 +273,6 @@ exports[`Breadcrumb renders breadcumb correctly 2`] = `
</button>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Breadcrumb-chevron
{
Expand Down Expand Up @@ -307,7 +301,6 @@ exports[`Breadcrumb renders breadcumb correctly 2`] = `
</span>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Breadcrumb-chevron
{
Expand Down Expand Up @@ -336,7 +329,6 @@ exports[`Breadcrumb renders breadcumb correctly 2`] = `
</span>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Breadcrumb-chevron
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,12 @@ export class BaseButton extends BaseComponent<IBaseButtonProps, IBaseButtonState
} = this.props;

if (iconProps) {
return Icon({
...iconProps,
className: this._classNames.icon
});
return (
<Icon
{...iconProps}
className={ this._classNames.icon }
/>
);
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ exports[`Button renders CommandBarButton correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Button-icon
{
Expand Down Expand Up @@ -227,7 +226,6 @@ exports[`Button renders CommandBarButton correctly 1`] = `
</div>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Button-menuIcon
{
Expand Down Expand Up @@ -553,7 +551,6 @@ exports[`Button renders IconButton correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Button-icon
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ exports[`Calendar Test rendering simplest calendar Renders simple calendar corre
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand All @@ -60,7 +59,6 @@ exports[`Calendar Test rendering simplest calendar Renders simple calendar corre
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand Down Expand Up @@ -916,7 +914,6 @@ exports[`Calendar Test rendering simplest calendar Renders simple calendar corre
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand All @@ -936,7 +933,6 @@ exports[`Calendar Test rendering simplest calendar Renders simple calendar corre
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand Down
16 changes: 8 additions & 8 deletions packages/office-ui-fabric-react/src/components/Check/Check.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export class Check extends BaseComponent<ICheckProps, {}> {
}
) }
>
{ Icon({
className: 'ms-Check-circle ' + styles.circle,
iconName: 'CircleRing'
}) }
{ Icon({
className: 'ms-Check-check ' + styles.check,
iconName: 'StatusCircleCheckmark'
}) }
{ <Icon
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.

The original intent here was that because Check is a hotspot, calling the stateless component directly was a performance optimization. I think the perf optimization is dated though, so I think this is fine.

I made a codepen to test the theory about if JSX or function calls are faster. They look pretty comparable.

https://codepen.io/dzearing/pen/xYpjrQ

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.

That's for creation, is there also a management overhead later when removing etc?

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.

The example also has a "clear" button which also measures, and I didn't see a noticeable impact.

className={ 'ms-Check-circle ' + styles.circle }
iconName={ 'CircleRing' }
/> }
{ <Icon
className={ 'ms-Check-check ' + styles.check }
iconName={ 'StatusCircleCheckmark' }
/> }
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ exports[`Checkbox renders Checkbox correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ exports[`ComboBox Renders ComboBox correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Button-icon
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class CommandBar extends BaseComponent<ICommandBarProps, ICommandBarState
'ms-CommandBarSearch-iconWrapper ms-CommandBarSearch-iconSearchWrapper',
styles.searchIconWrapper, styles.searchIconSearchWrapper) }
>
{ Icon({ iconName: 'Search' }) }
{ <Icon iconName={ 'Search' } /> }
</div>
<div
className={ css(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ exports[`CommandBar renders CommandBar correctly 1`] = `
</span>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-CommandBarItem-chevronDown
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ exports[`DatePicker renders default DatePicker correctly 1`] = `
/>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-DatePicker-event--without-label
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ exports[`DocumentCard renders DocumentCard correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ exports[`Dropdown multi-select Renders multiselect Dropdown correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Dropdown-caretDown
{
Expand Down Expand Up @@ -84,7 +83,6 @@ exports[`Dropdown single-select Renders single-select Dropdown correctly 1`] = `
>
<i
aria-hidden={true}
aria-label={undefined}
className=
ms-Dropdown-caretDown
{
Expand Down
Loading