gazebo icon indicating copy to clipboard operation
gazebo copied to clipboard

chore: Tidy up virtual renderers

Open nicholas-codecov opened this issue 1 year ago • 7 comments

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

nicholas-codecov avatar Oct 04 '24 17:10 nicholas-codecov

Bundle Report

Changes will decrease total bundle size by 1.38kB (-0.02%) :arrow_down:. This is within the configured threshold :white_check_mark:

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

codecov[bot] avatar Oct 04 '24 17:10 codecov[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

:white_check_mark: 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%) :arrow_up:
UI 99.06% <100.00%> (-0.05%) :arrow_down:

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-qa[bot] avatar Oct 04 '24 17:10 codecov-qa[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

:white_check_mark: 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%) :arrow_up:
UI 99.06% <100.00%> (-0.05%) :arrow_down:

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[bot] avatar Oct 04 '24 17:10 codecov[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

:white_check_mark: 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%) :arrow_up:
UI 99.06% <100.00%> (-0.05%) :arrow_down:

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-public-qa[bot] avatar Oct 04 '24 17:10 codecov-public-qa[bot]

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
525a2430b0f121d74fe02b5b822ccc019e253c54 Fri, 04 Oct 2024 17:42:47 GMT Expired Expired
71fe3e19781de363b8321ed19a691a9973dd124a Fri, 04 Oct 2024 18:00:22 GMT Expired Expired
2063caca74d4d9ee7bef9b0e0bad02115e1b4a56 Wed, 16 Oct 2024 15:55:44 GMT Expired Expired
d4a75db402f0b41c8255da944cc160e7afc101b9 Wed, 16 Oct 2024 16:45:28 GMT Cloud Enterprise

codecov-releaser avatar Oct 04 '24 17:10 codecov-releaser

Bundle Report

Changes will decrease total bundle size by 11.29kB (-0.18%) :arrow_down:. This is within the configured threshold :white_check_mark:

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

codecov-staging[bot] avatar Oct 04 '24 17:10 codecov-staging[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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%) :arrow_up:
UI 99.06% <100.00%> (-0.05%) :arrow_down:

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.