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

ref: Convert BranchFileEntry to TSX #3777

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spalmurray-codecov
Copy link
Contributor

Converts BranchFileEntry to TSX and also makes path in PathContents non-nullable following my API change to the GQL schema.

Part of codecov/engineering-team#2747

Copy link
Contributor Author

@spalmurray-codecov spalmurray-codecov Feb 25, 2025

Choose a reason for hiding this comment

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

got rid of mocked network request here because

  1. The component does not do anything with the data, all it does is trigger the hook call
  2. it's really annoying requiring us to dig into the query client as a result of not using the data

The response is not relevant to the component at all, testing it here is unnecessary and annoying /rant lol

@codecov-staging
Copy link

codecov-staging bot commented Feb 25, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system 6.13MB 44 bytes (0.0%) ⬆️
gazebo-staging-esm 6.2MB -11 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-staging-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -22 bytes 126.34kB -0.02%
assets/index.*.js 33 bytes 103.91kB 0.03%
assets/usePrefetchBranchDirEntry.*.js -22 bytes 7.85kB -0.28%

Files in assets/index.*.js:

  • ./src/services/pathContents/pull/dir/constants.ts → Total Size: 2.96kB

Files in assets/index.*.js:

  • ./src/shared/ContentsTable/TableEntries/BranchEntries/BranchFileEntry.tsx → Total Size: 1.19kB

Files in assets/usePrefetchBranchDirEntry.*.js:

  • ./src/services/pathContents/branch/dir/useRepoBranchContents.tsx → Total Size: 4.87kB

  • ./src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx → Total Size: 4.63kB

view changes for bundle: gazebo-staging-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js -22 bytes 113.76kB -0.02%
assets/index-legacy.*.js 88 bytes 98.41kB 0.09%
assets/usePrefetchBranchDirEntry-legacy.*.js -22 bytes 7.02kB -0.31%

Files in assets/index-legacy.*.js:

  • ./src/services/pathContents/pull/dir/constants.ts → Total Size: 2.96kB

Files in assets/index-legacy.*.js:

  • ./src/shared/ContentsTable/TableEntries/BranchEntries/BranchFileEntry.tsx → Total Size: 1.19kB

Files in assets/usePrefetchBranchDirEntry-legacy.*.js:

  • ./src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx → Total Size: 4.65kB

  • ./src/services/pathContents/branch/dir/useRepoBranchContents.tsx → Total Size: 4.9kB

Copy link

codecov bot commented Feb 25, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 6.13MB 44 bytes (0.0%) ⬆️
gazebo-production-esm 6.2MB -11 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js 88 bytes 98.41kB 0.09%
assets/index-legacy.*.js -22 bytes 113.76kB -0.02%
assets/usePrefetchBranchDirEntry-legacy.*.js -22 bytes 7.02kB -0.31%

Files in assets/index-legacy.*.js:

  • ./src/shared/ContentsTable/TableEntries/BranchEntries/BranchFileEntry.tsx → Total Size: 1.19kB

Files in assets/index-legacy.*.js:

  • ./src/services/pathContents/pull/dir/constants.ts → Total Size: 2.96kB

Files in assets/usePrefetchBranchDirEntry-legacy.*.js:

  • ./src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx → Total Size: 4.65kB

  • ./src/services/pathContents/branch/dir/useRepoBranchContents.tsx → Total Size: 4.9kB

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js 33 bytes 103.91kB 0.03%
assets/index.*.js -22 bytes 126.34kB -0.02%
assets/usePrefetchBranchDirEntry.*.js -22 bytes 7.85kB -0.28%

Files in assets/index.*.js:

  • ./src/shared/ContentsTable/TableEntries/BranchEntries/BranchFileEntry.tsx → Total Size: 1.19kB

Files in assets/index.*.js:

  • ./src/services/pathContents/pull/dir/constants.ts → Total Size: 2.96kB

Files in assets/usePrefetchBranchDirEntry.*.js:

  • ./src/services/pathContents/branch/dir/useRepoBranchContents.tsx → Total Size: 4.87kB

  • ./src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx → Total Size: 4.63kB

@codecov-notifications
Copy link

codecov-notifications bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3777   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14798   +12     
  Branches     4242     4249    +7     
=======================================
+ Hits        14597    14609   +12     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...hContents/branch/dir/usePrefetchBranchDirEntry.tsx 100.00% <ø> (ø)
.../pathContents/branch/dir/useRepoBranchContents.tsx 100.00% <ø> (ø)
src/services/pathContents/pull/dir/constants.ts 100.00% <ø> (ø)
...ble/TableEntries/BranchEntries/BranchFileEntry.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 9136ccd...5eeaa05. Read the comment docs.

components: string[]
}

function useTypeSafeFilters(): Filters {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will probably pull this out to another file in my next PR converting BranchDirEntry. fine here until then :)

@spalmurray-codecov spalmurray-codecov marked this pull request as ready for review February 25, 2025 20:19
@spalmurray-codecov spalmurray-codecov force-pushed the spalmurray/BranchFileEntry-ts branch from f554450 to 5eeaa05 Compare February 25, 2025 20:20
@codecov-releaser
Copy link
Contributor

codecov-releaser commented Feb 25, 2025

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
5eeaa05 Tue, 25 Feb 2025 20:20:32 GMT Expired Expired
5eeaa05 Tue, 25 Feb 2025 20:25:05 GMT Cloud Enterprise

@codecov-qa
Copy link

codecov-qa bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (5eeaa05).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3777   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14798   +12     
  Branches     4242     4257   +15     
=======================================
+ Hits        14597    14609   +12     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...hContents/branch/dir/usePrefetchBranchDirEntry.tsx 100.00% <ø> (ø)
.../pathContents/branch/dir/useRepoBranchContents.tsx 100.00% <ø> (ø)
src/services/pathContents/pull/dir/constants.ts 100.00% <ø> (ø)
...ble/TableEntries/BranchEntries/BranchFileEntry.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 9136ccd...5eeaa05. Read the comment docs.

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (5eeaa05).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3777   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14798   +12     
  Branches     4250     4249    -1     
=======================================
+ Hits        14597    14609   +12     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...hContents/branch/dir/usePrefetchBranchDirEntry.tsx 100.00% <ø> (ø)
.../pathContents/branch/dir/useRepoBranchContents.tsx 100.00% <ø> (ø)
src/services/pathContents/pull/dir/constants.ts 100.00% <ø> (ø)
...ble/TableEntries/BranchEntries/BranchFileEntry.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 9136ccd...5eeaa05. Read the comment docs.

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (9136ccd) to head (5eeaa05).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #3777   +/-   ##
=======================================
  Coverage   98.72%   98.72%           
=======================================
  Files         824      824           
  Lines       14786    14798   +12     
  Branches     4250     4257    +7     
=======================================
+ Hits        14597    14609   +12     
  Misses        182      182           
  Partials        7        7           
Files with missing lines Coverage Δ
...hContents/branch/dir/usePrefetchBranchDirEntry.tsx 100.00% <ø> (ø)
.../pathContents/branch/dir/useRepoBranchContents.tsx 100.00% <ø> (ø)
src/services/pathContents/pull/dir/constants.ts 100.00% <ø> (ø)
...ble/TableEntries/BranchEntries/BranchFileEntry.tsx 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.69% <ø> (ø)
Pages 98.29% <ø> (ø)
Services 99.36% <ø> (ø)
Shared 99.11% <100.00%> (+<0.01%) ⬆️
UI 99.07% <ø> (ø)

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 9136ccd...5eeaa05. Read the comment docs.

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.

2 participants