-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ShimmerComponent new props #4254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
7df53a3
Adds basic skeleton of Shimmer Component to office-ui-fabric-react.
fe588ad
Register the Shimmer component in the library.
8eec1df
Adds basic skeleton of Shimmer Component to office-ui-fabric-react.
2fafb18
Register the Shimmer component in the library.
d4de449
Merge branch 'v-vibr/ShimmerComponent' of https://github.com/Vitalius…
6c6c90c
Starting to implement mergeStyles to create examples of component.
8a01736
Introduces the svg plus styles a little.
0df88f9
Adds css background-size to mergeStyles.api and adds basic shimmer an…
9dc20e5
Splits Shimmer into the main host and shapes inside.
575740f
Adds rectangle shape to shimmer.
d1200a9
Changes the logic to exposure of the shapes of shimmer only internaly.
1679fc3
Adds ability to to add different elements to the shimmer line.
7e017e2
Refactors the naming of some interfaces and forces a more strict type…
7d9493e
Moves the function bo get the borderAlignStyles to Shimmer.base.tsx
67550f6
Adds wrapper around the shimmer to position it absolute for fadeOut a…
be34e94
Creates two basic examples for shimmer page.
115c4fa
Sets a list with hovercards to demonstrate Shimmer Application.
76e6b37
Small changes in the logic of calculating the borders.
b280fd7
Merge branch 'master' into v-vibr/ShimmerComponent
67bca2f
Change log plus remove mergeStyleAPI change for a different PR
b26e1fb
Cleans TSLint errors.
15594af
Cleans unused import.
65c81ae
Moves the shimmer component to experiments folder.
e214e35
Adjusts all imports to make it run in experiments.
6c0533d
Adds Change log plus cleans the code a little.
769dc87
Corrects all typescript linting errors.
b63ecbc
Fixes another tslint error
349cfc9
Removes unnecessary circle state.
f793c63
Small fix for importing.
edc319d
Sets up a scrolling list simulating data loading when scrolling using…
ab3ce8d
Introduces more props to Shimmer.
2b9f0e8
Enables back simulation of asynchronus loading of data for example page.
5ec6b2e
Adds shimmer to DetailsList advanced example.
8c29055
Merge branch 'master' into v-vibr/ShimmerIntegration
828d9cd
Fixes some names and styles.
630a6cf
Merge branch 'master' into v-vibr/ShimmerComponent
2203780
Adds props and logic to prepare the shimmer to work with DetailsList …
9edc399
Moved ShimmerRectangle Interfaces in a different folder.
9cdccdc
Moves ShimmerCircle Interfaces to a different file.
f256225
Reevaluates some of the language for the documentation.
384373a
Changes the ShimmerRectangle name to ShimmerLine for better semantics…
e514fa7
Extracts a value to a constant.
5e553b3
Merging master with new changes.
c200526
Changes the logic of calculating the maxHeight and extracting height …
941dfd7
Changes the name for isDetailsList prop.
e2313a4
Merge branch 'master' into v-vibr/Shimmer
e3580ec
Renames Shimmer prop from isListMissingItem to isBaseStyle to give it…
e23a1ef
Cleans up the code a little.
7b07f62
Styles left margin only for the Shimmer Application Example.
f881b09
Merge branch 'master' into v-vibr/Shimmer
bae314d
Change log commit.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
common/changes/@uifabric/experiments/v-vibr-ShimmerComponent_2018-03-06-18-42.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "changes": [ | ||
| { | ||
| "packageName": "@uifabric/experiments", | ||
| "comment": "Adds a new Shimmer Component to experiments package.", | ||
| "type": "minor" | ||
| } | ||
| ], | ||
| "packageName": "@uifabric/experiments", | ||
| "email": "v-vibr@microsoft.com" | ||
| } | ||
11 changes: 11 additions & 0 deletions
11
common/changes/@uifabric/experiments/v-vibr-Shimmer_2018-03-13-19-06.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "changes": [ | ||
| { | ||
| "packageName": "@uifabric/experiments", | ||
| "comment": "Changes in the props and naming.", | ||
| "type": "minor" | ||
| } | ||
| ], | ||
| "packageName": "@uifabric/experiments", | ||
| "email": "v-vibr@microsoft.com" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ export interface IShimmerProps extends React.AllHTMLAttributes<HTMLElement> { | |
| componentRef?: (component: IShimmer) => void; | ||
|
|
||
| /** | ||
| * Sets the width of the shimmer wave container in percentages. | ||
| * Sets the width of the shimmer wave wrapper in percentages. | ||
| * @default 100% | ||
| */ | ||
| width?: number; | ||
|
|
@@ -30,6 +30,12 @@ export interface IShimmerProps extends React.AllHTMLAttributes<HTMLElement> { | |
| */ | ||
| isDataLoaded?: boolean; | ||
|
|
||
| /** | ||
| * Provide when Shimmer is intended to be used when using 'onRenderMissingItem' optional callback of the DetailsList Fabric Component. | ||
| * @default false | ||
| */ | ||
| isBaseStyle?: boolean; | ||
|
|
||
| /** | ||
| * Elements to render in one line of the Shimmer. | ||
| */ | ||
|
|
@@ -48,72 +54,75 @@ export interface IShimmerElement { | |
| type: ShimmerElementType; | ||
|
|
||
| /** | ||
| * The hight of the element (ICircle, ILine, IGap). | ||
| * The hight of the element in pixels (ICircle, ILine). | ||
| * Read more details for each specific element. | ||
| */ | ||
| height?: number; | ||
|
|
||
| /** | ||
| * The width of the element (ICircle, ILine, IGap). | ||
| * The width of the element in pixels (ILine, IGap). | ||
| * Read more details for each specific element. | ||
| */ | ||
| width?: number; | ||
| widthInPixel?: number; | ||
|
|
||
| /** | ||
| * The vertical alignemt of the element (ICircle, ILine, IGap). | ||
| * The width of the element in pixels (ILine, IGap). | ||
| * Read more details for each specific element. | ||
| */ | ||
| widthInPercentage?: number; | ||
|
|
||
| /** | ||
| * The vertical alignemt of the element (ICircle, ILine). | ||
| * @default center | ||
| */ | ||
| verticalAlign?: ShimmerElementVerticalAlign; | ||
| } | ||
|
|
||
| export interface ILine extends IShimmerElement { | ||
| /** | ||
| * Sets the height of the rectangle. | ||
| * The value will represent the height in pixels. | ||
| * @default 16 | ||
| * Sets the height of the shimmer line in pixels. | ||
| * @default 16px | ||
| */ | ||
| height?: number; | ||
|
|
||
| /** | ||
| * If not provided the line will the take the remaining space to fill the shimmer container. | ||
| * The value provided will represent the width as '%' relative to the shimmer container. | ||
| * The value provided will represent the width as '%' relative to the shimmer wrapper. | ||
| */ | ||
| width?: number; | ||
| } | ||
| widthInPercentage?: number; | ||
|
|
||
| export interface ICircle extends IShimmerElement { | ||
| /** | ||
| * Sets the height of the circle. | ||
| * The value will represent the height in pixels. | ||
| * @default 24 | ||
| * Sets the width of the Line to an exact value in pixels. | ||
| * @default 50px | ||
| */ | ||
| height?: number; | ||
| widthInPixel?: number; | ||
| } | ||
|
|
||
| export interface ICircle extends IShimmerElement { | ||
| /** | ||
| * Width of the circle element if provided will be ignored. | ||
| * The value will be set equal to the height of the circle for scale ratio reasons. | ||
| * Sets the height of the shimmer circle in pixels. | ||
| * @default 24px | ||
| */ | ||
| width?: number; | ||
| height?: number; | ||
| } | ||
|
|
||
| export interface IGap extends IShimmerElement { | ||
| /** | ||
| * Height for gap element will be ignored and set equal to the heighest element on the line. | ||
| * The value will be calculated as '%' relative the to shimmer wrapper. | ||
| */ | ||
| height?: number; | ||
| widthInPercentage?: number; | ||
|
|
||
| /** | ||
| * Sets the width relative to the shimmer container width for responsiveness reasons. | ||
| * The value will be calculated as '%' relative the to shimmer container. | ||
| * @default 1% | ||
| * Sets the width of the Gap to an exact value in pixels. | ||
| * @default 5px | ||
| */ | ||
| width?: number; | ||
| widthInPixel?: number; | ||
| } | ||
|
|
||
| export interface IShimmerStyleProps { | ||
| width?: number; | ||
| maxHeight?: number; | ||
| isDataLoaded?: boolean; | ||
| isBaseStyle?: boolean; | ||
| } | ||
|
|
||
| export interface IShimmerStyles { | ||
|
|
@@ -123,7 +132,7 @@ export interface IShimmerStyles { | |
| } | ||
|
|
||
| export const enum ShimmerElementType { | ||
| RECTANGLE = 'line', | ||
| LINE = 'line', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These enum values should just be camelCased.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. Will definitely change them in my next PR. Thanks! |
||
| CIRCLE = 'circle', | ||
| GAP = 'gap' | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vitalius1 are you working with someone on this? It would be great to have pair ownership to ensure we have someone who can more deeply provide feedback and shared fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I am. Mainly I get feedback from @atneik .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atneik can you review please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atneik can you review please?