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-346: Survey Interfaces - Implement Sticky Header and Breadcrumbs #1170

Merged
merged 40 commits into from
Nov 17, 2023

Conversation

KjartanE
Copy link
Contributor

Links to Jira Tickets

Description of Changes

  • Edit and Create Survey Pages, now have sticky header with breadcrumb trail and save/cancel buttons.

Testing Notes

  • {List any relevant testing considerations, necessary pre-reqs, and areas of the app to focus on. Specifically, include anything that will help the reviewers of this PR verify the code is functioning as expected.}

curtisupshall and others added 30 commits October 18, 2023 12:54
* Various survey page layout changes
* Adds the ability to see added survey observations in a map view
* Minor Fixes / UI Tweaks
* Fix permit component list key
* Rename old sampling method form to sampling strategy

Co-authored-by: Nick Phura <[email protected]>
* Add's UIs for uploading CSV files to survey observations
* Adds a new database table to track survey observation CSV submissions, survey_observation_submission
* Alters the survey_observation table to make optional the sampling site, method, and period columns
* Adds service and repo methods for processing observation CSVs
* Survey Study area can now import files with multiple features
* Drawn features can be created and saved to a survey
* New card for displaying and editing map features
* Region selector updated
* Adds Sampling Site record count to title area, Example: Sampling Sites (10)
* Adds Observation record count to title area of observations map component and manage observations page, Example: Observations (10)
* Adds 'supplementaryObservationData' section to get survey observations endpoint. This allows observation record counts to be displayed, even if the get observations response becomes paginated or virtualized at a later date
)

* Fixed an issue where the yup schema used for editing sampling methods used the wrong field for a date overlap check.
* Removed an unintended required().
* Added a refresh call when submitting sampling method changes so they are reflected in the UI. Otherwise you will still see the previous value if you go back to the sampling methods view even though the new value did save to the db.
* Added snackbar popup upon successfully saving observations.
* Removed single-click to edit; Fixed bug that made row go into edit mode when clicking row delete icon.
* Added seconds to the observation time
* Removes all UI references to Ecological Season
* Removes all API references to Ecological Seasons
* Adds DB migration for deprecation comments on Ecological seasons column and xref table
* Removes ecological season from DB seed
* Added some additional logic to the API to extract a name and description from the provided shape file when creating sampling sites.
* It will search the keys of the geometry's properties for "name" or "label" and "des" or "desc" or "descr" (exact match), then use the value for the sampling site name and description respectively.
* Added a character limit to the sampling site name field in the edit form.

---------

Co-authored-by: JeremyQuartech <[email protected]>
Map container removed in lieu of using the leaflet component 
Map css moved into single component
Removed project location data  

---------

Co-authored-by: Nick Phura <[email protected]>
Co-authored-by: JeremyQuartech <[email protected]>
Co-authored-by: jeznorth <[email protected]>
Removed field method and site selection strategies are now required on surveys
* Add delete sample site button to menu drop down
* Check for any associated observations to sample site.
* hook up api sample-site delete function.

