-
Notifications
You must be signed in to change notification settings - Fork 24
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
chore: Migrate useSelfHostedSettings to TS Query V5 #3574
base: main
Are you sure you want to change the base?
chore: Migrate useSelfHostedSettings to TS Query V5 #3574
Conversation
Bundle ReportChanges will increase total bundle size by 1.22kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will increase total bundle size by 1.22kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3574 +/- ##
==========================================
- Coverage 98.90% 98.89% -0.02%
==========================================
Files 806 806
Lines 14485 14489 +4
Branches 4116 4116
==========================================
+ Hits 14327 14329 +2
- Misses 151 153 +2
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3574 +/- ##
==========================================
- Coverage 98.90% 98.89% -0.02%
==========================================
Files 806 806
Lines 14485 14489 +4
Branches 4116 4116
==========================================
+ Hits 14327 14329 +2
- Misses 151 153 +2
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #3574 +/- ##
==========================================
- Coverage 98.90% 98.89% -0.02%
==========================================
Files 806 806
Lines 14485 14489 +4
Branches 4116 4109 -7
==========================================
+ Hits 14327 14329 +2
- Misses 151 153 +2
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
queryClient.clear() | ||
queryClientV5.clear() |
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.
I see we've made a deliberate effort in these suites to modify the ordering of the "clear" statements with the server statement being the last to clear -- jw what the intent was behind this change if any
@@ -24,7 +35,7 @@ function AutoActivateMembers() { | |||
<Toggle | |||
dataMarketing="auto-acitvate-members" | |||
label={data?.planAutoActivate ? 'On' : 'Off'} | |||
value={data?.planAutoActivate} | |||
value={!!data?.planAutoActivate} |
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.
Do we need the boolean cast for a certain reason?
@@ -9,10 +12,18 @@ const Loader = () => ( | |||
</div> | |||
) | |||
|
|||
interface URLParams { | |||
provider: string |
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.
I think throughout we can retype Provider to be the Provider type now
gazebo/src/shared/api/helpers.ts
Line 56 in 848db44
export type Provider = AllProviders[number] |
describe('ActivationCount', () => { | ||
function setup() { | ||
function setup({ seatsLimit, seatsUsed }: SetupArgs) { |
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.
curious why we wanted to refactor this to have setup args when it looks like the args are the same throughout
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.
oh nvm I see seatsUsed as 10 in a later test, I dig it ✔️
Description
This PR focuses on updating
useSelfHostedSettings
to the TS Query V5 queryOptions API versionSelfHostedSettingsQueryOpts
, as well as some TS refactors.Ticket: codecov/engineering-team#2961
Notable Changes
useSelfHostedSettings
toSelfHostedSettingsQueryOpts
useUpdateSlefHostedSettings
invalidatesSelfHostedSettingsQueryOpts
ActivationInfo
ActivationCount
AutoActivateMembers
MemberTable