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

Desktop: Resolves #9998: Fixed text wrapping in Spellcheck button #10005

Merged
merged 5 commits into from
Mar 4, 2024

Conversation

RadCod3
Copy link
Contributor

@RadCod3 RadCod3 commented Feb 26, 2024

Description

Fixed #9998 using one liner.

Screenshots

Before:
image
After:
image

Copy link
Contributor

github-actions bot commented Feb 26, 2024

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

@RadCod3
Copy link
Contributor Author

RadCod3 commented Feb 26, 2024

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

github-actions bot added a commit that referenced this pull request Feb 26, 2024
@laurent22
Copy link
Owner

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

@RadCod3
Copy link
Contributor Author

RadCod3 commented Feb 27, 2024

Will try to do so and get back to you.

@RadCod3
Copy link
Contributor Author

RadCod3 commented Feb 27, 2024

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
Copy link
Contributor Author

RadCod3 commented Feb 28, 2024

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?).

@PackElend
Copy link
Collaborator

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

yes, otherwise we cannot track your work

@RadCod3 RadCod3 changed the title Desktop: Resolves #9998: Fixed text wrapping in Specllcheck button Desktop: Resolves #9998: Fixed text wrapping in Spellcheck button Feb 28, 2024
@@ -43,7 +43,10 @@ export default function ToolbarButton(props: Props) {
if (!isEnabled) classes.push('disabled');

const onClick = getProp(props, 'onClick');

const style: any = {
Copy link
Owner

Choose a reason for hiding this comment

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

Please don't use "any". React.CSSProperties is the correct type here I believe

@laurent22 laurent22 merged commit 5aba1e3 into laurent22:dev Mar 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text in the spellcheck button is wrapping
3 participants