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: Remove VirtualDiff feature flag FilesChanged CommitDiff #3435

Conversation

nicholas-codecov
Copy link
Contributor

@nicholas-codecov nicholas-codecov commented Oct 24, 2024

Description

This PR removes the virtual diff feature flag from the CommitDiff in the FilesChanged directory of the commit details page. As well this PR refactors the CommitDiff to TS, and some optimizations of data fetching hooks.

Closes codecov/engineering-team#2729

Notable Changes

  • Update FilesChanged/CommitDiff
    • Remove feature flag
    • Refactor to TS
    • Memoize
    • Removing loading state as it's handled via it's parent and suspense
  • Update useComparisonForCommitAndParent
    • Data return structure
    • Allow to be loaded via suspense
    • Allow enabling/disabling of the hook
  • Update IndirectChanges/CommitDiff
    • Account for changes in data fetching hook
    • Removing loading state as it's handled via it's parent and suspense
  • Refactor/Update tests

Copy link

codecov bot commented Oct 24, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-production-system 5.5MB 13 bytes (-0.0%) ⬇️
gazebo-production-system-esm 5.55MB 236 bytes (0.0%) ⬆️

@codecov-staging
Copy link

codecov-staging bot commented Oct 24, 2024

Bundle Report

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

Detailed changes
Bundle name Size Change
gazebo-staging-system-esm 5.55MB 236 bytes (0.0%) ⬆️
gazebo-staging-system 5.5MB 13 bytes (-0.0%) ⬇️

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.15%. Comparing base (adf5b37) to head (2e19493).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...hangedTab/shared/CommitFileDiff/CommitFileDiff.tsx 97.61% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3435      +/-   ##
==========================================
- Coverage   99.16%   99.15%   -0.01%     
==========================================
  Files         809      809              
  Lines       14296    14297       +1     
  Branches     3948     3956       +8     
==========================================
  Hits        14176    14176              
- Misses        111      112       +1     
  Partials        9        9              
Files with missing lines Coverage Δ
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <100.00%> (ø)
...ommitAndParent/useComparisonForCommitAndParent.tsx 100.00% <100.00%> (ø)
src/services/comparison/utils.ts 91.66% <100.00%> (ø)
src/services/pull/usePrefetchSingleFileComp.tsx 100.00% <100.00%> (ø)
...ervices/pull/useSingularImpactedFileComparison.tsx 100.00% <100.00%> (ø)
...services/pull/utils/transformImpactedFileToDiff.js 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.90% <ø> (ø)
...hangedTab/shared/CommitFileDiff/CommitFileDiff.tsx 97.61% <97.61%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.88% <97.77%> (-0.02%) ⬇️
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <ø> (ø)
UI 99.15% <ø> (ø)

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 adf5b37...2e19493. Read the comment docs.

@codecov-qa
Copy link

codecov-qa bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.15%. Comparing base (adf5b37) to head (2e19493).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...hangedTab/shared/CommitFileDiff/CommitFileDiff.tsx 97.61% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3435      +/-   ##
==========================================
- Coverage   99.16%   99.15%   -0.01%     
==========================================
  Files         809      809              
  Lines       14296    14297       +1     
  Branches     3955     3956       +1     
==========================================
  Hits        14176    14176              
- Misses        111      112       +1     
  Partials        9        9              
Files with missing lines Coverage Δ
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <100.00%> (ø)
...ommitAndParent/useComparisonForCommitAndParent.tsx 100.00% <100.00%> (ø)
src/services/comparison/utils.ts 91.66% <100.00%> (ø)
src/services/pull/usePrefetchSingleFileComp.tsx 100.00% <100.00%> (ø)
...ervices/pull/useSingularImpactedFileComparison.tsx 100.00% <100.00%> (ø)
...services/pull/utils/transformImpactedFileToDiff.js 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.90% <ø> (ø)
...hangedTab/shared/CommitFileDiff/CommitFileDiff.tsx 97.61% <97.61%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.88% <97.77%> (-0.02%) ⬇️
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <ø> (ø)
UI 99.15% <ø> (ø)

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 adf5b37...2e19493. Read the comment docs.

Copy link

codecov-public-qa bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.15%. Comparing base (adf5b37) to head (2e19493).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3435      +/-   ##
==========================================
- Coverage   99.16%   99.15%   -0.01%     
==========================================
  Files         809      809              
  Lines       14296    14297       +1     
  Branches     3955     3949       -6     
==========================================
  Hits        14176    14176              
- Misses        111      112       +1     
  Partials        9        9              
Files Coverage Δ
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <100.00%> (ø)
...ommitAndParent/useComparisonForCommitAndParent.tsx 100.00% <100.00%> (ø)
src/services/comparison/utils.ts 91.66% <100.00%> (ø)
src/services/pull/usePrefetchSingleFileComp.tsx 100.00% <100.00%> (ø)
...ervices/pull/useSingularImpactedFileComparison.tsx 100.00% <100.00%> (ø)
...services/pull/utils/transformImpactedFileToDiff.js 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.90% <ø> (ø)
...hangedTab/shared/CommitFileDiff/CommitFileDiff.tsx 97.61% <97.61%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.88% <97.77%> (-0.02%) ⬇️
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <ø> (ø)
UI 99.15% <ø> (ø)

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 adf5b37...2e19493. Read the comment docs.

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...hangedTab/shared/CommitFileDiff/CommitFileDiff.tsx 97.61% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3435      +/-   ##
==========================================
- Coverage   99.16%   99.15%   -0.01%     
==========================================
  Files         809      809              
  Lines       14296    14297       +1     
  Branches     3948     3956       +8     
==========================================
  Hits        14176    14176              
- Misses        111      112       +1     
  Partials        9        9              
Files with missing lines Coverage Δ
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <100.00%> (ø)
...ommitAndParent/useComparisonForCommitAndParent.tsx 100.00% <100.00%> (ø)
src/services/comparison/utils.ts 91.66% <100.00%> (ø)
src/services/pull/usePrefetchSingleFileComp.tsx 100.00% <100.00%> (ø)
...ervices/pull/useSingularImpactedFileComparison.tsx 100.00% <100.00%> (ø)
...services/pull/utils/transformImpactedFileToDiff.js 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.90% <ø> (ø)
...hangedTab/shared/CommitFileDiff/CommitFileDiff.tsx 97.61% <97.61%> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.88% <97.77%> (-0.02%) ⬇️
Services 99.45% <100.00%> (+<0.01%) ⬆️
Shared 99.80% <ø> (ø)
UI 99.15% <ø> (ø)

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 adf5b37...2e19493. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Oct 24, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
3982d6f Thu, 24 Oct 2024 11:21:22 GMT Expired Expired
297e740 Thu, 24 Oct 2024 12:46:30 GMT Expired Expired
297e740 Thu, 24 Oct 2024 12:47:50 GMT Expired Expired
67b341a Thu, 24 Oct 2024 13:06:45 GMT Expired Expired
ce377a3 Thu, 24 Oct 2024 13:55:13 GMT Expired Expired
2e19493 Tue, 29 Oct 2024 16:53:56 GMT Cloud Enterprise

@nicholas-codecov nicholas-codecov force-pushed the gh-eng-2729-chore-remove-virtual-diff-feature-flag-files-changed-commit-diff branch from ce377a3 to 2e19493 Compare October 29, 2024 16:43
@nicholas-codecov nicholas-codecov added this pull request to the merge queue Oct 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 29, 2024
@nicholas-codecov nicholas-codecov added this pull request to the merge queue Oct 29, 2024
Merged via the queue into main with commit 730e89f Oct 29, 2024
51 of 62 checks passed
@nicholas-codecov nicholas-codecov deleted the gh-eng-2729-chore-remove-virtual-diff-feature-flag-files-changed-commit-diff branch October 29, 2024 17:24
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.

[UI] Remove VirtualDiffRenderer from FilesChanged CommitDiff
3 participants