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): fix some copy/paste bugs #1754

Merged
merged 24 commits into from Apr 13, 2024
Merged

fix(sheet): fix some copy/paste bugs #1754

merged 24 commits into from Apr 13, 2024

Conversation

ybzky
Copy link
Contributor

@ybzky ybzky commented Apr 1, 2024

修复

  1. 复制时卡顿问题
  2. 粘贴飞书表格时携带comment
  3. 粘贴excel没有携带边框线、字色、背景颜色、字重;字号pt转px错误
  4. 粘贴没有解析数字格式
  5. 复制生成的表格行列数不正确
  6. set-border type为0仍然渲染问题
  7. 增加外部表格粘贴进来没有解析富文本的逻辑
  8. 修复从excel粘贴字号大小不正确的问题
  9. 粘贴区域的合并单元格没有被清除的问题
  10. 粘贴时行高错误

&

close #1619 #1624 #1585 #1559 #1209 #1082 #1389

@univer-bot
Copy link

univer-bot bot commented Apr 1, 2024

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

Origin Title: fix(sheet): fix some copy/paste bugs

Title: fix(sheet): fix some copy/paste bugs


repair

  1. Causing issues during copying
  2. Carry comment when pasting the Feishu form
  3. Pasting excel does not carry the border line, font color, background color, and font weight; the font size pt is converted to px incorrectly
  4. Paste does not parse number format
  5. The number of rows and columns in the table generated by copying is incorrect.
  6. Set-border type is 0 but still rendering problem
  7. When adding an external table and pasting it in, there is no logic for parsing rich text.
  8. Fix the problem of incorrect font size when pasting from excel
  9. The merged cells in the pasted area are not cleared.
  10. Wrong line height when pasting

&

close #1619 #1624 #1585 #1559 #1209 #1082 #1389

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

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

Project coverage is 29.71%. Comparing base (80f43b8) to head (480257a).

Files Patch % Lines
packages/core/src/shared/clipboard.ts 0.00% 75 Missing ⚠️
packages/ui/src/utils/cell.ts 0.00% 61 Missing ⚠️
.../src/controllers/clipboard/clipboard.controller.ts 35.13% 24 Missing ⚠️
...mt/src/controllers/numfmt.copy-paste.controller.ts 16.66% 20 Missing ⚠️
...ui/src/services/clipboard/html-to-usm/converter.ts 96.20% 6 Missing ⚠️
...ets-ui/src/services/clipboard/clipboard.service.ts 88.37% 5 Missing ⚠️
...ui/src/services/clipboard/usm-to-html/convertor.ts 66.66% 4 Missing ⚠️
packages/core/src/shared/common.ts 0.00% 2 Missing ⚠️
...-render/src/components/sheets/extensions/border.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1754      +/-   ##
==========================================
+ Coverage   29.54%   29.71%   +0.16%     
==========================================
  Files        1168     1169       +1     
  Lines       63548    63824     +276     
  Branches    13425    13531     +106     
==========================================
+ Hits        18773    18963     +190     
- Misses      44775    44861      +86     

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

Copy link

github-actions bot commented Apr 1, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@wzhudev
Copy link
Member

wzhudev commented Apr 2, 2024

Please build unit tests so we can make sure that these problems wouldn't occur in the future.

@ybzky ybzky marked this pull request as draft April 2, 2024 02:07
@ybzky ybzky force-pushed the fix-sheet-paste-some-bugs branch from df3ee81 to baec8c7 Compare April 7, 2024 10:49
@ybzky ybzky marked this pull request as ready for review April 8, 2024 02:45
return newStyleString.trim();
}

function parseTableByHtml(htmlElement: HTMLIFrameElement, skeleton?: SpreadsheetSkeleton) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is too long, and it requires additional comments to improve its understanding.

Copy link
Contributor

@yuhongz yuhongz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@univer-bot univer-bot bot added the qa:untested This PR is ready to be tested label Apr 9, 2024
@ybzky ybzky requested a review from Dushusir as a code owner April 10, 2024 07:01
@ybzky ybzky force-pushed the fix-sheet-paste-some-bugs branch from 2a50fa8 to cc34779 Compare April 10, 2024 07:11
@zhaolixin7
Copy link

zhaolixin7 commented Apr 10, 2024

@ybzky #1619 粘贴列不够时未扩展
#1624 Excel复制日期,编辑态粘贴到univer未解析2024_4_10 15_59_58 video.webm
#1585 复制合并单元格粘贴到Excel变成多行2024_4_10 16_19_36 video.webm
#1209 univer 互相粘贴合并单元格内容错位2024_4_10 16_28_32 video.webm

@univer-bot
Copy link

univer-bot bot commented Apr 10, 2024

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

@ybzky #1619 Paste column not expanded when not enough
#1624 Copy the date in Excel and paste it into univer in editing mode but it is not parsed 2024_4_10 15_59_58 video.webm
#1585 Copy merged cells and paste them into Excel to become multiple rows 2024_4_10 16_19_36 video.webm
#1209 univer pastes each other and merges the cell contents into misplacements 2024_4_10 16_28_32 video.webm

@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Apr 13, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Apr 13, 2024
@wzhudev
Copy link
Member

wzhudev commented Apr 13, 2024

Please rebase this PR.

@ybzky ybzky force-pushed the fix-sheet-paste-some-bugs branch from 4311c44 to 480257a Compare April 13, 2024 09:07
@ybzky ybzky merged commit 496dcb8 into dev Apr 13, 2024
8 checks passed
@ybzky ybzky deleted the fix-sheet-paste-some-bugs branch April 13, 2024 12:47
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
4 participants