-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore: Migrate useSelfHostedSettings to TS Query V5 #3574
Conversation
Bundle ReportChanges will increase total bundle size by 1.19kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Bundle ReportChanges will increase total bundle size by 1.19kB (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 99.00% 98.99% -0.02%
==========================================
Files 810 810
Lines 14563 14567 +4
Branches 4157 4157
==========================================
+ Hits 14418 14420 +2
- Misses 138 140 +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 99.00% 98.99% -0.02%
==========================================
Files 810 810
Lines 14563 14567 +4
Branches 4157 4157
==========================================
+ Hits 14418 14420 +2
- Misses 138 140 +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 99.00% 98.99% -0.02%
==========================================
Files 810 810
Lines 14563 14567 +4
Branches 4150 4150
==========================================
+ Hits 14418 14420 +2
- Misses 138 140 +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
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.
That is the typical flow for the vast majority of our tests so I like the consistency as well as the alphabet, there's no technical reason
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.
cool cool, thanks for the context ✅
@@ -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?
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.
Yep, we need this here because data?.planAutoActivate
is of type boolean | null
and value
only accepts booleans
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.
got it makes sense!
src/pages/AdminSettings/AdminMembers/ActivationInfo/AutoActivateMembers/AutoActivateMembers.tsx
Outdated
Show resolved
Hide resolved
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 ✔️
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #3574 +/- ##
==========================================
- Coverage 99.00% 98.99% -0.02%
==========================================
Files 810 810
Lines 14569 14573 +4
Branches 4161 4154 -7
==========================================
+ Hits 14424 14426 +2
- Misses 138 140 +2
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
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