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-2271: Create Project Context #988

Merged
merged 5 commits into from
Mar 31, 2023
Merged

BHBC-2271: Create Project Context #988

merged 5 commits into from
Mar 31, 2023

Conversation

curtisupshall
Copy link
Contributor

@curtisupshall curtisupshall commented Mar 29, 2023

Overview

Creates a ProjectContext, which wraps project-related app sections, providing a centralized location for fetching/refreshing project data. As a first pass, components that currently consume project data through props will not consume the ProjectContext.

Links to Jira tickets

Description of relevant changes

  • Creates the useProjectContext hook
  • Wraps project routes in the ProjectRouter with the ProjectContextProvider

Testing

  1. Create a Project
  2. Enable the Developer Console (press F12)
  3. Visit the project

You should:

  • See the project context printed in the console.
  • See that the project data in projectContext.projectDataLoader.data accurately reflects the project data.

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

Merging #988 (453c5eb) into dev (c48d5a9) will decrease coverage by 0.09%.
The diff coverage is 11.11%.

@@            Coverage Diff             @@
##              dev     #988      +/-   ##
==========================================
- Coverage   66.51%   66.43%   -0.09%     
==========================================
  Files         361      362       +1     
  Lines       11762    11780      +18     
  Branches     2012     2014       +2     
==========================================
+ Hits         7824     7826       +2     
- Misses       3516     3532      +16     
  Partials      422      422              
Impacted Files Coverage Δ
app/src/features/projects/view/ProjectPage.tsx 3.33% <0.00%> (-0.24%) ⬇️
app/src/routers/ProjectsRouter.tsx 0.00% <ø> (ø)
app/src/contexts/projectContext.tsx 12.50% <12.50%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. 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

@curtisupshall curtisupshall marked this pull request as ready for review March 29, 2023 23:17
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.

🐕‍🦺

@NickPhura NickPhura merged commit 060d07f into dev Mar 31, 2023
@NickPhura NickPhura deleted the BHBC-2271 branch March 31, 2023 20:59
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.

3 participants