Skip to content

Commit

Permalink
Merge pull request #7 from luizppa/skelleton-loading
Browse files Browse the repository at this point in the history
Remove loading conditional render
  • Loading branch information
luizppa authored Nov 4, 2021
2 parents d3994b9 + 38e4c08 commit e6d8d2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="board-container" [style.minHeight]="minHeight">
<div class="columns" *ngIf="!loading">
<div class="board-container">
<div class="columns">
<div class="labels-column" *ngIf="showLabels">
<span [style.fontSize]="labelSize" class="day-label" [style.height]="labelContainerHeight">Fri</span>
<span [style.fontSize]="labelSize" class="day-label" [style.height]="labelContainerHeight">Wed</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class GithubBoardComponent implements OnInit, OnChanges {
}

private loadData(): void {
this.loadContributions({});
if (!!this.profile){
this.githubService.loadData(this.profile).then(
(contributions) => {
Expand Down Expand Up @@ -93,12 +94,4 @@ export class GithubBoardComponent implements OnInit, OnChanges {
return this.options.showLegend ?? true;
}

public get minHeight(): string {
const cellSize = this.options.cellSize ?? DEFAULT_CELL_SIZE;
const labelSize = this.options.labels?.size ?? DEFAULT_LABEL_SIZE;
const legendSize = 8 + Math.max(12, cellSize);

return `${((cellSize + 6) * 7) + labelSize + legendSize}px`;
}

}

0 comments on commit e6d8d2c

Please sign in to comment.