* SIMSBIOHUB-336/337 (#1142)

* Adds Sampling Site record count to title area, Example: Sampling Sites (10)
* Adds Observation record count to title area of observations map component and manage observations page, Example: Observations (10)
* Adds 'supplementaryObservationData' section to get survey observations endpoint. This allows observation record counts to be displayed, even if the get observations response becomes paginated or virtualized at a later date

* SIMSBIOHUB 343 - Incorrect date overlap error in sampling methods (#1144)

* Fixed an issue where the yup schema used for editing sampling methods used the wrong field for a date overlap check.
* Removed an unintended required().
* Added a refresh call when submitting sampling method changes so they are reflected in the UI. Otherwise you will still see the previous value if you go back to the sampling methods view even though the new value did save to the db.

* SIMSBIOHUB-334/350/352 (#1143)

* Added snackbar popup upon successfully saving observations.
* Removed single-click to edit; Fixed bug that made row go into edit mode when clicking row delete icon.
* Added seconds to the observation time

* Clean up functions and excess data calls

* fix tests

---------

Co-authored-by: JeremyQuartech <[email protected]>
Co-authored-by: GrahamS-Quartech <[email protected]>
Co-authored-by: Curtis Upshall <[email protected]>
…1152)

* Added a migration that removes the intended_outcome_id column from the survey table and shifts the responsibility onto a join table called survey_intended_outcome. This makes it possible to have multiple intended outcomes associated with a single survey.
* Modified the frontend and API to support this change. The dropdown in the add and edit forms for the survey have been replaced with a multiselect. Multiselect will still display the subtext associated with these elements.
* In various cases where a single intended outcome was displayed before, they display as a comma deliminated list instead.
* These items now display with the label of "Ecological Variables" in the frontend survey components.
* Modified each custom renderEditCell component of the ObservationTable to manually set hasFocus. This allows the user to Tab forward to the next cell or Shift+Tab back to the previous.
* Wrapped some of the simpler TextField / DatePicker renders in their own functional components so that the same hasFocus pattern could be used.
…vey fields (#1158)

* Replace existing survey list endpoint with index, which returns a subset of survey fields rather than all fields.
* Swap out old keycloak libraries for newer more up to date libraries.
* Add RouteGuards tests.
* Add git action to clean PR builds for PRs against non-base branches
…#1157)

SIMSBIOHUB-354-355: Added sampling site and study area features to the observation map on the survey details page
---------

Co-authored-by: Nick Phura <[email protected]>
* Added a new ObservationTableContext
* Added an endpont and repository methods to delete one or more observation records
* Added loading button props to the YesNoDialog
* Refactored the observation context to support deleting one or more observation records
#1161)

* Moved the shapefile name and description extraction to UI. Modified the sampling site POST api to accept custom names and desc from UI. Implemented the same ability in study area submission, now both parts of the form can reference the same logic for extracting this info.
* Minor UI polish and updating notification content.
KjartanE and others added 2 commits November 8, 2023 09:05
Added time to periods in sampling sites

---------

Co-authored-by: Alfred Rosenthal <[email protected]>
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (0612e40) 60.82% compared to head (6da85ac) 60.82%.

Files Patch % Lines
app/src/utils/ScrollToTop.tsx 0.00% 4 Missing ⚠️
app/src/features/surveys/view/SurveyHeader.tsx 25.00% 3 Missing ⚠️
app/src/features/surveys/edit/EditSurveyPage.tsx 0.00% 2 Missing ⚠️
app/src/features/surveys/CreateSurveyPage.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1170      +/-   ##
==========================================
- Coverage   60.82%   60.82%   -0.01%     
==========================================
  Files         562      564       +2     
  Lines       16962    16968       +6     
  Branches     2626     2627       +1     
==========================================
+ Hits        10317    10320       +3     
- Misses       5959     5962       +3     
  Partials      686      686              

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

@curtisupshall curtisupshall changed the base branch from dev-staging to dev November 10, 2023 17:36
@curtisupshall curtisupshall changed the base branch from dev to dev-staging November 10, 2023 17:37
@curtisupshall curtisupshall added the Do Not Merge PR should not be merged label Nov 10, 2023
Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Code looks good. I added a Do Not Merge flag to this PR, since you need to change your base branch from dev-staging to dev (and resolve the subsequent merge conflicts. I think for 99% of them, you can just choose Accept Incoming Change)

@curtisupshall curtisupshall removed the Do Not Merge PR should not be merged label Nov 10, 2023
@curtisupshall curtisupshall changed the base branch from dev-staging to dev November 15, 2023 05:03
al-rosenthal
al-rosenthal previously approved these changes Nov 15, 2023
Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

ran this locally and it looks good

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

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

🥂

@KjartanE KjartanE merged commit 449edb5 into dev Nov 17, 2023
18 of 20 checks passed
@KjartanE KjartanE deleted the SIMSBIOHUB-346 branch November 17, 2023 20:07
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.

7 participants