Wildbook icon indicating copy to clipboard operation
Wildbook copied to clipboard

1197 new encounter page react api

Open erinz2020 opened this issue 2 months ago • 1 comments

Replacement of encounter.jsp with new react-based design. This required new frontend and backend code, detailed below.

Frontend

  • replace new react page at /react/encounter?number=encounterId with encounter.jsp
  • on encounter page, allow user to add/edit/delete annotations

Backend

  • implemented basic functionality for PATCH (RFC6902) support on Encounter class/object, endpoint /api/v3/encounters/ID

Notes:

  • for the sake of cutting time and development overhead, some functionality performed by legacy servlets has been re-used by react frontend. ultimately these should be converted to proper PATCH operations and the servlets removed

PR fixes #1297 PR fixes #1197 PR fixes #1215 PR fixes #1216

erinz2020 avatar Oct 30 '25 17:10 erinz2020

Codecov Report

:x: Patch coverage is 50.71633% with 1376 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 11.40%. Comparing base (7c0874c) to head (ad6291f). :warning: Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
frontend/src/components/ImageModal.jsx 27.72% 229 Missing and 3 partials :warning:
...ntend/src/pages/Encounter/stores/EncounterStore.js 66.56% 192 Missing and 25 partials :warning:
frontend/src/pages/Encounter/ImageCard.jsx 48.85% 134 Missing :warning:
frontend/src/pages/EditAnnotation.jsx 55.51% 107 Missing and 2 partials :warning:
frontend/src/pages/Encounter/Encounter.jsx 34.39% 97 Missing and 6 partials :warning:
.../components/generalInputs/SearchAndSelectInput.jsx 0.00% 90 Missing :warning:
.../src/components/generalInputs/CoordinatesInput.jsx 0.00% 71 Missing :warning:
...omponents/generalInputs/FreeTextAndSelectInput.jsx 0.00% 38 Missing :warning:
...ontend/src/pages/Encounter/DeleteEncounterCard.jsx 22.22% 35 Missing :warning:
frontend/src/pages/Encounter/stores/ErrorStore.js 36.84% 18 Missing and 6 partials :warning:
... and 53 more
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1287      +/-   ##
===========================================
+ Coverage     8.59%   11.40%   +2.80%     
- Complexity     941     1266     +325     
===========================================
  Files          623      700      +77     
  Lines        68077    72044    +3967     
  Branches     12576    13714    +1138     
===========================================
+ Hits          5853     8218    +2365     
- Misses       61618    62967    +1349     
- Partials       606      859     +253     
Flag Coverage Δ
backend 11.40% <50.71%> (+2.80%) :arrow_up:
frontend 11.40% <50.71%> (+2.80%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Oct 30 '25 18:10 codecov-commenter