dream-num / univer

Univer is an open-source alternative to Google Sheets, Slides, and Docs
https://univer.ai
Apache License 2.0
5.73k stars 474 forks source link

refactor: refactor sheet selection modules #2584

Open wzhudev opened 2 weeks ago

wzhudev commented 2 weeks ago

close https://github.com/dream-num/univer-pro/issues/1260

Pull Request Checklist

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 18.47826% with 1275 lines in your changes missing coverage. Please review.

Project coverage is 26.79%. Comparing base (01c1b32) to head (d6bc5f0). Report is 8 commits behind head on dev.

:exclamation: Current head d6bc5f0 differs from pull request most recent head c7c4e2a

Please upload reports for the commit c7c4e2a to get more accurate results.

Files Patch % Lines
...ervices/selection/base-selection-render.service.ts 0.26% 380 Missing :warning:
...heets-formula/src/controllers/prompt.controller.ts 0.00% 122 Missing :warning:
...src/services/selection/selection-render.service.ts 0.93% 106 Missing :warning:
...s/render-services/ref-selections.render-service.ts 0.00% 92 Missing :warning:
...ontrollers/defined-name/defined-name.controller.ts 0.00% 59 Missing :warning:
...c/services/selections/selection-manager.service.ts 73.88% 35 Missing :warning:
...ender-controllers/header-move.render-controller.ts 0.00% 32 Missing :warning:
packages/sheets-ui/src/controllers/menu/menu.ts 18.42% 31 Missing :warning:
...ers/sheet-drawing-transform-affected.controller.ts 0.00% 29 Missing :warning:
...ender/src/render-manager/render-manager.service.ts 0.00% 27 Missing :warning:
... and 96 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2584 +/- ## ========================================== - Coverage 27.00% 26.79% -0.21% ========================================== Files 1694 1713 +19 Lines 85225 85552 +327 Branches 17775 17860 +85 ========================================== - Hits 23011 22923 -88 - Misses 62214 62629 +415 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 2 weeks ago

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link
DR-Univer commented 6 days ago

image 1、公式快捷键失效了,编辑框能输入= 或者 , 可以通过方向键继续新增选区。 2、跨子表选择范围后,确认输入,没有自动跳回当前子表。 dev分支是正常得

univer-bot[bot] commented 6 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

image

  1. The formula shortcut keys are invalid. You can enter = or in the edit box, and you can continue to add new selections through the arrow keys.
  2. After selecting a range across sub-tables, confirm the input and there will be no automatic jump back to the current sub-table. The dev branch is normal
wzhudev commented 6 days ago

image 1、公式快捷键失效了,编辑框能输入= 或者 , 可以通过方向键继续新增选区。 2、跨子表选择范围后,确认输入,没有自动跳回当前子表。 dev分支是正常得

OK,这应该是把公式选区移除出普通选区导致的,我改改

univer-bot[bot] commented 6 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

![image](https://private-user-images.githubusercontent.com/68851825/344375773-b9d2afa0-64b6-4c73-bab6-e0fd4e7ae035.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.._176gS HUjfy3Bzf1d8EuYAPMq8hO-pdB5Y_pZRmUSHs) 1. Formula shortcut keys If it fails, you can enter = in the edit box. Or, you can use the arrow keys to continue adding new selections. 2. After selecting a range across sub-tables, confirm the input and there will be no automatic jump back to the current sub-table. The dev branch is normal

OK, this should be caused by removing the formula selection area from the ordinary selection area. I will change it.

wzhudev commented 4 days ago

Problems mentioned above have been resolved.

DR-Univer commented 4 days ago

image 数组公式的选框消失

univer-bot[bot] commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

image The array formula selection box disappears

DR-Univer commented 4 days ago

image 丝滑的操作无法达成。操作步骤:

  1. 输入=
  2. 输入su,弹出公式面板
  3. 通过上下方向键选择函数
  4. 按Enter进行输入
  5. 公式变为=SUM(
  6. 此时通过方向键可以新建一个选区,dev可以,重构后直接确认保存了
univer-bot[bot] commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

image Silky smooth operation is not achievable. Steps:

  1. Enter =
  2. Enter su to pop up the formula panel.
  3. Use the up and down arrow keys to select the function
  4. Press Enter to enter
  5. The formula becomes =SUM(
  6. At this time, you can use the arrow keys to create a new selection, dev can, and directly confirm the save after reconstruction
DR-Univer commented 4 days ago

image 1、范围选择器的内容不合法。 2、focus范围选择器。 3、点击canvas画布,正确选区会覆盖范围选择器内正确的内容。(目前表现是不会覆盖)

univer-bot[bot] commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

image

  1. The content of the range selector is illegal.
  2. Focus range selector.
  3. Click on the canvas, and the correct selection will cover the correct content in the range selector. (The current performance is not covered)
DR-Univer commented 4 days ago

https://github.com/dream-num/univer/assets/68851825/bea56eab-367d-452c-82ec-be469f18b9a5 excel 正常选区 和 公式选区 应该互斥

univer-bot[bot] commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

https://github.com/dream-num/univer/assets/68851825/bea56eab-367d-452c-82ec-be469f18b9a5 Excel normal selection and formula selection should be mutually exclusive

DR-Univer commented 4 days ago

image 这个线上也有,估计被改坏了

  1. 通过鼠标移动选区
  2. 移动到视口的临界
  3. 继续向下移动
  4. 选区移出视口,视口没有跟随滚动。(移动到大概向下5个单元格,视口才会动一次)
univer-bot[bot] commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

image It's also available online, and it's probably been modified.

  1. Move the selection with the mouse
  2. Move to the edge of the viewport
  3. Continue moving down
  4. The selection moves out of the viewport, but the viewport does not scroll with it. (Move to about 5 cells down, and the viewport will move once)