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

chore: Migrate useSelfHostedUserList to TS Query V5 #3575

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR migrates the useSelfHostedUserList to the infiniteQueryOptions setup from TS Query V5 to SelfHostedUserListQueryOpts

Ticket: codecov/engineering-team#2961

Notable Changes

  • Migrate useSelfHostedUserList to SelfHostedUserListQueryOpts
  • Update usage in MemberTable

@codecov-staging
Copy link

codecov-staging bot commented Dec 12, 2024

Bundle Report

Changes will increase total bundle size by 233 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 5.72MB 125 bytes (0.0%) ⬆️
gazebo-staging-system 5.67MB 108 bytes (0.0%) ⬆️

Copy link

codecov bot commented Dec 12, 2024

Bundle Report

Changes will increase total bundle size by 233 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.67MB 108 bytes (0.0%) ⬆️
gazebo-production-system-esm 5.72MB 125 bytes (0.0%) ⬆️

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.90%. Comparing base (617411d) to head (5fcab61).

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3575   +/-   ##
=======================================
  Coverage   98.90%   98.90%           
=======================================
  Files         806      806           
  Lines       14485    14488    +3     
  Branches     4116     4108    -8     
=======================================
+ Hits        14327    14330    +3     
  Misses        151      151           
  Partials        7        7           
Files with missing lines Coverage Δ
...inSettings/AdminMembers/MemberList/MemberTable.tsx 100.00% <100.00%> (ø)
...services/selfHosted/SelfHostedUserListQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.59% <100.00%> (+<0.01%) ⬆️
Services 99.33% <100.00%> (-0.01%) ⬇️
Shared 99.33% <ø> (ø)
UI 99.14% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 617411d...5fcab61. Read the comment docs.

@codecov-notifications
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3575   +/-   ##
=======================================
  Coverage   98.90%   98.90%           
=======================================
  Files         806      806           
  Lines       14485    14488    +3     
  Branches     4116     4115    -1     
=======================================
+ Hits        14327    14330    +3     
  Misses        151      151           
  Partials        7        7           
Files with missing lines Coverage Δ
...inSettings/AdminMembers/MemberList/MemberTable.tsx 100.00% <100.00%> (ø)
...services/selfHosted/SelfHostedUserListQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.59% <100.00%> (+<0.01%) ⬆️
Services 99.33% <100.00%> (-0.01%) ⬇️
Shared 99.33% <ø> (ø)
UI 99.14% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 617411d...5fcab61. Read the comment docs.

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.90%. Comparing base (617411d) to head (5fcab61).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3575   +/-   ##
=======================================
  Coverage   98.90%   98.90%           
=======================================
  Files         806      806           
  Lines       14485    14488    +3     
  Branches     4109     4108    -1     
=======================================
+ Hits        14327    14330    +3     
  Misses        151      151           
  Partials        7        7           
Files with missing lines Coverage Δ
...inSettings/AdminMembers/MemberList/MemberTable.tsx 100.00% <100.00%> (ø)
...services/selfHosted/SelfHostedUserListQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.59% <100.00%> (+<0.01%) ⬆️
Services 99.33% <100.00%> (-0.01%) ⬇️
Shared 99.33% <ø> (ø)
UI 99.14% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 617411d...5fcab61. Read the comment docs.

@codecov-releaser
Copy link
Contributor

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
5fcab61 Thu, 12 Dec 2024 16:11:01 GMT Cloud Enterprise

@codecov-qa
Copy link

codecov-qa bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.90%. Comparing base (617411d) to head (5fcab61).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3575   +/-   ##
=======================================
  Coverage   98.90%   98.90%           
=======================================
  Files         806      806           
  Lines       14485    14488    +3     
  Branches     4116     4108    -8     
=======================================
+ Hits        14327    14330    +3     
  Misses        151      151           
  Partials        7        7           
Files with missing lines Coverage Δ
...inSettings/AdminMembers/MemberList/MemberTable.tsx 100.00% <100.00%> (ø)
...services/selfHosted/SelfHostedUserListQueryOpts.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.59% <100.00%> (+<0.01%) ⬆️
Services 99.33% <100.00%> (-0.01%) ⬇️
Shared 99.33% <ø> (ø)
UI 99.14% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 617411d...5fcab61. Read the comment docs.

)

return {
...rest,
Copy link
Contributor

Choose a reason for hiding this comment

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

any chance we can avoid using ...rest here? Do we really need everything coming back from this query call?

})

describe('hook can fetch the next dataset', () => {
describe('not other options set', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: no instead of not

isAdmin?: boolean
}

const useQueryMembersList = (params: Params) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Im also kinda curious why we pulled the memo out of the query and into this new query in the component itself

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