-
Notifications
You must be signed in to change notification settings - Fork 17
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
ref: Refactor context switcher #2292
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2292 +/- ##
==========================================
- Coverage 98.02% 97.82% -0.21%
==========================================
Files 704 705 +1
Lines 8207 8216 +9
Branches 1980 1983 +3
==========================================
- Hits 8045 8037 -8
- Misses 160 177 +17
Partials 2 2
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Codecov Report
@@ Coverage Diff @@
## main #2292 +/- ##
=======================================
+ Coverage 34.36 34.40 +0.04
=======================================
Files 656 656
Lines 8096 8087 -9
Branches 1992 1985 -7
=======================================
Hits 2782 2782
+ Misses 5285 5282 -3
+ Partials 29 23 -6
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Codecov Report
@@ Coverage Diff @@
## main #2292 +/- ##
==========================================
+ Coverage 34.36% 34.40% +0.03%
==========================================
Files 656 656
Lines 8096 8087 -9
Branches 1942 1942
==========================================
Hits 2782 2782
+ Misses 5291 5282 -9
Partials 23 23
Continue to review full report in Codecov by Sentry.
|
✅ Deploy Preview for gazebo-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2292 +/- ##
==========================================
+ Coverage 34.36% 34.40% +0.03%
==========================================
Files 656 656
Lines 8096 8087 -9
Branches 1985 1985
==========================================
Hits 2782 2782
+ Misses 5285 5282 -3
+ Partials 29 23 -6
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
orgUsername?.toLowerCase() === | ||
currentContext?.owner?.username?.toLowerCase() | ||
function ContextItem({ context, defaultOrgUsername, setToggle }) { | ||
const { owner } = useParams() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also pull out the useParams
here, it's in the same vein of using services
you're tying this component to the URL when it should be agnostic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on it! i was mainly focused on getting the use of active context right, but it looks like this component could use some more love
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good to me 👍
Description
This PR is meant to handle the following in context switcher:
Solution:
useParams
to fetch owner from route, this is the current active context.Notable Changes
Screenshots
nothing visual changed, please check the preview deploy to test owner page and it's children.
Link to Sample Entry
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.