Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
425a25a
feat: Implement article search feature
fifth-island Jun 19, 2025
7f3760d
feat(search): implement semantic search frontend (iteration 2)
fifth-island Jun 24, 2025
e81090c
fix(tests): resolve test failures in CI
fifth-island Jun 24, 2025
09c8a85
Merge branch 'develop' into feature/article-search
fifth-island Jun 24, 2025
f8e812c
refactor: revert to GET request for search API
fifth-island Jul 16, 2025
500856e
feat: Remove ArticleSearchBar and use direct API calls based on Morit…
fifth-island Jul 17, 2025
01c1a88
refactor: Align frontend with updated search API response
fifth-island Jul 18, 2025
a9bb2b9
feat: Implement PDF viewer for search results
fifth-island Jul 21, 2025
4477955
fix: Add missing license file for pdf.js worker
fifth-island Jul 21, 2025
403a99f
feat(semantic-search): Implement language-agnostic pagination in Arti…
fifth-island Jul 23, 2025
146ed3b
feat: Implement responsive zoom and UI enhancements in ArticleDialog
fifth-island Jul 25, 2025
aba24cd
fix: readjustments for PDF displayer
fifth-island Aug 1, 2025
79d9a58
fix: contribute.md formatting and adapted to latest backend
fifth-island Aug 4, 2025
bd0d9b0
updated language changes
fifth-island Aug 20, 2025
b544a95
Fixed load bar, search bar centralization, and semantic search mathem…
fifth-island Aug 20, 2025
9b3f6b2
feat(semantic-search): Refactor and enhance component PART 2
fifth-island Aug 21, 2025
c5a9787
latest changes -- missing PDF package fixes and .env fixes
fifth-island Aug 22, 2025
7eeae6a
Merge remote-tracking branch 'origin/develop' into feature/article-se…
NXXR Nov 30, 2025
c12b07c
update package lock
NXXR Nov 30, 2025
896e758
remove redundant package entry
NXXR Nov 30, 2025
129366a
run formatter
NXXR Nov 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# This is for development only. For production you need to replace this with the actual URL.
VITE_API_URL=http://localhost:8000

# VITE_ARTICLE_API_URL= http://sc-010187l:8001/
VITE_ARTICLE_API_URL=http://localhost:8001
Comment on lines 4 to +8
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bad comment (Ours above too 😅). Explain what the Variable is for.
Also don't expose network internal or development names to git 😬 bad enough that we do this for the IDP below.

Suggested change
# This is for development only. For production you need to replace this with the actual URL.
VITE_API_URL=http://localhost:8000
# VITE_ARTICLE_API_URL= http://sc-010187l:8001/
VITE_ARTICLE_API_URL=http://localhost:8001
# Development only. For production you need to replace this with the actual URLto the Backend API (https://github.com/SciCompMod/ESID-Backend).
VITE_API_URL=http://localhost:8000
# Development only. For production you need to replace this with the actual URL to your Knowledgebase API (https://github.com/SciCompMod/ESID-Knowledgebase).
VITE_ARTICLE_API_URL=http://localhost:8001


###### IDP Settings ######
# Change accordingly for dev, staging or production

Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,15 @@ dist
reports
coverage

# .env
.eslintcache
.env
.venv
__pycache__/
/public/assets
/public/locales
/public/node_modules
/public/pdf.worker.min.mjs
.eslintcache
.env
.DS_Store
Comment on lines +17 to +28
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like some leftovers from development?
I don't see why we would have python stuff in our repo.
not sure why the pdf worker is in here if it's still committed as the .js 🤔 is that on purpose?

Suggested change
# .env
.eslintcache
.env
.venv
__pycache__/
/public/assets
/public/locales
/public/node_modules
/public/pdf.worker.min.mjs
.eslintcache
.env
.DS_Store
.env
.eslintcache

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for this change here, you are correct on your points. But I added the pdf worker here in an attempt to deal with the failing in loading PDFs, as there were two versions of the library. I still have not come to tangible fixes on this end.

2 changes: 1 addition & 1 deletion assets/third-party-attributions.json

Large diffs are not rendered by default.

