Skip to content

feat: Skeleton loader for LoadAsync directive #1373

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 30 commits into from
Jan 20, 2022
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
602cd22
feat: added skeleton component
Jan 13, 2022
3a3d19b
feat: added skeleton component
Jan 13, 2022
cba76a7
fix: integrating skeleton component with loader
Jan 13, 2022
e81d1df
style: adding loader types and fixing display
Jan 13, 2022
e879a4e
feat: added skeleton shapes and styling
Jan 14, 2022
24015a1
fix: linting errors
Jan 14, 2022
3ef1fe2
style: minor style adjustments to skeletons
Jan 14, 2022
5fd455a
feat: added donut skeleton shape
Jan 14, 2022
7f1cbcc
Merge branch 'main' into skeleton-loader
Jan 14, 2022
91a4832
fix: requested changes
Jan 14, 2022
bf2b846
fix: linting fixes
Jan 14, 2022
a6f5b7e
fix: default isOldLoaderFlag to true
Jan 16, 2022
1048339
fix: requested changes
Jan 16, 2022
3d048dd
test: updated for loader component changes
Jan 17, 2022
39ed6a3
Merge branch 'main' into skeleton-loader
Jan 17, 2022
dbdd5cf
fix: appeasing linter
Jan 17, 2022
6d90a76
test: skeleton component testing
Jan 17, 2022
d416769
Merge branch 'main' into skeleton-loader
Jan 17, 2022
91c7214
refactor: requested changes
Jan 18, 2022
17b08ee
fix: appeasing linter
Jan 18, 2022
86212a4
refactor: tests to account for requested changes
Jan 18, 2022
8f19a6d
refactor: some of requested changes
Jan 19, 2022
2e2048d
Merge branch 'main' into skeleton-loader
Jan 19, 2022
48418e0
refactor: to appease linter with switch
Jan 19, 2022
c99cebe
refactor: requested changes
Jan 19, 2022
429fc03
refactor: linter
Jan 19, 2022
12f0047
refactor: requested changes
Jan 19, 2022
6a07033
refactor: naming change
Jan 19, 2022
65a867e
refactor: name placement to after class definition
Jan 19, 2022
0b7c6b4
Merge branch 'main' into skeleton-loader
Jan 19, 2022
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
8 changes: 4 additions & 4 deletions projects/components/src/skeleton/skeleton.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export class SkeletonComponent implements OnChanges {

public containerClass: string[];

public static skeletonClass: string = 'skeleton';
private static readonly SKELETON_CLASS_NAME: string = 'skeleton';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we usually keep static properties at the top, right after class definition.


public static repeatingClass: string = 'repeating';
private static readonly REPEATING_CLASS_NAME: string = 'repeating';

public constructor() {
this.containerClass = this.getContainerClass();
Expand All @@ -56,10 +56,10 @@ export class SkeletonComponent implements OnChanges {
}

public getContainerClass(): string[] {
const classes = [SkeletonComponent.skeletonClass, this.skeletonType];
const classes = [SkeletonComponent.SKELETON_CLASS_NAME, this.skeletonType];

if (this.skeletonType === SkeletonType.TableRow || this.skeletonType === SkeletonType.ListItem) {
classes.push(SkeletonComponent.repeatingClass);
classes.push(SkeletonComponent.REPEATING_CLASS_NAME);
}

return classes;
Expand Down