Status Update
Comments
so...@google.com <so...@google.com>
gl...@gmail.com <gl...@gmail.com> #3
coming back to this issue. I see this is because we just cannot really drag handle behind the screen (because the "pointer" of the handle is where we select the text, so the handle need to be out of the screen to select the last letter).
That being said, if being super careful I'm able to select the whole first word even with no padding (sometimes takes a few attempts).
Siyamed, how do you deal with this in the platform text? Frankly, I expect no text to be at the very edge of the screen in the real apps, and since it's possible to select by just raising the selection handle higher (positionning at the line above seelcted the whole line) idk how big the problem is.
Anyway, reassigning to Siyamed to investigate the selection in the platform for clues or ask someone from the text team to do it.
jo...@google.com <jo...@google.com> #4
Thanks.
Can you please elaborate on the first sentence?
I see this is because we just cannot really drag handle behind the screen (because the "pointer" of the handle is where we select the text, so the handle need to be out of the screen to select the last letter).
I did not understand dragging the handle behind the screen.
to...@gmail.com <to...@gmail.com> #5
In the Gmail app for example (see image) the selection handle will get clipped to accommodate the selection, which is unlike what is happening here (see second image).
jo...@google.com <jo...@google.com> #6
Can you please elaborate on the first sentence?
to Siyamed: Sure. This is basically what exploringbinary showed in their screenshots. the start handle selects the text based on its top right corner (where the sharp pointer edge is), so in order to select the text near the edge of the screen we have to essentially drag the handle out of screen bounds, so it's top right corner is at 0 x axis. I recommend to explore how we handle this case in the platform.
re screenshots: interestingly enough, your screenshots have a margin for a gmail, that's why it's possible. I assume we can clip the handle as well, but it won't help to solve the
04...@mail.ru <04...@mail.ru> #7
got it thanks.
04...@mail.ru <04...@mail.ru> #8
I don't know how much start padding Gmail uses but I tried 15.dp in my Compose example and it still does not help.
jo...@google.com <jo...@google.com> #9
And while I'm here, looking at the Gmail vs Compose screenshot I'm reminded that I could really make use of a "Select all" feature in Compose :).
04...@mail.ru <04...@mail.ru> #10
The way how Android and Chrome can select the first word is by word-based selection when dragging the left handle into the first word's visual range.
jo...@google.com <jo...@google.com> #11
I believe this might require something else other than char based word based selection. the dup ticket might be one way of doing it however it may not solve the issue based on the video in
I wonder if when selection handle approaches or touches the edge, it should actually horizontally transform, ( going from -> to <-, or from -> to |)
Therefore this might be a UX improvement and need UX input.
Qinginq, can you please describe how the dup ticket would help in this case?
04...@mail.ru <04...@mail.ru> #12
(actually looking at the video in
jo...@google.com <jo...@google.com>
04...@mail.ru <04...@mail.ru> #13
But when the first word is partially selected, then the selection became char-based anyway.
I think it may have something to do with dragging handle and handle's position is completely inside the screen (vs. partially inside).
The dragging gesture detector is attached to the handle (popup window), so it can't go to the left?
I could be wrong. But anyway the handle's position needs to be fixed too.
gl...@gmail.com <gl...@gmail.com> #15
Since this is a public bug, I will not mark it as duplicate.
04...@mail.ru <04...@mail.ru> #16
Just to make sure: the exact same behavior happens on android Text as well (handle disappearing completely). Is it correct?
Description
Jetpack Compose version:
Jetpack Compose component(s) used:
Android Studio Build: Build #AI-223.8836.35.2231.10671973, built on August 17, 2023
Kotlin version: 1.9.0
Code snippet to reproduce this issue:
Stack trace (if applicable):