From 850bb69c4e996902144e49f1dbd1a2d461c2553e Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 30 Jul 2025 15:10:46 +0300 Subject: [PATCH 1/3] UI: Add ellipsis to entity list and subtype list chip and fixed api usage state display value --- .../home/components/entity/entity-filter-view.component.ts | 3 +++ .../shared/components/entity/entity-list.component.html | 1 + .../components/entity/entity-subtype-list.component.html | 1 + ui-ngx/src/styles.scss | 7 +++++++ 4 files changed, 12 insertions(+) diff --git a/ui-ngx/src/app/modules/home/components/entity/entity-filter-view.component.ts b/ui-ngx/src/app/modules/home/components/entity/entity-filter-view.component.ts index ac7333079d..7eae04452d 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entity-filter-view.component.ts +++ b/ui-ngx/src/app/modules/home/components/entity/entity-filter-view.component.ts @@ -128,6 +128,9 @@ export class EntityFilterViewComponent implements ControlValueAccessor { {edgeTypes}); } break; + case AliasFilterType.apiUsageState: + this.filterDisplayValue = this.translate.instant('alias.filter-type-apiUsageState'); + break; case AliasFilterType.entityViewType: const entityViewTypesQuoted = []; this.filter.entityViewTypes.forEach((entityViewType) => { diff --git a/ui-ngx/src/app/shared/components/entity/entity-list.component.html b/ui-ngx/src/app/shared/components/entity/entity-list.component.html index 9510f2a952..6bf7cdb78d 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-list.component.html +++ b/ui-ngx/src/app/shared/components/entity/entity-list.component.html @@ -25,6 +25,7 @@ {{entity.name}} diff --git a/ui-ngx/src/app/shared/components/entity/entity-subtype-list.component.html b/ui-ngx/src/app/shared/components/entity/entity-subtype-list.component.html index 595010fb19..6635921d7f 100644 --- a/ui-ngx/src/app/shared/components/entity/entity-subtype-list.component.html +++ b/ui-ngx/src/app/shared/components/entity/entity-subtype-list.component.html @@ -22,6 +22,7 @@ {{customTranslate(entitySubtype)}} diff --git a/ui-ngx/src/styles.scss b/ui-ngx/src/styles.scss index d3cc76b687..147f3087da 100644 --- a/ui-ngx/src/styles.scss +++ b/ui-ngx/src/styles.scss @@ -1255,6 +1255,13 @@ pre.tb-highlight { } } + .tb-chip-row-ellipsis { + overflow: hidden; + .mdc-evolution-chip__cell--primary, .mdc-evolution-chip__text-label { + overflow: hidden; + } + } + @media #{$mat-lt-md} { .mat-mdc-form-field { .mat-mdc-form-field-infix { From d4116e368d61e515e893a5f76f6c72a23f0f3bd6 Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 30 Jul 2025 16:39:57 +0300 Subject: [PATCH 2/3] UI: Refactorign chip --- ...lated-field-arguments-table.component.html | 2 +- ...lated-field-arguments-table.component.scss | 6 ----- .../string-items-list.component.html | 1 + .../string-items-list.component.scss | 22 ------------------- .../components/string-items-list.component.ts | 2 +- ui-ngx/src/styles.scss | 2 +- 6 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 ui-ngx/src/app/shared/components/string-items-list.component.scss diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.html b/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.html index b4b5a939e1..4086b3e7b0 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.html +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.html @@ -80,7 +80,7 @@ {{ 'entity.key' | translate }} - +
{{ argument.refEntityKey.key }}
diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.scss b/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.scss index ae8fd25170..430958d0f4 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.scss +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/arguments-table/calculated-field-arguments-table.component.scss @@ -55,12 +55,6 @@ } :host ::ng-deep { - .mat-mdc-standard-chip { - .mdc-evolution-chip__cell--primary, .mdc-evolution-chip__action--primary, .mdc-evolution-chip__text-label { - overflow: hidden; - } - } - .arguments-table:not(.arguments-table-with-error) { .mdc-data-table__row:last-child .mat-mdc-cell { border-bottom: none; diff --git a/ui-ngx/src/app/shared/components/string-items-list.component.html b/ui-ngx/src/app/shared/components/string-items-list.component.html index d467fbe5f0..0469be2589 100644 --- a/ui-ngx/src/app/shared/components/string-items-list.component.html +++ b/ui-ngx/src/app/shared/components/string-items-list.component.html @@ -23,6 +23,7 @@ {{ label }} diff --git a/ui-ngx/src/app/shared/components/string-items-list.component.scss b/ui-ngx/src/app/shared/components/string-items-list.component.scss deleted file mode 100644 index 726344037c..0000000000 --- a/ui-ngx/src/app/shared/components/string-items-list.component.scss +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright © 2016-2025 The Thingsboard Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -.tb-string-items-list { - .mat-mdc-standard-chip { - .mdc-evolution-chip__cell--primary, .mat-mdc-chip-action-label { - overflow: hidden; - } - } -} diff --git a/ui-ngx/src/app/shared/components/string-items-list.component.ts b/ui-ngx/src/app/shared/components/string-items-list.component.ts index 5fe6f44609..1c210fdf1f 100644 --- a/ui-ngx/src/app/shared/components/string-items-list.component.ts +++ b/ui-ngx/src/app/shared/components/string-items-list.component.ts @@ -39,7 +39,7 @@ export interface StringItemsOption { @Component({ selector: 'tb-string-items-list', templateUrl: './string-items-list.component.html', - styleUrls: ['./string-items-list.component.scss'], + styleUrls: [], providers: [ { provide: NG_VALUE_ACCESSOR, diff --git a/ui-ngx/src/styles.scss b/ui-ngx/src/styles.scss index 147f3087da..a8cf53534e 100644 --- a/ui-ngx/src/styles.scss +++ b/ui-ngx/src/styles.scss @@ -1257,7 +1257,7 @@ pre.tb-highlight { .tb-chip-row-ellipsis { overflow: hidden; - .mdc-evolution-chip__cell--primary, .mdc-evolution-chip__text-label { + .mdc-evolution-chip__cell--primary, .mdc-evolution-chip__action--primary, .mdc-evolution-chip__text-label { overflow: hidden; } } From 9fa36fa31028c4dd7d4eada9aed0ba326b53368a Mon Sep 17 00:00:00 2001 From: Artem Dzhereleiko Date: Wed, 30 Jul 2025 17:50:46 +0300 Subject: [PATCH 3/3] UI: Fixed adaptive for alarm type list in filter panel --- .../alarm/alarm-filter-config.component.scss | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss b/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss index 2ee3c0089d..c9e5eee944 100644 --- a/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss +++ b/ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +@import '../scss/constants'; + :host { display: flex; max-width: 100%; @@ -39,16 +42,12 @@ tb-entity-subtype-list { flex: 1; - width: 180px; + @media #{$mat-gt-xs} { + width: 180px; + } .mdc-evolution-chip-set__chips { width: 100%; } } - - .mat-mdc-chip { - .mdc-evolution-chip__cell, .mat-mdc-chip-action, .mat-mdc-chip-action-label { - overflow: hidden; - } - } } }