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

BHBC-2267: Create Survey context #976

Merged
merged 26 commits into from
Mar 21, 2023
Merged

BHBC-2267: Create Survey context #976

merged 26 commits into from
Mar 21, 2023

Conversation

curtisupshall
Copy link
Contributor

@curtisupshall curtisupshall commented Mar 15, 2023

Overview

Creates a Survey Context, which wraps survey-related app sections, providing a centralized location for fetching/refreshing survey data.

Links to Jira tickets

Description of relevant changes

  • Creates the useSurveyContext hook
  • Wraps all survey routes in the ProjectRouter with the SurveyContextProvider
  • Removes any component props that pass a Survey object

Testing

  1. Create a project if you don't have one
  2. Create a survey, if you dont' have one
  3. Click on the survey
  • Ensure that the survey loads
  1. Upload an observations
  • Ensure that the observation loads
  1. Upload a report and attachment
  • Ensure that attachments load

@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Merging #976 (720cbd7) into dev (cda4d31) will decrease coverage by 0.18%.
The diff coverage is 14.63%.

@@            Coverage Diff             @@
##              dev     #976      +/-   ##
==========================================
- Coverage   66.50%   66.32%   -0.18%     
==========================================
  Files         358      360       +2     
  Lines       11601    11641      +40     
  Branches     2000     2008       +8     
==========================================
+ Hits         7715     7721       +6     
- Misses       3470     3503      +33     
- Partials      416      417       +1     
Impacted Files Coverage Δ
...pp/src/features/surveys/view/SurveyAttachments.tsx 2.63% <0.00%> (+0.06%) ⬆️
app/src/features/surveys/view/SurveyDetails.tsx 40.00% <0.00%> (ø)
app/src/features/surveys/view/SurveyPage.tsx 2.50% <0.00%> (+0.61%) ⬆️
...rveys/view/components/SurveyGeneralInformation.tsx 6.66% <0.00%> (-2.43%) ⬇️
.../surveys/view/components/SurveyProprietaryData.tsx 8.33% <0.00%> (-4.17%) ⬇️
...iew/components/SurveyPurposeAndMethodologyData.tsx 8.69% <0.00%> (-1.84%) ⬇️
...atures/surveys/view/components/SurveyStudyArea.tsx 2.94% <0.00%> (-0.64%) ⬇️
app/src/layouts/ProjectsLayout.tsx 100.00% <ø> (ø)
app/src/routers/ProjectsRouter.tsx 0.00% <ø> (ø)
app/src/routers/SurveyRouter.tsx 0.00% <0.00%> (ø)
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@curtisupshall curtisupshall requested a review from NickPhura March 16, 2023 22:44
@curtisupshall curtisupshall marked this pull request as ready for review March 17, 2023 20:05
@curtisupshall curtisupshall added the Do Not Merge PR should not be merged label Mar 20, 2023
@curtisupshall curtisupshall removed the Do Not Merge PR should not be merged label Mar 20, 2023
Copy link
Contributor

@AlfredRosenthal AlfredRosenthal left a comment

Choose a reason for hiding this comment

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

project/ survey creation and editing works as expected! 🐹

Copy link
Contributor

@AlfredRosenthal AlfredRosenthal left a comment

Choose a reason for hiding this comment

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

🐶

@sonarqubecloud
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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Collaborator

@NickPhura NickPhura left a comment

Choose a reason for hiding this comment

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

Tested locally, seems to work well.

@curtisupshall curtisupshall merged commit 0931df0 into dev Mar 21, 2023
@curtisupshall curtisupshall deleted the BHBC-2267 branch March 21, 2023 20:58
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.

4 participants