Skip to content

Commit

Permalink
Fix up siblings and parents dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
floogulinc committed Jun 17, 2024
1 parent 0d26780 commit c513123
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 31 deletions.
15 changes: 0 additions & 15 deletions src/app/file-info-sheet/file-info-sheet.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,3 @@
.known-url-list-item-title {
text-decoration: none;
}

.tag-chip-list {
.tag-chip {
// restore old text wrapping behavior
padding-block: calc((var(--mdc-chip-container-height) - max(var(--mdc-chip-with-avatar-avatar-size), var(--mdc-chip-label-text-line-height))) / 2);
height: 100%;
}

.tag-chip-text {
white-space: wrap;
overflow-wrap: anywhere;
}
}


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 mat-dialog-title>Siblings and Parents for "{{data.tag}}"</h1>
<h1 mat-dialog-title>Siblings and Parents</h1>
<div mat-dialog-content>

@if (siblingsAndParents$ | async; as siblingsAndParents) {
Expand All @@ -7,24 +7,28 @@ <h1 mat-dialog-title>Siblings and Parents for "{{data.tag}}"</h1>
@for (service of siblingsAndParents | orderBy: 'serviceName' | orderBy: '-serviceType'; track service.serviceKey) {
<mat-tab [label]="service.serviceName">
<ng-template matTabContent>
<p>
Ideal tag:
<mat-chip-row
class="theming tag-chip tag-color"
[attr.data-tag-namespace]="service.ideal_tag| tagNamespace"
[matMenuTriggerFor]="tagMenu"
[matMenuTriggerData]="{tag: service.ideal_tag}"
>
<div class="tag-chip-text">{{service.ideal_tag}}</div>
</mat-chip-row>
</p>
<mat-accordion multi>
<mat-expansion-panel >
<mat-expansion-panel expanded>
<mat-expansion-panel-header>
Ideal
</mat-expansion-panel-header>
<mat-chip-listbox class="mat-mdc-chip-set-stacked tag-chip-list" aria-orientation="vertical" aria-label="File tags" [selectable]="false">
<mat-chip-option
class="theming tag-chip tag-color"
[attr.data-tag-namespace]="service.ideal_tag| tagNamespace"
[matMenuTriggerFor]="tagMenu"
[matMenuTriggerData]="{tag: service.ideal_tag}"
>
<div class="tag-chip-text">{{service.ideal_tag}}</div>
</mat-chip-option>
</mat-chip-listbox>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header>
Siblings ({{service.siblings.length}})
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<mat-chip-listbox class="mat-mdc-chip-set-stacked" aria-orientation="vertical" aria-label="File tags" [selectable]="false">
<mat-chip-listbox class="mat-mdc-chip-set-stacked tag-chip-list" aria-orientation="vertical" aria-label="File tags" [selectable]="false">
@for (tag of (service.siblings | orderBy); track tag) {
<mat-chip-option
class="theming tag-chip tag-color"
Expand All @@ -43,7 +47,7 @@ <h1 mat-dialog-title>Siblings and Parents for "{{data.tag}}"</h1>
Ancestors ({{service.ancestors.length}})
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<mat-chip-listbox class="mat-mdc-chip-set-stacked" aria-orientation="vertical" aria-label="File tags" [selectable]="false">
<mat-chip-listbox class="mat-mdc-chip-set-stacked tag-chip-list" aria-orientation="vertical" aria-label="File tags" [selectable]="false">
@for (tag of (service.ancestors | orderBy); track tag) {
<mat-chip-option
class="theming tag-chip tag-color"
Expand All @@ -62,7 +66,7 @@ <h1 mat-dialog-title>Siblings and Parents for "{{data.tag}}"</h1>
Descendants ({{service.descendants.length}})
</mat-expansion-panel-header>
<ng-template matExpansionPanelContent>
<mat-chip-listbox class="mat-mdc-chip-set-stacked" aria-orientation="vertical" aria-label="File tags" [selectable]="false">
<mat-chip-listbox class="mat-mdc-chip-set-stacked tag-chip-list" aria-orientation="vertical" aria-label="File tags" [selectable]="false">
@for (tag of (service.descendants | orderBy); track tag) {
<mat-chip-option
class="theming tag-chip tag-color"
Expand Down
14 changes: 14 additions & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,20 @@ mat-icon.mat-mdc-card-avatar {
text-overflow: ellipsis;
}

.tag-chip-list {
.tag-chip {
// restore old text wrapping behavior
padding-block: calc((var(--mdc-chip-container-height) - max(var(--mdc-chip-with-avatar-avatar-size), var(--mdc-chip-label-text-line-height))) / 2);
height: 100%;
}

.tag-chip-text {
white-space: wrap;
overflow-wrap: anywhere;
}
}



.flex-row {
display: flex;
Expand Down

0 comments on commit c513123

Please sign in to comment.