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

feat: add scrollLeftTop for sheet snapshot #2348

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

lumixraku
Copy link
Contributor

@lumixraku lumixraku commented May 29, 2024

close #2116
#2116

Add scrollLeft scrollTop to sheet snapshot after scroll command.

check scrollLeft and scrollTop value in univer._univerInstanceService.getFocusedUnit()._snapshot
image

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

@lumixraku lumixraku changed the title feat: add scrollLeftTop for sheet snapshot WIP: add scrollLeftTop for sheet snapshot May 29, 2024
@lumixraku lumixraku requested a review from Dushusir May 29, 2024 11:54
@lumixraku lumixraku requested a review from DR-Univer as a code owner May 29, 2024 12:41
@jikkai jikkai marked this pull request as draft May 29, 2024 14:08
@lumixraku lumixraku force-pushed the feat/add-scrollLeftTop-sheet-snapshot branch from 54a297d to 5b93b98 Compare May 30, 2024 02:29
Copy link

codecov bot commented May 30, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 180 lines in your changes are missing coverage. Please review.

Project coverage is 27.09%. Comparing base (dc8b0ac) to head (3608fea).

Files Patch % Lines
packages/engine-render/src/viewport.ts 0.00% 60 Missing ⚠️
...ers/render-controllers/scroll.render-controller.ts 0.00% 51 Missing ⚠️
...s/sheets-ui/src/services/scroll-manager.service.ts 61.01% 23 Missing ⚠️
...ers/render-controllers/freeze.render-controller.ts 0.00% 12 Missing ⚠️
.../engine-render/src/components/sheets/interfaces.ts 0.00% 9 Missing ⚠️
packages/sheets-ui/src/common/utils.ts 0.00% 3 Missing ⚠️
...ui/src/controllers/doc-editor-bridge.controller.ts 0.00% 2 Missing ⚠️
packages/engine-render/src/basics/scroll-xy.ts 0.00% 2 Missing ⚠️
...ets-ui/src/commands/commands/set-scroll.command.ts 0.00% 2 Missing ⚠️
...ets-ui/src/commands/operations/scroll.operation.ts 0.00% 2 Missing ⚠️
... and 13 more
Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2348   +/-   ##
=======================================
  Coverage   27.09%   27.09%           
=======================================
  Files        1647     1647           
  Lines       82997    83070   +73     
  Branches    17198    17219   +21     
=======================================
+ Hits        22485    22506   +21     
- Misses      60512    60564   +52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lumixraku lumixraku force-pushed the feat/add-scrollLeftTop-sheet-snapshot branch 2 times, most recently from 2cb8fa1 to 0a8bcf0 Compare May 30, 2024 03:51
Copy link

github-actions bot commented May 30, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@lumixraku lumixraku changed the title WIP: add scrollLeftTop for sheet snapshot feat: add scrollLeftTop for sheet snapshot May 30, 2024
@lumixraku lumixraku force-pushed the feat/add-scrollLeftTop-sheet-snapshot branch 8 times, most recently from b17b616 to 2b70466 Compare June 3, 2024 03:58
@lumixraku lumixraku force-pushed the feat/add-scrollLeftTop-sheet-snapshot branch from 2b70466 to 3608fea Compare June 3, 2024 04:00
@lumixraku lumixraku self-assigned this Jun 3, 2024
@lumixraku lumixraku marked this pull request as ready for review June 3, 2024 04:10
@lumixraku lumixraku requested a review from Jocs as a code owner June 3, 2024 04:10
@lumixraku lumixraku merged commit 38d8003 into dev Jun 3, 2024
9 checks passed
@lumixraku lumixraku deleted the feat/add-scrollLeftTop-sheet-snapshot branch June 3, 2024 06:02
lumixraku added a commit that referenced this pull request Jun 3, 2024
lumixraku added a commit that referenced this pull request Jun 3, 2024
lumixraku added a commit that referenced this pull request Jun 4, 2024
* feat: add scrollLeftTop for sheet snapshot

* fix: set-frozen test case need ScrollManagerService -> SheetSkeletonManagerService

* fix: switch tab sync state in scene and viewport
lumixraku added a commit that referenced this pull request Jun 6, 2024
* feat: add scrollLeftTop for sheet snapshot

* fix: set-frozen test case need ScrollManagerService -> SheetSkeletonManagerService

* fix: switch tab sync state in scene and viewport

fix: revert back _updateViewZoom

chore: import SHEET_VIEWPORT_KEY from engine-render
lumixraku added a commit that referenced this pull request Jun 6, 2024
* feat: add scrollLeftTop for sheet snapshot

* fix: set-frozen test case need ScrollManagerService -> SheetSkeletonManagerService

* fix: switch tab sync state in scene and viewport

fix: revert back _updateViewZoom

chore: import SHEET_VIEWPORT_KEY from engine-render
lumixraku added a commit that referenced this pull request Jun 6, 2024
* feat: add scrollLeftTop for sheet snapshot

* fix: set-frozen test case need ScrollManagerService -> SheetSkeletonManagerService

* fix: switch tab sync state in scene and viewport

fix: revert back _updateViewZoom

chore: import SHEET_VIEWPORT_KEY from engine-render
lumixraku added a commit that referenced this pull request Jun 6, 2024
* feat: add scrollLeftTop for sheet snapshot

* fix: set-frozen test case need ScrollManagerService -> SheetSkeletonManagerService

* fix: switch tab sync state in scene and viewport

fix: revert back _updateViewZoom

chore: import SHEET_VIEWPORT_KEY from engine-render
lumixraku added a commit that referenced this pull request Jun 7, 2024
* feat: add scrollLeftTop for sheet snapshot (#2348)

* feat: add scrollLeftTop for sheet snapshot

* fix: set-frozen test case need ScrollManagerService -> SheetSkeletonManagerService

* fix: switch tab sync state in scene and viewport

* fix: revert back _updateViewZoom

* chore: import SHEET_VIEWPORT_KEY from engine-render

* fix: when update scroll should consider scale factor

* chore: do not change scrollXY when viewport width is negative

* test: should use sheetSkService from cur render
lumixraku added a commit that referenced this pull request Jun 17, 2024
* feat: add scrollLeftTop for sheet snapshot (#2348)

* feat: add scrollLeftTop for sheet snapshot

* fix: set-frozen test case need ScrollManagerService -> SheetSkeletonManagerService

* fix: switch tab sync state in scene and viewport

* fix: revert back _updateViewZoom

* chore: import SHEET_VIEWPORT_KEY from engine-render

* fix: when update scroll should consider scale factor

* chore: do not change scrollXY when viewport width is negative

* test: should use sheetSkService from cur render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] the scrollTop and scrollLeft of active sheet is always 0
4 participants