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": "@uifabric/experiments",
"comment": "Shimmer: imports audited",
"type": "patch"
}
],
"packageName": "@uifabric/experiments",
"email": "v-vibr@microsoft.com"
}
10 changes: 2 additions & 8 deletions packages/experiments/src/components/Shimmer/Shimmer.base.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import * as React from 'react';
import {
BaseComponent,
classNamesFunction,
} from '../../Utilities';
import { BaseComponent, classNamesFunction } from '../../Utilities';
import { DefaultPalette, IStyleSet } from '../../Styling';
import {
IShimmerProps,
IShimmerStyleProps,
Expand All @@ -13,10 +11,6 @@ import {
IGap,
ShimmerElementVerticalAlign,
} from './Shimmer.types';
import {
DefaultPalette,
IStyleSet
} from '../../Styling';
import { ShimmerLine } from './ShimmerLine/ShimmerLine';
import { ShimmerGap } from './ShimmerGap/ShimmerGap';
import { ShimmerCircle } from './ShimmerCircle/ShimmerCircle';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { IShimmerStyleProps, IShimmerStyles } from './Shimmer.types';
import {
keyframes,
DefaultPalette
} from '../../Styling';
import { keyframes, DefaultPalette } from '../../Styling';

export function getStyles(props: IShimmerStyleProps): IShimmerStyles {
const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as React from 'react';
import {
IStyle
} from '../../Styling';
import { IStyle } from '../../Styling';
import { IStyleFunction } from '../../Utilities';

export interface IShimmer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import {
IShimmerCircleStyleProps,
IShimmerCircleStyles
} from './ShimmerCircle.types';
import {
IStyleSet,
DefaultPalette
} from 'office-ui-fabric-react/lib/Styling';
import { IStyleSet, DefaultPalette } from '../../../Styling';

export function getStyles(props: IShimmerCircleStyleProps): IShimmerCircleStyles {
const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
styled
} from '../../../Utilities';
import { styled } from '../../../Utilities';
import { getStyles } from './ShimmerCircle.styles';
import {
IShimmerCircleProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import * as React from 'react';
import {
IStyle,
IStyleSet
} from '../../../Styling';
import { IStyle, IStyleSet } from '../../../Styling';
import { IStyleFunction } from '../../../Utilities';

export interface IShimmerCircle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
IShimmerGapStyleProps,
IShimmerGapStyles
} from './ShimmerGap.types';
import { IStyleSet, DefaultPalette } from 'office-ui-fabric-react/lib/Styling';
import { IStyleSet, DefaultPalette } from '../../../Styling';

export function getStyles(props: IShimmerGapStyleProps): IShimmerGapStyles {
const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
styled
} from '../../../Utilities';
import { styled } from '../../../Utilities';
import {
IShimmerGapProps,
IShimmerGapStyleProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import * as React from 'react';
import {
IStyle,
IStyleSet
} from '../../../Styling';
import { IStyle, IStyleSet } from '../../../Styling';
import { IStyleFunction } from '../../../Utilities';

export interface IShimmerGap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
IShimmerLineStyleProps,
IShimmerLineStyles
} from './ShimmerLine.types';
import { IStyleSet } from 'office-ui-fabric-react/lib/Styling';
import { IStyleSet } from '../../../Styling';

export function getStyles(props: IShimmerLineStyleProps): IShimmerLineStyles {
const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
styled
} from '../../../Utilities';
import { styled } from '../../../Utilities';
import {
IShimmerLineProps,
IShimmerLineStyleProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import * as React from 'react';
import {
IStyle,
IStyleSet
} from '../../../Styling';
import { IStyle, IStyleSet } from '../../../Styling';
import { IStyleFunction } from '../../../Utilities';

export interface IShimmerLine {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@uifabric/example-app-base';
import { ShimmerBasicExample } from './examples/Shimmer.Basic.Example';
import { ShimmerLoadDataExample } from './examples/Shimmer.LoadData.Example';
import { ShimmerApplicationExample } from 'experiments/lib/components/Shimmer/examples/Shimmer.Application.Example';
import { ShimmerApplicationExample } from './examples/Shimmer.Application.Example';

const ShimmerBasicExampleCode = require('!raw-loader!experiments/src/components/Shimmer/examples/Shimmer.Basic.Example.tsx') as string;
// tslint:disable-next-line:max-line-length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
IShimmerTileStyleProps,
IShimmerTileStyles
} from './ShimmerTile.types';
import { TileLayoutSizes, TileSize } from 'experiments/lib/Tile';
import { TileLayoutSizes, TileSize } from '../../Tile';
import { ShimmerGap } from '../ShimmerGap/ShimmerGap';
import { getRenderedElements } from '../Shimmer.base';
import { ShimmerElementType as ElemType } from 'experiments/lib/Shimmer';
import { ShimmerElementType as ElemType } from '../Shimmer.types';

const enum ShimmerTileLayoutValues {
largeSquareWidth = 96,
Expand Down Expand Up @@ -59,7 +59,7 @@ const PLACEHOLDER_SIZES: {
const getClassNames = classNamesFunction<IShimmerTileStyleProps, IShimmerTileStyles>();

export class ShimmerTileBase extends BaseComponent<IShimmerTileProps, {}> {
private _classNames: {[key in keyof IShimmerTileStyles]: string};
private _classNames: { [key in keyof IShimmerTileStyles]: string };

constructor(props: IShimmerTileProps) {
super(props);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {
styled
} from '../../../Utilities';
import { styled } from '../../../Utilities';
import {
IShimmerTileProps,
IShimmerTileStyleProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import * as React from 'react';
import {
IStyle
} from 'office-ui-fabric-react/lib/Styling';
import {
ISize,
IStyleFunction
} from 'office-ui-fabric-react/lib/Utilities';
import { TileSize } from 'experiments/lib/Tile';
import { IStyle } from '../../../Styling';
import { ISize, IStyleFunction } from '../../../Utilities';
import { TileSize } from '../../Tile';

export interface IShimmerTile {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
HoverCard,
IExpandingCardProps
} from 'office-ui-fabric-react/lib/HoverCard';
import { createListItems } from '@uifabric/example-app-base';
import { createListItems } from '@uifabric/example-app-base/lib/utilities/data';
import {
IColumn,
DetailsList,
Expand All @@ -16,7 +16,7 @@ import {
IDetailsRowProps,
DetailsRow
} from 'office-ui-fabric-react';
import { Shimmer } from 'experiments/lib/Shimmer';
import { Shimmer } from '../Shimmer';
import './Shimmer.Example.scss';

export interface IItem {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Shimmer } from 'experiments/lib/Shimmer';
import { Shimmer } from '../Shimmer';
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.

this should be @uifabric/experiments/lib/Shimmer

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 might be wrong.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dzearing This is in the same package and linter is complaining about it. Why not ../Shimmer?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The build is failing if I use @uifabric/experiments/lib/Shimmer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ERROR in ./src/components/Shimmer/examples/Shimmer.Application.Example.tsx
Module not found: Error: Can't resolve '@uifabric/experiments/lib/Shimmer' in '/Users/vitaliebraga/Desktop/UIFabric/office-ui-fabric-react/packages/experiments/src/components/Shimmer/examples'
 @ ./src/components/Shimmer/examples/Shimmer.Application.Example.tsx 11:16-60
 @ ./src/components/Shimmer/ShimmerPage.tsx
 @ ./src/demo/AppDefinition.tsx
 @ ./src/demo/index.tsx
 @ multi (webpack)-dev-server/client?http://localhost:4322 ./src/demo/index.tsx
ℹ 「wdm」: Failed to compile.

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.

This is a code example. A user reading it can't use your example when you are using relative paths in examples :)

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 project webpack config and tsconfig are messed up here and should be resolving @uifabric/experiments.
I'm ok checking this in, but we need to scrub these examples and the configs

import { Toggle } from 'office-ui-fabric-react/lib/Toggle';

export interface IShimmerLoadDataExample {
Expand Down
11 changes: 10 additions & 1 deletion packages/experiments/src/components/Shimmer/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
export * from './Shimmer';
export * from './Shimmer.types';
export * from './Shimmer.base';
export * from './Shimmer.types';
export * from './ShimmerTile/ShimmerTile';
export * from './ShimmerTile/ShimmerTile.types';
export * from './ShimmerLine/ShimmerLine';
export * from './ShimmerLine/ShimmerLine.types';
export * from './ShimmerCircle/ShimmerCircle';
export * from './ShimmerCircle/ShimmerCircle.types';
export * from './ShimmerGap/ShimmerGap';
export * from './ShimmerGap/ShimmerGap.types';