From d49522a28226aef51b79da53041896362b036c82 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Thu, 28 Nov 2024 15:16:15 +0100 Subject: [PATCH] [ACS-9012] Truncate text in saved searches description --- extension.schema.json | 16 ++++++++++++++++ .../dialog/unique-search-name-validator.ts | 4 +++- .../smart-list/saved-searches-list-schema.ts | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/extension.schema.json b/extension.schema.json index 8664fe4d9a..b2ed2072ff 100644 --- a/extension.schema.json +++ b/extension.schema.json @@ -590,6 +590,14 @@ "description": "Toggles resizable state of the column", "type": "boolean" }, + "draggable": { + "description": "Toggles draggable state of the column", + "type": "boolean" + }, + "isHidden": { + "description": "Toggles hidden state of the column", + "type": "boolean" + }, "template": { "description": "Column template id", "type": "string" @@ -597,6 +605,14 @@ "desktopOnly": { "description": "Display column only for large screens", "type": "boolean" + }, + "truncated": { + "description": "Should text in the column be truncated?", + "type": "boolean" + }, + "maxTextLength": { + "description": "Maximum text length before truncation", + "type": "number" } } }, diff --git a/projects/aca-content/src/lib/components/search/search-save/dialog/unique-search-name-validator.ts b/projects/aca-content/src/lib/components/search/search-save/dialog/unique-search-name-validator.ts index 3b0b8ac038..b69300e279 100644 --- a/projects/aca-content/src/lib/components/search/search-save/dialog/unique-search-name-validator.ts +++ b/projects/aca-content/src/lib/components/search/search-save/dialog/unique-search-name-validator.ts @@ -34,7 +34,9 @@ export class UniqueSearchNameValidator implements AsyncValidator { validate(control: AbstractControl): Observable { return this.savedSearchesService.getSavedSearches().pipe( map((searches) => - searches.some((search) => search.name === control.value) ? { message: 'APP.BROWSE.SEARCH.SAVE_SEARCH.SEARCH_NAME_NOT_UNIQUE_ERROR' } : null + searches.some((search) => search.name === control.value && control.dirty) + ? { message: 'APP.BROWSE.SEARCH.SAVE_SEARCH.SEARCH_NAME_NOT_UNIQUE_ERROR' } + : null ), catchError(() => of(null)) ); diff --git a/projects/aca-content/src/lib/components/search/search-save/list/smart-list/saved-searches-list-schema.ts b/projects/aca-content/src/lib/components/search/search-save/list/smart-list/saved-searches-list-schema.ts index 29352ebbd2..3e1fce0cd4 100644 --- a/projects/aca-content/src/lib/components/search/search-save/list/smart-list/saved-searches-list-schema.ts +++ b/projects/aca-content/src/lib/components/search/search-save/list/smart-list/saved-searches-list-schema.ts @@ -38,7 +38,8 @@ export const savedSearchesListSchema = { title: 'APP.BROWSE.SEARCH.SAVE_SEARCH.LIST.DESCRIPTION', class: 'adf-ellipsis-cell', sortable: false, - draggable: false + draggable: false, + truncated: true } ] };