From e1172154cf00aceeeceb2c5f5b0082a6fdffefff Mon Sep 17 00:00:00 2001 From: Flavien VIDAL Date: Tue, 26 May 2026 15:28:03 +0200 Subject: [PATCH 1/3] SCENARIO: Title of each glose that makes up a hexapla should be displayed (see #425). Co-authored-by: Arthur DE PETIGNY --- frontend/scenarios/link_document.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/scenarios/link_document.feature b/frontend/scenarios/link_document.feature index f6090714..83d29732 100644 --- a/frontend/scenarios/link_document.feature +++ b/frontend/scenarios/link_document.feature @@ -23,6 +23,8 @@ Scénario: pour le comparer avec un autre Et une session active avec mon compte Quand je réutilise mon document reconnaissable en tant que glose de citation et que je me focalise dessus Alors la colonne 1 contient "Il était une fois une veuve" + Et l'entête de la colonne 1 est "Les fées (Charles Perrault)" + Et l'entête de la colonne 2 est "A tündérek (Charles Perrault)" Et la colonne 2 contient "Volt egyszer egy özvegyasszony" Et la colonne 2 contient "MÁSIK TANULSÁG" From 381049dc99ef1271526ea2bda30ed450e8f51123 Mon Sep 17 00:00:00 2001 From: Flavien VIDAL Date: Tue, 26 May 2026 15:49:26 +0200 Subject: [PATCH 2/3] TEST: Title of each glose that makes up a hexapla should be displayed (see #425). Co-authored-by: Arthur DE PETIGNY --- frontend/tests/outcome.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/tests/outcome.js b/frontend/tests/outcome.js index 0720f45f..e2ceae9b 100644 --- a/frontend/tests/outcome.js +++ b/frontend/tests/outcome.js @@ -200,6 +200,10 @@ Alors("la colonne {int} contient {string}", (column, text) => { cy.contains(`.lectern .main .col .col:nth-child(${column})`, text); }); +Alors("l'entête de la colonne {int} est {string}", (column, text) => { + cy.contains(`.lectern .row .main .col .row .col:nth-child(${column}) span.work`, text); +}); + Alors("la glose en mode édition contient {string}", (text) => { cy.click_on_text('content', '…'); cy.get('textarea').should('contain', text); From ca7c8a8cd7ddd19a046a49041c667d65c4f5eb33 Mon Sep 17 00:00:00 2001 From: VIALAMorgane Date: Tue, 2 Jun 2026 16:59:54 +0200 Subject: [PATCH 3/3] FIX : Title of each glose that makes up a hexapla should be displayed (see #425). Co-authored-by:Gabriel DOSNE gabriel.dosne@utt.fr We, Gabriel DOSNE, Morgane VIALA, hereby grant to Hyperglosae maintainers the right to publish our contribution under the terms of any licenses the Free Software Foundation classifies as Free Software Licenses --- frontend/src/components/OpenedDocuments.jsx | 2 +- frontend/src/components/Passage.jsx | 25 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/OpenedDocuments.jsx b/frontend/src/components/OpenedDocuments.jsx index c51f6de2..c6715b8a 100644 --- a/frontend/src/components/OpenedDocuments.jsx +++ b/frontend/src/components/OpenedDocuments.jsx @@ -34,7 +34,7 @@ function OpenedDocuments({id, margin, metadata, parallelDocuments, rawEditMode, {parallelDocuments.passages.map(({rubric, source, scholia}, i) => ) } diff --git a/frontend/src/components/Passage.jsx b/frontend/src/components/Passage.jsx index 7001609e..83de9fed 100644 --- a/frontend/src/components/Passage.jsx +++ b/frontend/src/components/Passage.jsx @@ -10,7 +10,7 @@ import EditableText from '../components/EditableText'; import DiscreeteDropdown from './DiscreeteDropdown'; import CommentFragmentAction from '../menu-items/CommentFragmentAction'; -function Passage({source, rubric, scholia, margin, sourceId, isComposite, rawEditMode, setRawEditMode, backend, setLastUpdate}) { +function Passage({source, metadata, rubric, scholia, margin, sourceId, isComposite, rawEditMode, setRawEditMode, backend, setLastUpdate}) { const [selectedText, setSelectedText] = useState(); const [highlightedText, setHighlightedText] = useState(''); const [fragment, setFragment] = useState(); @@ -31,7 +31,7 @@ function Passage({source, rubric, scholia, margin, sourceId, isComposite, rawEdi {!isFromScratch && - + {source} @@ -44,13 +44,32 @@ function Passage({source, rubric, scholia, margin, sourceId, isComposite, rawEdi ); } -function PassageSource({children, isComposite, highlightedText, setHighlightedText, setFragment, selectedText, setSelectedText, margin}) { +function PassageSource({children, metadata, isComposite, highlightedText, setHighlightedText, setFragment, selectedText, setSelectedText, margin, rubric}) { + const compositeTitleStyle = {color: 'crimson', textAlign: 'left'}; + let format = (actors, prefix = '', suffix = '') => + actors && (prefix + [actors].flat().join(' & ') + suffix); + let getCaption = (dc_title, dc_spatial, actors, prefix = '', suffix = '') => dc_title + (dc_spatial ? `, ${dc_spatial} ` : ' ') + (format(actors, prefix, suffix)); + let documentsMetadata = metadata.forwardLinkedDocuments; // Can be undefined ! + if (documentsMetadata !== undefined) { + documentsMetadata = documentsMetadata.filter(doc => 'dc_title' in doc); + } + console.log(JSON.stringify(documentsMetadata)); return ( {isComposite ? ( {children.map((chunk, index) => + {(rubric === '0' || rubric == null) && documentsMetadata !== undefined ? ( +
+ + {documentsMetadata[index] !== undefined ? ( + getCaption(documentsMetadata[index].dc_title, documentsMetadata[index].dc_spatial, documentsMetadata[index].dc_creator, '(', ')') + ) : ('')} + +
+ ) : (null) + } {chunk}