From 60e9abe96d86a55446de4f1c58208b9ad9592c71 Mon Sep 17 00:00:00 2001 From: Vitalie Braga Date: Fri, 6 Apr 2018 15:48:17 -0700 Subject: [PATCH 1/4] Exports an enum from Tile.tsx needed for ShimmerTile creation. --- packages/experiments/src/components/Tile/Tile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/experiments/src/components/Tile/Tile.tsx b/packages/experiments/src/components/Tile/Tile.tsx index 1a18e013a8ed87..ce904749d0435a 100644 --- a/packages/experiments/src/components/Tile/Tile.tsx +++ b/packages/experiments/src/components/Tile/Tile.tsx @@ -14,7 +14,7 @@ const SignalStyles: any = SignalStylesModule; const CheckStyles: any = CheckStylesModule; // tslint:enable:no-any -const enum TileLayoutValues { +export const enum TileLayoutValues { nameplatePadding = 12, largeNameplateNameHeight = 15, smallNameplateNameHeight = 12, From 34e9f7ec844e965b6d00122ffd1a6af62d58f5ec Mon Sep 17 00:00:00 2001 From: Vitalie Braga Date: Fri, 6 Apr 2018 15:56:00 -0700 Subject: [PATCH 2/4] Change log. --- .../v-vibr-TileEnumExport_2018-04-06-22-50.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@uifabric/experiments/v-vibr-TileEnumExport_2018-04-06-22-50.json diff --git a/common/changes/@uifabric/experiments/v-vibr-TileEnumExport_2018-04-06-22-50.json b/common/changes/@uifabric/experiments/v-vibr-TileEnumExport_2018-04-06-22-50.json new file mode 100644 index 00000000000000..9a49d7d3584264 --- /dev/null +++ b/common/changes/@uifabric/experiments/v-vibr-TileEnumExport_2018-04-06-22-50.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@uifabric/experiments", + "comment": "Tile: exporting an enum to use the values in creating a PlaceholderTile in Shimmer component.", + "type": "patch" + } + ], + "packageName": "@uifabric/experiments", + "email": "v-vibr@microsoft.com" +} \ No newline at end of file From 5a885d930d2d98c85e12a66300b5a1a0bb25db25 Mon Sep 17 00:00:00 2001 From: Vitalie Braga Date: Sat, 7 Apr 2018 21:03:55 -0700 Subject: [PATCH 3/4] Exports another const needed for ShimmerPlaceholderTile for values to be in one source. --- packages/experiments/src/components/Tile/Tile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/experiments/src/components/Tile/Tile.tsx b/packages/experiments/src/components/Tile/Tile.tsx index ce904749d0435a..80c91a494ecfd8 100644 --- a/packages/experiments/src/components/Tile/Tile.tsx +++ b/packages/experiments/src/components/Tile/Tile.tsx @@ -29,7 +29,7 @@ export interface ITileState { isModal?: boolean; } -const SIZES: { +export const SIZES: { [P in TileSize]: { nameplatePadding: number; nameplateNameHeight: number; From abac998e2ec4568869fa6a77ab89b8295c1bf839 Mon Sep 17 00:00:00 2001 From: Vitalie Braga Date: Mon, 9 Apr 2018 15:17:54 -0700 Subject: [PATCH 4/4] Renames a SIZES to TileLayoutSizes. --- packages/experiments/src/components/Tile/Tile.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/experiments/src/components/Tile/Tile.tsx b/packages/experiments/src/components/Tile/Tile.tsx index 80c91a494ecfd8..6f86d42cc5f773 100644 --- a/packages/experiments/src/components/Tile/Tile.tsx +++ b/packages/experiments/src/components/Tile/Tile.tsx @@ -29,7 +29,7 @@ export interface ITileState { isModal?: boolean; } -export const SIZES: { +export const TileLayoutSizes: { [P in TileSize]: { nameplatePadding: number; nameplateNameHeight: number; @@ -401,7 +401,7 @@ export function getTileLayout(tileElement: JSX.Element): ITileLayout { nameplateActivityHeight, nameplateNameHeight, foregroundMargin - } = SIZES[tileSize]; + } = TileLayoutSizes[tileSize]; let nameplateHeight = 0;