Skip to content
Permalink
Browse files
feat(list-editor): delete list root node (DSP-1356) (#386)
* feat: adds support for deleting a root node if not in use

* feat: switches the buttons from using text to using mat-icons. Also adds some super fancy CSS.

* test: starting point for unit tests

* test: adds unit tests for list component
  • Loading branch information
mdelez committed Feb 17, 2021
1 parent 97230d1 commit 5d5eabf2521bd71a2b3055fc1f8b5b0c6ff043a5
Showing with 345 additions and 57 deletions.
  1. +9 −3 src/app/project/list/list.component.html
  2. +14 −0 src/app/project/list/list.component.scss
  3. +292 −53 src/app/project/list/list.component.spec.ts
  4. +30 −1 src/app/project/list/list.component.ts
@@ -66,9 +66,15 @@ <h2 class="mat-title">
<p class="mat-body" [matTooltip]="list.comments | dspStringifyStringLiteral" matTooltipPosition="above">
{{list.comments | dspStringifyStringLiteral | dspTruncate:64}}</p>
<span class="fill-remaining-space"></span>
<button mat-stroked-button
(click)="$event.stopPropagation(); openDialog('editListInfo', list.labels[0].value, list.id)">
Edit info
<button mat-button
(click)="$event.stopPropagation(); openDialog('editListInfo', list.labels[0].value, list.id)"
matTooltip="Edit info">
<mat-icon>edit</mat-icon>
</button>
<button mat-button class="delete"
(click)="$event.stopPropagation(); openDialog('deleteList', list.labels[0].value, list.id)"
matTooltip="Delete list">
<mat-icon>delete</mat-icon>
</button>
</mat-toolbar-row>
</mat-toolbar>
@@ -16,3 +16,17 @@
min-width: 140px;
}
}

.list-editor {
mat-toolbar-row {
button {
margin: 0% 0.5%;
padding: 1%;
min-width: 6%;
border-radius: 40px;
}
button:hover {
background-color: #ebebeb;
}
}
}
Loading

0 comments on commit 5d5eabf

Please sign in to comment.