58 changes: 28 additions & 30 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,43 +174,41 @@ would be difficult to handle with React's `props` alone.
![](images/ThemeGuidelines.svg 'ESID Design Guidelines')

**The alternative text color for lighter and darker variants where the contrast is not high enough is always either `#F2F2F2` (light text), or `#0C0B0D` (dark text).**

- The Spacing is done in 5 steps: `0 px`, `4 px`, `8 px`, `12 px`, and `26 px`

</details>

- The theme is provided using the [MUI Theme Provider](https://mui.com/customization/theming 'mui.com')
- <details>
<summary>It can be accessed in components like this: <i>(-- Click to expand --)</i></summary>

```tsx
import {useTheme} from '@mui/material/styles';

export default function MyComponent(): JSX.Element {
const theme = useTheme();

return (
<Box
sx={{
/*
* Available theme properties can be found at their declaration inside the App.tsx.
*/
// accessing theme variables
background: theme.palette.background.default,
border: `1px solid ${theme.palette.divider}`,

// accessing theme typography
typography: theme.typography.h1,
// or
typography: 'h1',

// accessing theme spacing via index [0, 4, 8, 12, 26]
margin: theme.spacing(3), // 12 px margin
}}
></Box>
);
}
```
```tsx
import {useTheme} from '@mui/material/styles';

export default function MyComponent(): JSX.Element {
const theme = useTheme();

return (
<Box
sx={{
/*
* Available theme properties can be found at their declaration inside the App.tsx.
*/
// accessing theme variables
background: theme.palette.background.default,
border: `1px solid ${theme.palette.divider}`,

// accessing theme typography
typography: theme.typography.h1,
// or
typography: 'h1',

// accessing theme spacing via index [0, 4, 8, 12, 26]
margin: theme.spacing(3), // 12 px margin
}}
></Box>
);
}
```

</details>

Expand Down
118 changes: 117 additions & 1 deletion locales/de-global.json5
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
attribution: 'Attribution',
changelog: 'Versionshistorie',
},
applicationMenu: {
about: 'Über ESID',
accessibility: 'Barrierefreiheit',
changelog: 'Änderungsprotokoll',
imprint: 'Impressum',
privacyPolicy: 'Datenschutzerklärung',
termsOfUse: 'Nutzungsbedingungen',
},
Comment thread
NXXR marked this conversation as resolved.
Outdated
scenarioSelector: {
label: 'Szenario',
},
tour: 'Tour',
Comment thread
NXXR marked this conversation as resolved.
Outdated
},
'icon-bar': {
'previous-day-tooltip': 'Vorheriger Tag',
Expand All @@ -28,6 +40,7 @@
},
history: {
placeholder: 'history',
title: 'Verlauf',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.
(the history was an old placeholder feature and isn't used at all)

Suggested change
title: 'Verlauf',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I wasn't just sure if I should remove history or just teh title

},
BEZ: {
K: 'Kreis',
Expand Down Expand Up @@ -119,11 +132,114 @@
today: 'Heute',
more: 'Mehr',
less: 'Weniger',
search: 'Suche',
search: {
articles: {
placeholder: 'Artikel suchen...',
ariaLabel: 'Suchen Sie nach Artikeln und Dokumentationen',
},
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unused as far as I can see 🤔
So we can either delete it completely of revert it to it's original value

Suggested change
search: {
articles: {
placeholder: 'Artikel suchen...',
ariaLabel: 'Suchen Sie nach Artikeln und Dokumentationen',
},
},
search: 'Suche',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. It is no longer being used.
IT is because before making the final feature, I built a prototype feature to play around. Unfortunately, this prototype left a lot of garbage in the code. I apologize for missing this step of cleaning

germany: 'Deutschland',
WIP: 'Diese Funktionalität befindet sich noch in der Entwicklung.',
'no-data': 'Keine Daten',
'loki-logo': 'LOKI-Logo',
okay: 'Okay',
yAxisLabel: 'Wert',
semanticSearch: {
title: 'Semantische Suche',
description: 'Stellen Sie Fragen zu den Daten, Modellen oder Funktionen, um relevante Dokumentationen und Artikel zu finden.',
placeholder: 'Geben Sie eine Frage für die Suche ein...',
suggestions: {
title: 'Oder versuchen Sie eine dieser Optionen:',
scenarioForecasting: 'Wie unterstützt die ESID-Plattform szenariobasierte Prognosen für Ausbrüche von Infektionskrankheiten?',
purpose: 'Was ist der Zweck von ESID?',
},
results: {
initialPrompt: 'Geben Sie eine Frage ein, um nach relevanten Artikeln und Dokumentationen zu suchen.',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a duplicate of SemanticSearch.placeholder and is not used anywhere as far as I can tell.

Suggested change
initialPrompt: 'Geben Sie eine Frage ein, um nach relevanten Artikeln und Dokumentationen zu suchen.',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Removed from the EN and teh DE translation

noResults: 'Keine Ergebnisse gefunden. Versuchen Sie, Ihre Frage umzuformulieren oder andere Schlüsselwörter zu verwenden.',
resultsFound_one: '1 Ergebnis gefunden für',
resultsFound_other: '{{count}} Ergebnisse gefunden für',
},
classification: {
direct: 'Direkte Antwort',
high: 'Hohe Relevanz',
related: 'Verwandt',
},
pagination: {
previous: 'Zurück',
next: 'Weiter',
pageOf: 'Seite {{current}} von {{total}}',
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not used as far as I can see 🤔

Suggested change
pagination: {
previous: 'Zurück',
next: 'Weiter',
pageOf: 'Seite {{current}} von {{total}}',
},

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

},
language: 'Sprache',
legal: {
attributions: 'Namensnennung',
},
scenarios: {
cards: {
cases: 'Fälle',
hospitalization: 'Krankenhausaufnahme',
intensiveCare: 'Intensivpflege',
death: 'Todesfälle',
rValue: 'R-Wert',
doublingTime: 'Verdopplungszeit',
attackRate: 'Befallsrate',
},
},
groups: {
title: 'Filter',
addGroup: 'Gruppe hinzufügen',
manageGroups: 'Gruppen verwalten',
noGroups: 'Keine Gruppen definiert.',
groupName: {
label: 'Gruppenname',
alreadyExists: 'Eine Gruppe mit diesem Namen existiert bereits.',
cannotBeEmpty: 'Der Gruppenname darf nicht leer sein.',
},
options: {
delete: 'Löschen',
edit: 'Bearbeiten',
},
},
compartments: {
title: 'Kompartimente',
S: 'Suszeptible',
E: 'Exponiert',
I: 'Infiziert',
R: 'Genesen',
H: 'Hospitalisiert',
U: 'Intensivpflege',
D: 'Verstorben',
X: 'Geimpft',
V: 'Geimpft (geschützt)',
W: 'Geimpft (nachlassend)',
},
lineChart: {
title: 'Liniendiagramm',
showConfidence: 'Konfidenzintervalle anzeigen',
logScale: 'Logarithmische Skala',
sum: 'Summe',
yAxis: 'Wert',
},
map: {
title: 'Karte',
legendTitle: 'Fälle pro 100k',
incidences: {
total: 'Gesamt',
per100k: 'pro 100k',
per100kIn7Days: '7-Tage-Inzidenz pro 100k',
},
},
parameter: {
title: 'Parameter',
compartment: 'Kompartiment',
reset: 'Auf Standardwert zurücksetzen',
r0: 'Basisreproduktionszahl (R0)',
},
history: {
title: 'Verlauf',
},
language: 'Sprache',
legal: {
attributions: 'Namensnennung',
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem to be duplicates and/or translations that don't have anything to do with your feature.

Suggested change
language: 'Sprache',
legal: {
attributions: 'Namensnennung',
},
scenarios: {
cards: {
cases: 'Fälle',
hospitalization: 'Krankenhausaufnahme',
intensiveCare: 'Intensivpflege',
death: 'Todesfälle',
rValue: 'R-Wert',
doublingTime: 'Verdopplungszeit',
attackRate: 'Befallsrate',
},
},
groups: {
title: 'Filter',
addGroup: 'Gruppe hinzufügen',
manageGroups: 'Gruppen verwalten',
noGroups: 'Keine Gruppen definiert.',
groupName: {
label: 'Gruppenname',
alreadyExists: 'Eine Gruppe mit diesem Namen existiert bereits.',
cannotBeEmpty: 'Der Gruppenname darf nicht leer sein.',
},
options: {
delete: 'Löschen',
edit: 'Bearbeiten',
},
},
compartments: {
title: 'Kompartimente',
S: 'Suszeptible',
E: 'Exponiert',
I: 'Infiziert',
R: 'Genesen',
H: 'Hospitalisiert',
U: 'Intensivpflege',
D: 'Verstorben',
X: 'Geimpft',
V: 'Geimpft (geschützt)',
W: 'Geimpft (nachlassend)',
},
lineChart: {
title: 'Liniendiagramm',
showConfidence: 'Konfidenzintervalle anzeigen',
logScale: 'Logarithmische Skala',
sum: 'Summe',
yAxis: 'Wert',
},
map: {
title: 'Karte',
legendTitle: 'Fälle pro 100k',
incidences: {
total: 'Gesamt',
per100k: 'pro 100k',
per100kIn7Days: '7-Tage-Inzidenz pro 100k',
},
},
parameter: {
title: 'Parameter',
compartment: 'Kompartiment',
reset: 'Auf Standardwert zurücksetzen',
r0: 'Basisreproduktionszahl (R0)',
},
history: {
title: 'Verlauf',
},
language: 'Sprache',
legal: {
attributions: 'Namensnennung',
},

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove from both de and en translations

}
118 changes: 117 additions & 1 deletion locales/en-global.json5
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
attribution: 'Attribution',
changelog: 'Changelog',
},
applicationMenu: {
about: 'About ESID',
accessibility: 'Accessibility',
changelog: 'Changelog',
imprint: 'Imprint',
privacyPolicy: 'Privacy Policy',
termsOfUse: 'Terms of Use',
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the geman translation file.
Duplicate of the above.

Suggested change
applicationMenu: {
about: 'About ESID',
accessibility: 'Accessibility',
changelog: 'Changelog',
imprint: 'Imprint',
privacyPolicy: 'Privacy Policy',
termsOfUse: 'Terms of Use',
},

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

scenarioSelector: {
label: 'Scenario',
},
tour: 'Tour',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not connected to your feature.

Suggested change
scenarioSelector: {
label: 'Scenario',
},
tour: 'Tour',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

},
'icon-bar': {
'previous-day-tooltip': 'Previous Day',
Expand All @@ -34,6 +46,7 @@
},
history: {
Tabtitle: 'history',
title: 'History',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused feature.

Suggested change
title: 'History',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

},
details: {
Tabtitle: 'Details',
Expand Down Expand Up @@ -128,7 +141,12 @@
today: 'Today',
more: 'More',
less: 'Less',
search: 'Search',
search: {
articles: {
placeholder: 'Search articles...',
ariaLabel: 'Search for articles and documentation',
},
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused -> revert to original or delete.

Suggested change
search: {
articles: {
placeholder: 'Search articles...',
ariaLabel: 'Search for articles and documentation',
},
},
search: 'Search',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

germany: 'Germany',
'no-data': 'No Data',
'loki-logo': 'LOKI logo',
Expand All @@ -141,4 +159,102 @@
WIP: 'This functionality is still work in progress.',
okay: 'Okay',
yAxisLabel: 'Value',
values: 'Values',
name: 'Name',
date: 'Date',
semanticSearch: {
title: 'Semantic Search',
description: 'Ask questions about the data, models, or functionality to find relevant documentation and articles.',
placeholder: 'Enter a question to search...',
suggestions: {
title: 'Or try one of these:',
scenarioForecasting: 'How does the ESID platform support scenario-based forecasting for infectious disease outbreaks?',
purpose: 'What is ESID purpose?',
},
results: {
initialPrompt: 'Enter a question to search for relevant articles and documentation.',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate of semanticSearch.placeholder? unused anyways.

Suggested change
initialPrompt: 'Enter a question to search for relevant articles and documentation.',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate has been removed, there is only one now

noResults: 'No results found. Try rephrasing your question or using different keywords.',
resultsFound_one: 'Found 1 result for',
resultsFound_other: 'Found {{count}} results for',
},
classification: {
direct: 'Direct Answer',
high: 'High Relevance',
related: 'Related',
},
pagination: {
previous: 'Previous',
next: 'Next',
pageOf: 'Page {{current}} of {{total}}',
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused.

Suggested change
pagination: {
previous: 'Previous',
next: 'Next',
pageOf: 'Page {{current}} of {{total}}',
},

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

},
language: 'Language',
legal: {
attributions: 'Attributions',
},
scenarios: {
cards: {
cases: 'Cases',
hospitalization: 'Hospitalization',
intensiveCare: 'Intensive Care',
death: 'Deaths',
rValue: 'R-Value',
doublingTime: 'Doubling Time',
attackRate: 'Attack Rate',
},
},
groups: {
title: 'Filter',
addGroup: 'Add Group',
manageGroups: 'Manage Groups',
noGroups: 'No Groups defined.',
groupName: {
label: 'Group Name',
alreadyExists: 'A group with this name already exists.',
cannotBeEmpty: 'The group name cannot be empty.',
},
options: {
delete: 'Delete',
edit: 'Edit',
},
},
compartments: {
title: 'Compartments',
S: 'Susceptible',
E: 'Exposed',
I: 'Infected',
R: 'Recovered',
H: 'Hospitalized',
U: 'Intensive Care',
D: 'Dead',
X: 'Vaccinated',
V: 'Vaccinated (protected)',
W: 'Vaccinated (waned)',
},
lineChart: {
title: 'Line Chart',
showConfidence: 'Show confidence intervals',
logScale: 'Logarithmic Scale',
sum: 'Sum',
yAxis: 'Value',
},
map: {
title: 'Map',
legendTitle: 'Cases per 100k',
incidences: {
total: 'Total',
per100k: 'per 100k',
per100kIn7Days: '7-day-incidence per 100k',
},
},
parameter: {
title: 'Parameters',
compartment: 'Compartment',
reset: 'Reset to default value',
r0: 'Basic Reproduction Number (R0)',
},
language: 'Language',
legal: {
attributions: 'Attributions',
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates and/or not applicable to feature

Suggested change
language: 'Language',
legal: {
attributions: 'Attributions',
},
scenarios: {
cards: {
cases: 'Cases',
hospitalization: 'Hospitalization',
intensiveCare: 'Intensive Care',
death: 'Deaths',
rValue: 'R-Value',
doublingTime: 'Doubling Time',
attackRate: 'Attack Rate',
},
},
groups: {
title: 'Filter',
addGroup: 'Add Group',
manageGroups: 'Manage Groups',
noGroups: 'No Groups defined.',
groupName: {
label: 'Group Name',
alreadyExists: 'A group with this name already exists.',
cannotBeEmpty: 'The group name cannot be empty.',
},
options: {
delete: 'Delete',
edit: 'Edit',
},
},
compartments: {
title: 'Compartments',
S: 'Susceptible',
E: 'Exposed',
I: 'Infected',
R: 'Recovered',
H: 'Hospitalized',
U: 'Intensive Care',
D: 'Dead',
X: 'Vaccinated',
V: 'Vaccinated (protected)',
W: 'Vaccinated (waned)',
},
lineChart: {
title: 'Line Chart',
showConfidence: 'Show confidence intervals',
logScale: 'Logarithmic Scale',
sum: 'Sum',
yAxis: 'Value',
},
map: {
title: 'Map',
legendTitle: 'Cases per 100k',
incidences: {
total: 'Total',
per100k: 'per 100k',
per100kIn7Days: '7-day-incidence per 100k',
},
},
parameter: {
title: 'Parameters',
compartment: 'Compartment',
reset: 'Reset to default value',
r0: 'Basic Reproduction Number (R0)',
},
language: 'Language',
legal: {
attributions: 'Attributions',
},

}
Loading
Loading