forked from androidx/androidx
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reproduce and reminder about iOS SelectionContainer bug (#867)
Made reproducer of a bug JetBrains/compose-multiplatform#3718 This bug should be fixed after merging newer version of androidx-main to jb-main branch. Added TODO comment to check and close related issues after that.
- Loading branch information
1 parent
23ad1fc
commit 8d1e0f0
Showing
6 changed files
with
84 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
compose/mpp/demo/src/commonMain/kotlin/androidx/compose/mpp/demo/bug/BugReproducers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2023 The Android Open Source Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package androidx.compose.mpp.demo.bug | ||
|
||
import androidx.compose.mpp.demo.Screen | ||
|
||
val BugReproducers = Screen.Selection( | ||
"Bug Reproducers", | ||
NoRecompositionInLazyGrid, | ||
RoundedCornerCrashOnJS, | ||
CodeViewerReproducer, | ||
SelectionContainerCrash, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...e/mpp/demo/src/commonMain/kotlin/androidx/compose/mpp/demo/bug/SelectionContainerCrash.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2023 The Android Open Source Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package androidx.compose.mpp.demo.bug | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.text.selection.SelectionContainer | ||
import androidx.compose.material.Text | ||
import androidx.compose.mpp.demo.Screen | ||
|
||
val SelectionContainerCrash = Screen.Example("SelectionContainerCrash") { | ||
//TODO: This bug is already fixed in latest androidx-main branch. | ||
// Related CL: https://android-review.googlesource.com/c/platform/frameworks/support/+/2616177/3/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionAdjustment.kt | ||
// Check and close this bug after merging androidx-main on jb-main branch. | ||
// https://youtrack.jetbrains.com/issue/COMPOSE-478/fix-iOS-SelectionContainer | ||
// https://github.com/JetBrains/compose-multiplatform/issues/3718 | ||
SelectionContainer { | ||
Column { | ||
Text("aaa") | ||
Text("") | ||
Text("bbb") | ||
} | ||
} | ||
} |