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

[Bug] An unnecessary Line break occurs when WrapStrategy.WRAP is set and a single line is just fit to hold the content #4235

Open
2 tasks done
vimcaw opened this issue Dec 5, 2024 · 4 comments
Assignees
Labels
bug Something isn't working scope:rendering

Comments

@vimcaw
Copy link

vimcaw commented Dec 5, 2024

Before you submit this issue, have you checked the following

  • Is this really a problem?
  • I have searched the Github Issues for similar issues, but did not find anything.

Affected packages and versions

0.5.1

Reproduction link

https://stackblitz.com/~/github.com/vimcaw/sheets-vite-demo

Expected behavior

There should be no line breaks, just as in Microsoft Excel:

CleanShot 2024-12-05 at 11 11 15@2x

Actual behavior

It produces an unnecessary Line break:

Arc 2024-12-05 11 29 33

System information

System:
OS: macOS 14.5
CPU: (8) arm64 Apple M2
Memory: 120.88 MB / 16.00 GB
Shell: 3.6.1 - /opt/homebrew/bin/fish
Binaries:
Node: 23.2.0 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.0 - /opt/homebrew/bin/npm
pnpm: 8.15.9 - /opt/homebrew/opt/pnpm@8/bin/pnpm
Browsers:
Chrome: 131.0.6778.87
Safari: 17.5

@vimcaw vimcaw added the bug Something isn't working label Dec 5, 2024
@jikkai
Copy link
Member

jikkai commented Dec 5, 2024

We are unable to reproduce the issue. Could you please provide us with the corresponding xlsx file?

@jikkai jikkai added need reproduction and removed bug Something isn't working labels Dec 5, 2024
@vimcaw
Copy link
Author

vimcaw commented Dec 5, 2024

We are unable to reproduce the issue. Could you please provide us with the corresponding xlsx file?

Yes, here it is:

Univer Wrapping Bug.xlsx

In Microsoft Excel:

CleanShot 2024-12-05 at 11 43 07@2x

In Univer:

CleanShot 2024-12-05 at 11 44 11@2x

Btw, it's not a problem with Excel data transforming, even easily reproduced in brand new Univer sheet spread:

CleanShot.2024-12-05.at.11.53.21.mp4

@jikkai jikkai added bug Something isn't working scope:rendering and removed need reproduction labels Dec 5, 2024
@Jocs Jocs removed their assignment Dec 17, 2024
@Jocs
Copy link
Contributor

Jocs commented Dec 17, 2024

@vimcaw

export interface IDocumentRenderConfig {
    // ...
    zeroWidthParagraphBreak?: BooleanNumber; // Whether to render the paragraph \r to zero width. the default value is false.
}

Set zeroWidthParagraphBreak to true, Will adding this config solve your problem?

@vimcaw
Copy link
Author

vimcaw commented Dec 17, 2024

@vimcaw

export interface IDocumentRenderConfig {
    // ...
    zeroWidthParagraphBreak?: BooleanNumber; // Whether to render the paragraph \r to zero width. the default value is false.
}

Set zeroWidthParagraphBreak to true, Will adding this config solve your problem?

It looks good to me. I will be glad to test it once released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scope:rendering
Projects
None yet
Development

No branches or pull requests

4 participants