From 8ca09daf97e29842a6a15a1016527ec70c13eab2 Mon Sep 17 00:00:00 2001 From: Matthieu Hochlander Date: Fri, 24 Oct 2025 16:24:48 +0200 Subject: [PATCH 1/3] Revert "update field order in SearchResult" This reverts commit c7a70e1c00289bccf561f2dab5299a9368741162. --- src/app/js/public/search/SearchResult.tsx | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/app/js/public/search/SearchResult.tsx b/src/app/js/public/search/SearchResult.tsx index e773849c79..ef14a06f6b 100644 --- a/src/app/js/public/search/SearchResult.tsx +++ b/src/app/js/public/search/SearchResult.tsx @@ -145,6 +145,24 @@ const SearchResult = ({ {result[titleField.name]} )} + {thirdDetailField && result[thirdDetailField.name] && ( +
+
+ {result[thirdDetailField.name]} +
+
+ )} {descriptionField && result[descriptionField.name] && ( )} - {thirdDetailField && result[thirdDetailField.name] && ( -
-
- {result[thirdDetailField.name]} -
-
- )} )} Date: Fri, 24 Oct 2025 16:29:31 +0200 Subject: [PATCH 2/3] Label third resource detail as subtitle and move it under the resource title in admin form. --- src/app/custom/translations.tsv | 2 +- src/app/js/admin/Search/SearchForm.tsx | 19 ++++++++++--------- src/common/overview.ts | 3 +++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/app/custom/translations.tsv b/src/app/custom/translations.tsv index 11d81e1d8c..1d2f3a6adb 100644 --- a/src/app/custom/translations.tsv +++ b/src/app/custom/translations.tsv @@ -997,7 +997,7 @@ "resource_description" "Resource description" "Description de la ressource" "resource_detail_first" "Resource detail first" "Premier détail de la ressource" "resource_detail_second" "Resource detail second" "Second détail de la ressource" -"resource_detail_third" "Resource detail third" "Troisième détail de la ressource" +"resource_detail_third" "Resource subtitle (e.g. author)" "Sous-titre de la ressource (exemple : auteur)" "resource_sort_field" "Resource sort field" "Champ de tri de la ressource" "resource_sort_order" "Sort order" "Ordre de tri" "dialog_import_has_enrichments" "Import has enrichments" "L'import a des enrichissements" diff --git a/src/app/js/admin/Search/SearchForm.tsx b/src/app/js/admin/Search/SearchForm.tsx index 1975e16c34..29d52ddd55 100644 --- a/src/app/js/admin/Search/SearchForm.tsx +++ b/src/app/js/admin/Search/SearchForm.tsx @@ -411,6 +411,16 @@ export const SearchForm = ({ fields, loadField }: SearchFormProps) => { clearText={translate('clear')} isLoading={isPending} /> + {/* Resource detail 3 is used as subtitle. */} + { clearText={translate('clear')} isLoading={isPending} /> -
diff --git a/src/common/overview.ts b/src/common/overview.ts index 742efedf45..4420fd9f33 100644 --- a/src/common/overview.ts +++ b/src/common/overview.ts @@ -3,6 +3,9 @@ export const RESOURCE_TITLE = 1; export const RESOURCE_DESCRIPTION = 2; export const RESOURCE_DETAIL_1 = 3; export const RESOURCE_DETAIL_2 = 4; +/** + * Resource detail 3 is used as subtitle. + */ export const RESOURCE_DETAIL_3 = 6; export const SUBRESOURCE_TITLE = 5; From d8d5721145676f5b89e683a38d0cc8d049195d1c Mon Sep 17 00:00:00 2001 From: Matthieu Hochlander Date: Fri, 24 Oct 2025 15:57:39 +0200 Subject: [PATCH 3/3] Fix e2e enrichment test. --- cypress/support/enrichmentFormPage.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cypress/support/enrichmentFormPage.ts b/cypress/support/enrichmentFormPage.ts index 2c51478593..129494f108 100644 --- a/cypress/support/enrichmentFormPage.ts +++ b/cypress/support/enrichmentFormPage.ts @@ -43,6 +43,7 @@ export const updateNameEnrichment = () => { cy.contains('Save', { timeout: 500 }).click({ force: true, }); + cy.wait(3000); cy.reload(); cy.findByLabelText('Name *', { timeout: 3500 }).should( 'have.value',