Status Update
Comments
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
ma...@google.com <ma...@google.com> #3
si...@google.com <si...@google.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
ex...@gmail.com <ex...@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).
ma...@google.com <ma...@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
si...@google.com <si...@google.com> #7
got it thanks.
ex...@gmail.com <ex...@gmail.com> #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.
ex...@gmail.com <ex...@gmail.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 :).
si...@google.com <si...@google.com>
qq...@google.com <qq...@google.com> #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.
si...@google.com <si...@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?
si...@google.com <si...@google.com> #12
(actually looking at the video in
qq...@google.com <qq...@google.com> #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.
qq...@google.com <qq...@google.com> #15
Since this is a public bug, I will not mark it as duplicate.
si...@google.com <si...@google.com> #16
Just to make sure: the exact same behavior happens on android Text as well (handle disappearing completely). Is it correct?
qq...@google.com <qq...@google.com> #17
The attachment shows the selection in a single TextView without padding. The left selection handle disappears completely when the first word is selected.
si...@google.com <si...@google.com> #18
Thank you very much Qingqing.
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit c3953106eb37da7dbeff1ae7ca8d9f92223061df
Author: Qingqing Deng <qqd@google.com>
Date: Mon Apr 26 12:46:12 2021
[Text Selection] Clip Selection Handle
Bug:185942455
Bug:183408447
Test: ./gradlew test
RelNote: Clip Selection Handle
Change-Id: Iff80d27fbac0e4de5e3e99fac4352cd6ef2cd201
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text/selection/AndroidSelectionHandles.android.kt
M compose/ui/ui/api/public_plus_experimental_1.0.0-beta06.txt
M compose/ui/ui/api/public_plus_experimental_1.0.0-beta07.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/window/AndroidPopup.android.kt
qq...@google.com <qq...@google.com>
ex...@gmail.com <ex...@gmail.com> #20
I retried the original example (as described in
As a slight variation of the problem, modify the example to replace line 1 ("This text is selectable") with one long word (I actually tried a number, "1234567890123456789") and 1) select it (that works) 2) drag the left handle right and release it somewhere within the number 3) try to drag left again and select the whole number (very hard to do). (If you don't release before dragging left it works.)
This issue shows up in my real app as well (I don't have zero padding, but I guess not "enough").
ex...@gmail.com <ex...@gmail.com> #21
I still see this issue on beta09. I suppose I will have to file a new issue since this one is 'Fixed (Verified)'?
ex...@gmail.com <ex...@gmail.com> #22
The behavior I described in
cl...@google.com <cl...@google.com>
ha...@google.com <ha...@google.com>
ha...@google.com <ha...@google.com> #23
I've checked the framework TextView
behavior and noticed a different handle drag behavior from Compose selection:
So in TextView
when the left handle is at the word bound, dragging it left will extend the handle to the previous word boundary. Check the screen record attached. And this feature is helping user to selection the text at left boundary.
ha...@google.com <ha...@google.com> #24
Also checked that Chrome has similar behavior. Now working on implement a similar behavior in Compose SelectionContainer
.
ha...@google.com <ha...@google.com> #25
The remaining work is more related to
Description
Jetpack Compose Beta02, AS Canary 10
Using
SelectionContainer
without start padding, you can't select a word midsentence and drag the text selection handle left to include the first word -- unless you have sufficient start padding.To reproduce:
PartiallySelectableText()
fromIf you include
Column (modifier = Modifier.padding(start = 25.dp))
, it works as expected.