Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMSBIOHUB-629: Paginate Sampling Sites & Separate Spatial Data in API Responses #1393

Merged
merged 21 commits into from
Nov 13, 2024

Conversation

mauberti-bc
Copy link
Collaborator

@mauberti-bc mauberti-bc commented Oct 10, 2024

Links to Jira Tickets

Description of Changes

  • Adds a /sample-site/spatial endpoint for retrieving the geojson data for all sites in the survey
  • Removes geojson property from the response when requesting all sampling sites in the survey, replacing it with a "geometry_type" string
  • Paginates sampling sites on the frontend (backend pagination was already in place)
  • For the sampling site accordions on the observations page, does not load accordion content until expanded
  • When retrieving observations, sampling sites related to the requested observations are included in the supplementaryData object
  • Removes sample site data loader from the survey context

Testing Notes

  • Should not be any double requests for sampling site data
  • Since sampling periods depend on the same request as sampling methods, we still need to solve sample period pagination (records shown in the sample period table are limited to those retrieved in the latest paginated sample method request).

@mauberti-bc mauberti-bc added the Early Feedback Welcome PR is not finished, but early review feedback is welcomed label Oct 10, 2024
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 13.79310% with 600 lines in your changes missing coverage. Please review.

Project coverage is 45.72%. Comparing base (5203f31) to head (5e75350).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...c/repositories/sample-location-repository/utils.ts 18.98% 64 Missing ⚠️
...rmation/sites/table/SamplingSiteTableContainer.tsx 0.00% 51 Missing ⚠️
...nts/sampling-data/SurveySamplingTableContainer.tsx 0.00% 41 Missing ⚠️
...g-information/sites/SampleSiteDataGridEditCell.tsx 2.94% 33 Missing ⚠️
...tions/sampling-sites/SamplingSiteListContainer.tsx 0.00% 32 Missing ⚠️
...-location-repository/sample-location-repository.ts 44.64% 27 Missing and 4 partials ⚠️
api/src/paths/sampling-locations/methods/index.ts 0.00% 29 Missing ⚠️
api/src/paths/sampling-locations/periods/index.ts 0.00% 29 Missing ⚠️
api/src/paths/sampling-locations/sites/index.ts 0.00% 28 Missing ⚠️
...d-column-definitions/sampling-information/utils.ts 25.71% 26 Missing ⚠️
... and 37 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1393      +/-   ##
==========================================
- Coverage   46.30%   45.72%   -0.58%     
==========================================
  Files         784      801      +17     
  Lines       21225    21639     +414     
  Branches     3194     3253      +59     
==========================================
+ Hits         9828     9895      +67     
- Misses      10810    11155     +345     
- Partials      587      589       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mauberti-bc mauberti-bc added Ready For Review PR is ready for review Early Feedback Welcome PR is not finished, but early review feedback is welcomed and removed Early Feedback Welcome PR is not finished, but early review feedback is welcomed Ready For Review PR is ready for review labels Oct 10, 2024
@mauberti-bc mauberti-bc added Ready For Review PR is ready for review and removed Early Feedback Welcome PR is not finished, but early review feedback is welcomed labels Oct 24, 2024
@mauberti-bc mauberti-bc marked this pull request as ready for review October 24, 2024 15:31
@NickPhura NickPhura marked this pull request as draft October 25, 2024 00:26
@NickPhura
Copy link
Collaborator

Just going to change this to a draft temporarily as we are hitting the limit on our openshift resources.

@mauberti-bc mauberti-bc marked this pull request as ready for review November 1, 2024 17:56
@NickPhura
Copy link
Collaborator

NickPhura commented Nov 9, 2024

@mauberti-bc
Okay, other than any minor CSS tweaks, etc, you might have, it should be good to go.

I'll do the other TODOs in a separate PR:

  • Add pagination to the period table on the survey page.
  • See if I can make the dropdown modal wider (somehow its working for the taxon/site control, but not the technique/period, even though they use the same autocomplete under the hood. But havent poked at it too hard yet)

MacQSL and others added 2 commits November 12, 2024 10:23
- Remove commented out openapi
- Fix sample site left nav pagination
- Add placeholder text to taxon/site search cell
- Fix loading animation not stopping when selecting or cancelling search
- Fix taxon/site cell adding the selection to the list (and creating duplicate entries in the dropdown)
@NickPhura NickPhura requested a review from MacQSL November 12, 2024 20:38
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
19.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link
Collaborator

@MacQSL MacQSL left a comment

Choose a reason for hiding this comment

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

Poked around the UI and it all seems happy
🦖

@NickPhura NickPhura changed the title Paginate Sampling Sites & Separate Spatial Data in API Responses SIMSBIOHUB-629: Paginate Sampling Sites & Separate Spatial Data in API Responses Nov 13, 2024
@NickPhura NickPhura merged commit 462b432 into dev Nov 13, 2024
20 of 23 checks passed
@NickPhura NickPhura deleted the SIMSBIOHUB-629 branch November 13, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants