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

CMR-10132: Fix stac-browser Stac item Search unmapped CMR keys #370

Merged
merged 7 commits into from
Nov 7, 2024

Conversation

eudoroolivares2016
Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 commented Nov 4, 2024

Overview

What is the feature?

Update sorting maps to include a datetime mapping to CMR's startDate field. Refactor sortKeys to map to CMR fields depending if the search is for items or for collections so that we can sort by id field accordingly

What is the Solution?

Adding search context to the query param and a util to direct the request to the correct CMR key field. Also adding a mapping for the datetime field

What areas of the application does this impact?

Testing

Reproduction steps

  • Environment for testing:
  • Collection to test with:
  1. Navigate to https://radiantearth.github.io/stac-browser/#/external/http:/localhost:3000/stac/ARCTEST ensure that using the Id for the collection search sorting works
  2. ensure that using the Id for the items search sorting works
  3. Ensure that sorting for the collection search sorting by Date and time works as expected
  4. Ensure that sorting for the item search sorting by Date and time works as expected

Attachments

Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.22%. Comparing base (7a0fcb8) to head (960fc73).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
+ Coverage   88.05%   88.22%   +0.16%     
==========================================
  Files          24       24              
  Lines        1164     1180      +16     
  Branches      256      261       +5     
==========================================
+ Hits         1025     1041      +16     
  Misses        139      139              

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

README.md Outdated Show resolved Hide resolved
@eudoroolivares2016 eudoroolivares2016 merged commit 5d86a25 into master Nov 7, 2024
5 checks passed
@eudoroolivares2016 eudoroolivares2016 deleted the CMR-10232 branch November 7, 2024 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants