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: Tidy up virtual renderers #3353

Merged
merged 9 commits into from
Oct 16, 2024

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR tidy's up the virtual renderers by extracting some of their more specific logic out into their own hooks so that they can be shared between the two components rather than having it be duplicated.

Notable Changes

  • Create useDisablePointerEvents, useLeftScrollSync, useSyncScrollMargin, and useSyncWrapperWidth hooks
  • Update virtual renderers to use the new hooks

Copy link

codecov bot commented Oct 4, 2024

Bundle Report

Changes will decrease total bundle size by 1.38kB (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-array-push 6.14MB 1.38kB (-0.02%) ⬇️

@codecov-qa
Copy link

codecov-qa bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (1c3aee8) to head (d4a75db).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3353      +/-   ##
==========================================
- Coverage   99.17%   99.17%   -0.01%     
==========================================
  Files         805      809       +4     
  Lines       14255    14209      -46     
  Branches     3930     3921       -9     
==========================================
- Hits        14138    14092      -46     
  Misses        108      108              
  Partials        9        9              
Files with missing lines Coverage Δ
...hangedTab/shared/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...FilesChangedTab/FilesChanged/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
...ge/routes/IndirectChangesTab/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
src/shared/RawFileViewer/RawFileViewer.tsx 100.00% <ø> (ø)
...useDisablePointerEvents/useDisablePointerEvents.ts 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/ColorBar.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/LineNumber.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.83% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualFileRenderer.tsx 98.00% <100.00%> (ø)
... and 4 more
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.93% <ø> (ø)
Services 99.45% <ø> (ø)
Shared 99.80% <100.00%> (+<0.01%) ⬆️
UI 99.06% <100.00%> (-0.05%) ⬇️

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 1c3aee8...d4a75db. Read the comment docs.

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (1c3aee8) to head (d4a75db).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3353      +/-   ##
==========================================
- Coverage   99.17%   99.17%   -0.01%     
==========================================
  Files         805      809       +4     
  Lines       14255    14209      -46     
  Branches     3930     3916      -14     
==========================================
- Hits        14138    14092      -46     
  Misses        108      108              
  Partials        9        9              
Files with missing lines Coverage Δ
...hangedTab/shared/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...FilesChangedTab/FilesChanged/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
...ge/routes/IndirectChangesTab/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
src/shared/RawFileViewer/RawFileViewer.tsx 100.00% <ø> (ø)
...useDisablePointerEvents/useDisablePointerEvents.ts 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/ColorBar.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/LineNumber.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.83% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualFileRenderer.tsx 98.00% <100.00%> (ø)
... and 4 more
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.93% <ø> (ø)
Services 99.45% <ø> (ø)
Shared 99.80% <100.00%> (+<0.01%) ⬆️
UI 99.06% <100.00%> (-0.05%) ⬇️

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 1c3aee8...d4a75db. Read the comment docs.

Copy link

codecov-public-qa bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (1c3aee8) to head (d4a75db).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3353      +/-   ##
==========================================
- Coverage   99.17%   99.17%   -0.01%     
==========================================
  Files         805      809       +4     
  Lines       14255    14209      -46     
  Branches     3935     3916      -19     
==========================================
- Hits        14138    14092      -46     
  Misses        108      108              
  Partials        9        9              
Files Coverage Δ
...hangedTab/shared/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...FilesChangedTab/FilesChanged/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
...ge/routes/IndirectChangesTab/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
src/shared/RawFileViewer/RawFileViewer.tsx 100.00% <ø> (ø)
...useDisablePointerEvents/useDisablePointerEvents.ts 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/ColorBar.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/LineNumber.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.83% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualFileRenderer.tsx 98.00% <100.00%> (ø)
... and 4 more
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.93% <ø> (ø)
Services 99.45% <ø> (ø)
Shared 99.80% <100.00%> (+<0.01%) ⬆️
UI 99.06% <100.00%> (-0.05%) ⬇️

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 1c3aee8...d4a75db. Read the comment docs.

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Oct 4, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
525a243 Fri, 04 Oct 2024 17:42:47 GMT Expired Expired
71fe3e1 Fri, 04 Oct 2024 18:00:22 GMT Expired Expired
2063cac Wed, 16 Oct 2024 15:55:44 GMT Expired Expired
d4a75db Wed, 16 Oct 2024 16:45:28 GMT Cloud Enterprise

@codecov-staging
Copy link

codecov-staging bot commented Oct 4, 2024

Bundle Report

Changes will decrease total bundle size by 11.29kB (-0.18%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-staging-array-push 6.14MB 11.29kB (-0.18%) ⬇️

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3353      +/-   ##
==========================================
- Coverage   99.17%   99.17%   -0.01%     
==========================================
  Files         805      809       +4     
  Lines       14255    14209      -46     
  Branches     3930     3916      -14     
==========================================
- Hits        14138    14092      -46     
  Misses        108      108              
  Partials        9        9              
Files with missing lines Coverage Δ
...hangedTab/shared/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...rectChangesTable/CommitFileDiff/CommitFileDiff.jsx 100.00% <ø> (ø)
...FilesChangedTab/FilesChanged/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
...ge/routes/IndirectChangesTab/FileDiff/FileDiff.jsx 97.22% <ø> (ø)
src/shared/RawFileViewer/RawFileViewer.tsx 100.00% <ø> (ø)
...useDisablePointerEvents/useDisablePointerEvents.ts 100.00% <100.00%> (ø)
src/ui/VirtualRenderers/ColorBar.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/LineNumber.tsx 100.00% <ø> (ø)
src/ui/VirtualRenderers/VirtualDiffRenderer.tsx 98.83% <100.00%> (ø)
src/ui/VirtualRenderers/VirtualFileRenderer.tsx 98.00% <100.00%> (ø)
... and 4 more
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 100.00% <ø> (ø)
Pages 98.93% <ø> (ø)
Services 99.45% <ø> (ø)
Shared 99.80% <100.00%> (+<0.01%) ⬆️
UI 99.06% <100.00%> (-0.05%) ⬇️

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 1c3aee8...d4a75db. Read the comment docs.

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 1b2bf9f Oct 16, 2024
62 checks passed
@nicholas-codecov nicholas-codecov deleted the chore-tidy-up-virtual-renderers branch October 16, 2024 17:00
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