Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
Related ticket:
da...@google.com <da...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c0fd11cab1b083d043dfd54c8431c4068aeef09a
Author: Matvei Malkov <malkov@google.com>
Date: Wed Nov 04 17:35:35 2020
Add Modifier.focusable
This CL adds Modifier.focusable, which is intended to be a primary way to add focusability to the app (without clicks or with custom clicks), since it contains proper a11y and InteractionState support
Change-Id: I41eb9d67669e19f8a7c20804c836a8c6dc0b5526
RelNote: "Modifier.focusable has need added in foundation. Use this to add focusable behavior to a component, with correct semantics and accessibility."
Bug: 152525426
Bug: 162865824
Bug: 163423216
Test: added
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/FoundationDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/HighLevelGesturesDemo.kt
A compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/FocusableSample.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollableSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ZoomableSample.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/FocusableTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Focusable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Interaction.kt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Assertions.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Filters.kt
https://android-review.googlesource.com/1487281
Branch: androidx-master-dev
commit c0fd11cab1b083d043dfd54c8431c4068aeef09a
Author: Matvei Malkov <malkov@google.com>
Date: Wed Nov 04 17:35:35 2020
Add Modifier.focusable
This CL adds Modifier.focusable, which is intended to be a primary way to add focusability to the app (without clicks or with custom clicks), since it contains proper a11y and InteractionState support
Change-Id: I41eb9d67669e19f8a7c20804c836a8c6dc0b5526
RelNote: "Modifier.focusable has need added in foundation. Use this to add focusable behavior to a component, with correct semantics and accessibility."
Bug: 152525426
Bug: 162865824
Bug: 163423216
Test: added
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/FoundationDemos.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/HighLevelGesturesDemo.kt
A compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/FocusableSample.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ScrollableSamples.kt
M compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/ZoomableSample.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/FocusableTest.kt
A compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Focusable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Interaction.kt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Assertions.kt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Filters.kt
ap...@google.com <ap...@google.com> #4
focusable and hoverable have been added.
Filed separate bugs for 2d scroll (
da...@google.com <da...@google.com>
to...@gmail.com <to...@gmail.com> #5
Version used: 2.3.0-alpha03
Devices/Android versions reproduced on: oneplus 5t and Huawei honer8
E/TestRunner: java.lang.IllegalStateException: Migration failed. expected:TableInfo{name='messages_fts4', columns={message_id=Column{name='message_id', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='null'}, content=Column{name='content', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}}, foreignKeys=[], indices=[]} , found:TableInfo{name='messages_fts4', columns={message_id=Column{name='message_id', type='', affinity='1', notNull=false, primaryKeyPosition=0, defaultValue='null'}, content=Column{name='content', type='', affinity='1', notNull=false, primaryKeyPosition=0, defaultValue='null'}}, foreignKeys=[], indices=[]}
Database_Impl.java
_db.execSQL("CREATE VIRTUAL TABLE IF NOT EXISTS `messages_fts4` USING FTS4(`message_id` TEXT NOT NULL, `content` TEXT, tokenize=unicode61, notindexed=`message_id`)");
10.json
{
"ftsVersion": "FTS4",
"ftsOptions": {
"tokenizer": "unicode61",
"tokenizerArgs": [],
"contentTable": "",
"languageIdColumnName": "",
"matchInfo": "FTS4",
"notIndexedColumns": [
"message_id"
],
"prefixSizes": [],
"preferredOrder": "ASC"
},
"contentSyncTriggers": [],
"tableName": "messages_fts4",
"createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`message_id` TEXT NOT NULL, `content` TEXT, tokenize=unicode61, notindexed=`message_id`)",
"fields": [
{
"fieldPath": "messageId",
"columnName": "message_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
Maybe it's a same issue, I don't know the [found:TableInfo] come from.
Devices/Android versions reproduced on: oneplus 5t and Huawei honer8
E/TestRunner: java.lang.IllegalStateException: Migration failed. expected:TableInfo{name='messages_fts4', columns={message_id=Column{name='message_id', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='null'}, content=Column{name='content', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='null'}}, foreignKeys=[], indices=[]} , found:TableInfo{name='messages_fts4', columns={message_id=Column{name='message_id', type='', affinity='1', notNull=false, primaryKeyPosition=0, defaultValue='null'}, content=Column{name='content', type='', affinity='1', notNull=false, primaryKeyPosition=0, defaultValue='null'}}, foreignKeys=[], indices=[]}
Database_Impl.java
_db.execSQL("CREATE VIRTUAL TABLE IF NOT EXISTS `messages_fts4` USING FTS4(`message_id` TEXT NOT NULL, `content` TEXT, tokenize=unicode61, notindexed=`message_id`)");
10.json
{
"ftsVersion": "FTS4",
"ftsOptions": {
"tokenizer": "unicode61",
"tokenizerArgs": [],
"contentTable": "",
"languageIdColumnName": "",
"matchInfo": "FTS4",
"notIndexedColumns": [
"message_id"
],
"prefixSizes": [],
"preferredOrder": "ASC"
},
"contentSyncTriggers": [],
"tableName": "messages_fts4",
"createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`message_id` TEXT NOT NULL, `content` TEXT, tokenize=unicode61, notindexed=`message_id`)",
"fields": [
{
"fieldPath": "messageId",
"columnName": "message_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "content",
"columnName": "content",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
Maybe it's a same issue, I don't know the [found:TableInfo] come from.
Description
Version used: 2.2.2
Devices/Android versions reproduced on: Android emulator running API 28
I've included a sample project with a MigrationTest class that fails like so when invoking MigrationTestHelper:
java.lang.IllegalStateException: Migration didn't properly handle: user_fts
Expected: FtsTableInfo{name='user_fts', columns=[name, rowid], options=[]}
Found: FtsTableInfo{name='user_fts', columns=[name], options=[]}
Yet the AppDatabase_Impl sees the schema as being correct.
The root cause seems to be that they treat the implicit `rowid` column differently: the generated schema json file includes the `rowid` field causing MigrationTestHelper to expect its presence, but AppDatabase_Impl's onValidateSchema method doesn't check for rowid.
I believe AppDatabase_Impl has the correct behaviour in this case: MigrationTestHelper uses FtsTableInfo which uses `PRAGMA table_info()` to discover the columns of the fts table, which *doesn't* return `rowid` as being one of the columns, but MigrationTestHelper is comparing that FtsTableInfo with the json data which *does* include `rowid`, so it thinks the schema doesn't match.