Browse Source

Fixed "Add new widget" button text breaking onto two lines when a widgets bundle has a long title (#16371)

* Fixed "Add new widget" button label wrapping on narrow widgets bundle page

* Used tbTruncateWithTooltip for bundle title and dropped redundant nowrap rule
pull/16395/head
Maksym Tsymbarov 1 month ago
committed by GitHub
parent
commit
ca1752bb1c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.html
  2. 5
      ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.scss

2
ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.html

@ -15,7 +15,7 @@
(click)="goBack()"> (click)="goBack()">
<mat-icon>arrow_back</mat-icon> <mat-icon>arrow_back</mat-icon>
</button> </button>
<span class="mat-headline-5">{{ widgetsBundle.title }}: {{ 'widget.widgets' | translate }}</span> <span class="mat-headline-5" tbTruncateWithTooltip>{{ widgetsBundle.title }}: {{ 'widget.widgets' | translate }}</span>
<span class="flex-1"></span> <span class="flex-1"></span>
@if (!isReadOnly) { @if (!isReadOnly) {
<button mat-flat-button color="primary" [disabled]="isLoading$ | async" <button mat-flat-button color="primary" [disabled]="isLoading$ | async"

5
ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.scss

@ -13,6 +13,7 @@
.tb-bundle-widgets-card { .tb-bundle-widgets-card {
.mat-mdc-card-header-text { .mat-mdc-card-header-text {
flex: 1; flex: 1;
min-width: 0;
} }
} }
} }
@ -39,6 +40,10 @@
gap: 8px; gap: 8px;
.mat-headline-5 { .mat-headline-5 {
margin: 0; margin: 0;
min-width: 0;
}
> button {
flex-shrink: 0;
} }
} }

Loading…
Cancel
Save