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

fix(sheet): save edit content when select other tab #2160

Merged
merged 6 commits into from
May 10, 2024

Conversation

Dushusir
Copy link
Member

@Dushusir Dushusir commented May 6, 2024

  • 修复选择公式范围时切换到其他工作表,保存数据到了其他工作表问题
    如何测试?
  1. 新建两个空白工作表 :工作表1,工作表2
  2. 在 工作表1 的 A1单元格编辑 =,切换到 工作表2 选择 B1 范围
  3. Enter 确定,此时自动切换回 工作表1,并且 A1 的内容更新为 =工作表2!B1(之前是数据保存到了 工作表2,Univer Preview
  • 补齐了所有公式参数数量报错提示
    如何测试?
    比如测试 OFFSET,少于 3 个或者大于 5 个参数都需要报 #N/A 错误。其他公式同理(暂不包含其他类型的错误)

Copy link

codecov bot commented May 6, 2024

Codecov Report

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

Project coverage is 30.75%. Comparing base (0ed9f56) to head (18ec824).

Files Patch % Lines
packages/sheets-formula/src/services/utils.ts 0.00% 9 Missing ⚠️
...es/engine-formula/src/functions/meta/cube/index.ts 0.00% 3 Missing ⚠️
...engine-formula/src/functions/meta/compare/index.ts 0.00% 2 Missing ⚠️
...engine-formula/src/functions/meta/divided/index.ts 0.00% 2 Missing ⚠️
...s-ui/src/controllers/editor/end-edit.controller.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2160      +/-   ##
==========================================
+ Coverage   30.65%   30.75%   +0.10%     
==========================================
  Files        1272     1272              
  Lines       70149    70172      +23     
  Branches    14863    14801      -62     
==========================================
+ Hits        21504    21582      +78     
+ Misses      48645    48590      -55     

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

Copy link

github-actions bot commented May 6, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@Dushusir Dushusir force-pushed the dushusir/formula-bugs0506 branch 2 times, most recently from 76f0776 to 8f24f6c Compare May 8, 2024 03:12
@Dushusir Dushusir added the qa:untested This PR is ready to be tested label May 8, 2024
@Dushusir Dushusir marked this pull request as ready for review May 8, 2024 03:53
@univer-bot
Copy link

univer-bot bot commented May 8, 2024

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

Origin Title: fix(sheet): save edit content when select other tab

Title: fix(sheet): save edit content when select other tab


  • Fixed the problem of switching to other worksheets when selecting a formula range and saving data to other worksheets.
    How to test?
  1. Create two new blank worksheets: Worksheet 1, Worksheet 2
  2. Edit = in cell A1 of Sheet 1, switch to Sheet 2 and select the B1 range
  3. Enter to confirm. At this time, it automatically switches back to worksheet 1, and the content of A1 is updated to =worksheet 2!B1 (previously, the data was saved to worksheet 2, [Univer Preview](https://univer-preview .vercel.app/sheets/))
  • Completed all formula parameter number error prompts
    How to test?
    For example, when testing OFFSET, if there are less than 3 or more than 5 parameters, a #N/A error will be reported. The same applies to other formulas (other types of errors are not included for now)

@oumomomo
Copy link

oumomomo commented May 8, 2024

问题1、
max函数引用非数字外的值,计算结果为空
image

excel及google显示为0
image

问题2、
MOD函数被除数过长时结果计算为0,未报错
image

excel:报错
image
google:报错
image

@univer-bot
Copy link

univer-bot bot commented May 8, 2024

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

Question 1,
The max function refers to a value other than a number, and the calculation result is empty.
image

excel and google display as 0
image

Question 2.
When the dividend of the MOD function is too long, the result is calculated as 0 and no error is reported.
image

excel: error
image
google: error report
image

@zhaolixin7
Copy link

@Dushusir 编辑时切换表格,编辑内容没有先保存

@univer-bot
Copy link

univer-bot bot commented May 8, 2024

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

@Dushusir When switching tables during editing, the edited content is not saved first

@dream-num dream-num deleted a comment from univer-bot bot May 8, 2024
@Dushusir Dushusir force-pushed the dushusir/formula-bugs0506 branch from 4c1f2df to bc6d791 Compare May 9, 2024 04:02
@oumomomo oumomomo added qa:verified This PR has already by verified by a QA and is considered good enough to be merge and removed qa:untested This PR is ready to be tested labels May 9, 2024
@Dushusir Dushusir merged commit 3e02de5 into dev May 10, 2024
9 checks passed
@Dushusir Dushusir deleted the dushusir/formula-bugs0506 branch May 10, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants