-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Slashes with text ellipsis overflow behaves differently than Android (Desktop) #1888
Slashes with text ellipsis overflow behaves differently than Android (Desktop) #1888
Comments
Edit: Nevermind, the issue reproduces also on Windows, I did a small mistake when testing it, my apologies. |
Tried on MacOS. It works same way as your desktop example |
Also bumped to this. An example from Android: https://developer.android.com/jetpack/compose/text#text-overflow @Composable
fun OverflowedText() {
Text("Hello Compose ".repeat(50), maxLines = 2, overflow = TextOverflow.Ellipsis)
} But on desktop, it seems it tends to replace the whole word by ellipsis often. I can have |
@Sage-Kreiter Can you please provide code snippet to reproduce this problem? |
Here is a Box with Text that overflows
Here is a Box with text that overflows but contains a space as the 3rd character (same happens with "/" and "-")
Could just be that I'm missing a setting to not end on a delimeter |
This behaviour is defined in skia, Compose itself doesn't control it. It has been already fixed in this commit - https://skia.googlesource.com/skia.git/+/0d31aa1f49cb8cfd790c44d92a9a023839524865 |
Great. Thanks for looking into this |
…ellipsis errors error see: JetBrains/compose-multiplatform#1888
## Proposed Changes - Update skiko to `0.7.87` ## Issues Fixed Fixes JetBrains/compose-multiplatform#1888 <img width="310" alt="image" src="https://github.com/JetBrains/compose-multiplatform-core/assets/1836384/dd28cc81-1d5d-4119-b9fa-0e1e4e28f794"> --------- Co-authored-by: Igor Demin <igor.demin@jetbrains.com>
## Proposed Changes - Update skiko to `0.7.87` ## Issues Fixed Fixes JetBrains/compose-multiplatform#1888 <img width="310" alt="image" src="https://github.com/JetBrains/compose-multiplatform-core/assets/1836384/dd28cc81-1d5d-4119-b9fa-0e1e4e28f794"> --------- Co-authored-by: Igor Demin <igor.demin@jetbrains.com> (cherry picked from commit 3d00945)
Which release can I find the fix? I tried 1.5.11 but it does not contain this fix. |
It will be available in 1.6.0 |
## Proposed Changes - Update skiko to `0.7.87` ## Issues Fixed Fixes JetBrains/compose-multiplatform#1888 <img width="310" alt="image" src="https://github.com/JetBrains/compose-multiplatform-core/assets/1836384/dd28cc81-1d5d-4119-b9fa-0e1e4e28f794"> --------- Co-authored-by: Igor Demin <igor.demin@jetbrains.com>
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
When I have got a
Text
with slashes (like a file path) as text that doesn't fit the current screen, in the Android version of compose the string gets cut partially and not the whole word. The Desktop version cuts the whole word instead until the slash.Desktop: "FooBar" is not shown, just the ellipsis.
Android: "Foo" is shown + Ellipsis
Code sample:
TextOverflow.Clip
behaves in equally in both platform by cutting the whole word.The text was updated successfully, but these errors were encountered: