DLR-SC / ESID

This is the repository to the ESID frontend for visualization of infectious disease propagation.
Apache License 2.0
15 stars 3 forks source link

Implemented a generalized version of the Map, LineChart, and Scenario components using VVAFER approach #367

Open LorenzoSerloni opened 3 weeks ago

LorenzoSerloni commented 3 weeks ago

Description

This PR implements a generalized version of the Map, LineChart, and Scenario components, replacing all previously used components. Each component now uses a data context to communicate, as suggested in the VVAFER paper futhermore we introduced the wrapper approach proposed for the Map & LineChart. The data context employs the useContext hook in React for component communication.

Related Issues

Design Decisions

This implementation is inspired by the VVAFER paper, which suggests using a centralized data socket to enhance communication between components.

Performance & Quality

Test coverage report: https://coveralls.io/jobs/144875985 Lighthouse report: https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1718809076688-87755.report.html

Checklist

I, the author of this PR checked the following requirements for good software quality:

I, the reviewer checked the following things:

github-actions[bot] commented 3 weeks ago

Test Results

67 tests  +28   67 :white_check_mark: +28   14s :stopwatch: +3s 29 suites +12    0 :zzz: ± 0   1 files   ± 0    0 :x: ± 0 

Results for commit 13736e28. ± Comparison against base commit d7dd9b8a.

This pull request removes 9 and adds 37 tests. Note that renamed tests count towards both. ``` src/__tests__/components/Scenario/CompartmentList.test.tsx ‑ CompartmentList > Date Loaded Correctly src/__tests__/components/Scenario/CompartmentList.test.tsx ‑ CompartmentList > Set Reference Date src/__tests__/components/Scenario/CompartmentList.test.tsx ‑ CompartmentList > Update Reference Date src/__tests__/components/Sidebar/DistrictMap.test.tsx ‑ District Map > district map load src/__tests__/components/Sidebar/SearchBar.test.tsx ‑ SearchBar > countyList loaded correctly src/__tests__/components/Sidebar/SearchBar.test.tsx ‑ SearchBar > district changed by store src/__tests__/components/Sidebar/SearchBar.test.tsx ‑ SearchBar > select district by dropdown selection partial name (autocomplete) src/__tests__/components/Sidebar/SearchBar.test.tsx ‑ SearchBar > select district by dropdown selection with keyboard (Arrow-Down) src/__tests__/store/DataSelectionSlice.test.ts ‑ DataSelectionSlice > Toggle Scenario ``` ``` src/__tests__/components/LineChart.test.tsx ‑ LineChart > renders LineChart src/__tests__/components/Scenario/CardsComponents/CardContainer.test.tsx ‑ CardContainer > renders compartments correctly src/__tests__/components/Scenario/CardsComponents/CardContainer.test.tsx ‑ CardContainer > renders data cards correctly src/__tests__/components/Scenario/CardsComponents/CardContainer.test.tsx ‑ CardContainer > renders filter values correctly src/__tests__/components/Scenario/CardsComponents/DataCard.test.tsx ‑ DataCard > checks visibility based on group filters src/__tests__/components/Scenario/CardsComponents/DataCard.test.tsx ‑ DataCard > renders DataCard correctly src/__tests__/components/Scenario/CardsComponents/DataCard.test.tsx ‑ DataCard > renders compartment values correctly src/__tests__/components/Scenario/CardsComponents/DataCard.test.tsx ‑ DataCard > renders filter titles correctly src/__tests__/components/Scenario/CardsComponents/MainCard/CardRows.test.tsx ‑ CardRows Component > applies the correct styles to selected compartment src/__tests__/components/Scenario/CardsComponents/MainCard/CardRows.test.tsx ‑ CardRows Component > renders compartment values and rates correctly … ```

:recycle: This comment has been updated with latest results.