joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Desktop: Resolves #9998: Fixed text wrapping in Specllcheck button

Open RadCod3 opened this issue 11 months ago • 5 comments

Description

Fixed https://github.com/laurent22/joplin/issues/9998 using one liner.

Screenshots

Before: image After: image

RadCod3 avatar Feb 26 '24 17:02 RadCod3

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

github-actions[bot] avatar Feb 26 '24 17:02 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

RadCod3 avatar Feb 26 '24 17:02 RadCod3

Now that I see the screenshot... Is it possible to instead cut the text with an ellipsis?

laurent22 avatar Feb 27 '24 10:02 laurent22

Will try to do so and get back to you.

RadCod3 avatar Feb 27 '24 11:02 RadCod3

I tried the following css but the text won't truncate without setting a specific value to the width, which then wont show the full text even when you expand it. Will try it out some more, any ideas?

white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;

Edit: I've found some references: https://css-tricks.com/flexbox-truncated-text/

Edit 2: Got a working solution now! Is this acceptable?

RadCod3 avatar Feb 27 '24 12:02 RadCod3

I had to wrap text inside the ToolbarButtons with a span, otherwise it wouldn’t truncate with ellipsis, it just truncated from both sides.

Also apologies if I do this wrong but @PackElend label me please (Do I ask for this label after creating future PRs as well?).

RadCod3 avatar Feb 28 '24 01:02 RadCod3

(Do I ask for this label after creating future PRs as well?)

yes, otherwise we cannot track your work

PackElend avatar Feb 28 '24 07:02 PackElend