-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cklog item and placeholder look. Also reformatted code to make future updates to backlog item type easier
- Loading branch information
1 parent
3175b20
commit 12e77d4
Showing
16 changed files
with
305 additions
and
155 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
.../src/app/pages/boards/backlog/backlog-item-table/backlog-drag/backlog-drag.component.html
This file contains 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,9 @@ | ||
<div class="flex flex-row space-x-8 items-center w-full h-14 bg-stone-700 rounded-md shadow-lg shadow-amber-400/30"> | ||
<h2 class="ml-2">{{backlogItem.title}}</h2> | ||
<h2>{{backlogItem.description}}</h2> | ||
<app-status-select [backlogItem]="backlogItem"></app-status-select> | ||
<app-backlog-type [backlogItem]="backlogItem"></app-backlog-type> | ||
<div class="w-10 h-10"> | ||
<app-user-avatar [user]="backlogItem.assignee" [isEmpty]="!backlogItem.assignee"></app-user-avatar> | ||
</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
.../src/app/pages/boards/backlog/backlog-item-table/backlog-drag/backlog-drag.component.scss
This file contains 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,4 @@ | ||
.avatar-container { | ||
width: 2.5em; | ||
height: 2.5em; | ||
} |
23 changes: 23 additions & 0 deletions
23
...c/app/pages/boards/backlog/backlog-item-table/backlog-drag/backlog-drag.component.spec.ts
This file contains 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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { BacklogDragComponent } from './backlog-drag.component'; | ||
|
||
describe('BacklogDragComponent', () => { | ||
let component: BacklogDragComponent; | ||
let fixture: ComponentFixture<BacklogDragComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [BacklogDragComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(BacklogDragComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
...nd/src/app/pages/boards/backlog/backlog-item-table/backlog-drag/backlog-drag.component.ts
This file contains 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,22 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { BacklogItem } from "@interfaces/boards/backlog/backlog.item"; | ||
import { StatusSelectComponent } from "@pages/boards/backlog/backlog-item-table/status-select/status-select.component"; | ||
import { BacklogTypeComponent } from "@pages/boards/backlog/backlog-item-table/backlog-type/backlog-type.component"; | ||
import { UserAvatarComponent } from "@pages/utils/user-avatar/user-avatar.component"; | ||
|
||
@Component({ | ||
selector: 'app-backlog-drag', | ||
standalone: true, | ||
imports: [ | ||
StatusSelectComponent, | ||
BacklogTypeComponent, | ||
UserAvatarComponent | ||
], | ||
templateUrl: './backlog-drag.component.html', | ||
styleUrl: './backlog-drag.component.scss' | ||
}) | ||
export class BacklogDragComponent { | ||
|
||
@Input() backlogItem!: BacklogItem; | ||
|
||
} |
This file contains 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 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
22 changes: 22 additions & 0 deletions
22
.../src/app/pages/boards/backlog/backlog-item-table/backlog-type/backlog-type.component.html
This file contains 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,22 @@ | ||
@switch (backlogItem.itemType) { | ||
@case (BacklogItemType.BUG) { | ||
<div matTooltip="Bug" class="type-icon" style="background-color: #ff0000;"> | ||
<ng-icon name="bootstrapBugFill"></ng-icon> | ||
</div> | ||
} | ||
@case (BacklogItemType.STORY) { | ||
<div matTooltip="Story" class="type-icon" style="background-color: #005f9f;"> | ||
<ng-icon name="featherBook"></ng-icon> | ||
</div> | ||
} | ||
@case (BacklogItemType.TASK) { | ||
<div matTooltip="Task" class="type-icon" style="background-color: #00910a; "> | ||
<ng-icon name="matTask"></ng-icon> | ||
</div> | ||
} | ||
@case (BacklogItemType.EPIC) { | ||
<div matTooltip="Epic" class="type-icon" style="background-color: #5200af;"> | ||
<ng-icon name="octContainer"></ng-icon> | ||
</div> | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
.../src/app/pages/boards/backlog/backlog-item-table/backlog-type/backlog-type.component.scss
This file contains 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,8 @@ | ||
.type-icon { | ||
height: 2em; | ||
width: 2em; | ||
border-radius: 50%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
23 changes: 23 additions & 0 deletions
23
...c/app/pages/boards/backlog/backlog-item-table/backlog-type/backlog-type.component.spec.ts
This file contains 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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { BacklogTypeComponent } from './backlog-type.component'; | ||
|
||
describe('BacklogTypeComponent', () => { | ||
let component: BacklogTypeComponent; | ||
let fixture: ComponentFixture<BacklogTypeComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [BacklogTypeComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(BacklogTypeComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
21 changes: 21 additions & 0 deletions
21
...nd/src/app/pages/boards/backlog/backlog-item-table/backlog-type/backlog-type.component.ts
This file contains 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,21 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { BacklogItem } from "@interfaces/boards/backlog/backlog.item"; | ||
import { BacklogItemType } from "@core/enum/BacklogItemType"; | ||
import { MatTooltip } from "@angular/material/tooltip"; | ||
import { NgIcon } from "@ng-icons/core"; | ||
|
||
@Component({ | ||
selector: 'app-backlog-type', | ||
standalone: true, | ||
imports: [ | ||
MatTooltip, | ||
NgIcon | ||
], | ||
templateUrl: './backlog-type.component.html', | ||
styleUrl: './backlog-type.component.scss' | ||
}) | ||
export class BacklogTypeComponent { | ||
|
||
@Input() backlogItem!: BacklogItem; | ||
protected readonly BacklogItemType = BacklogItemType; | ||
} |
9 changes: 9 additions & 0 deletions
9
...rc/app/pages/boards/backlog/backlog-item-table/status-select/status-select.component.html
This file contains 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,9 @@ | ||
<div class="status-background" [ngClass]="getStatusClass(backlogItem.status)"> | ||
<mat-select [panelWidth]="null" [(value)]="backlogItem.status"> | ||
@for (status of statuses; track status) { | ||
<mat-option (click)="updateBacklogItem()" | ||
class="status-panel-{{getStatusClass(status)}}" [value]="status">{{ status.replace('_', ' ')}} | ||
</mat-option> | ||
} | ||
</mat-select> | ||
</div> |
71 changes: 71 additions & 0 deletions
71
...rc/app/pages/boards/backlog/backlog-item-table/status-select/status-select.component.scss
This file contains 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,71 @@ | ||
mat-select { | ||
width: max-content; | ||
margin-left: 0.5em; | ||
margin-right: 0.5em; | ||
} | ||
|
||
.status-background { | ||
border-radius: 5px; | ||
width: max-content; | ||
height: 2em; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.status-background:hover { | ||
cursor: pointer; | ||
} | ||
|
||
.status-background.TODO { | ||
background-color: #464444; | ||
} | ||
|
||
.status-background.TODO:hover { | ||
background-color: lighten(#464444, 10%); | ||
} | ||
|
||
.status-background.IN_PROGRESS { | ||
background-color: rgba(67,183,239,0.35); | ||
} | ||
|
||
.status-background.IN_PROGRESS:hover { | ||
background-color: lighten(rgba(67,183,239,0.35), 10%); | ||
} | ||
|
||
.status-background.DONE { | ||
background-color: rgba(14,168,4,0.35); | ||
} | ||
|
||
.status-background.DONE:hover { | ||
background-color: lighten(rgba(14,168,4,0.35), 10%); | ||
} | ||
|
||
.status-panel { | ||
font-size: 0.5em; | ||
width: 3em; | ||
} | ||
|
||
.status-panel-TODO { | ||
background-color: #464444!important; | ||
} | ||
|
||
.status-panel-TODO:hover { | ||
background-color: lighten(#464444, 10%)!important; | ||
} | ||
|
||
.status-panel-IN_PROGRESS { | ||
background-color: rgba(67,183,239,0.35)!important; | ||
} | ||
|
||
.status-panel-IN_PROGRESS:hover { | ||
background-color: lighten(rgba(67,183,239,0.35), 10%)!important; | ||
} | ||
|
||
.status-panel-DONE { | ||
background-color: rgba(14,168,4, 0.55)!important; | ||
} | ||
|
||
.status-panel-DONE:hover { | ||
background-color: lighten(rgba(14,168,4, 0.55), 10%)!important; | ||
} |
23 changes: 23 additions & 0 deletions
23
...app/pages/boards/backlog/backlog-item-table/status-select/status-select.component.spec.ts
This file contains 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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { StatusSelectComponent } from './status-select.component'; | ||
|
||
describe('StatusSelectComponent', () => { | ||
let component: StatusSelectComponent; | ||
let fixture: ComponentFixture<StatusSelectComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [StatusSelectComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(StatusSelectComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.