Skip to content
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

Introduce WebDragAndDropManager #1725

Closed
wants to merge 10,000 commits into from
Closed

Conversation

Schahen
Copy link
Collaborator

@Schahen Schahen commented Dec 11, 2024

What is important to know about this particular PR:

  1. It does not covers dnd data - since it will be covered as a separate PR
  2. It's almost impossible to make reliable unit tests for testing drag and drop so a separate effort will be made to introduce integration tests (which, again, are not part of this particular PR)
  3. The DragAndDropExample will be redone and commonized completely in a separate PR

ChrisCraik and others added 30 commits September 11, 2024 15:16
Bug:355042464
Test: lockClocks.sh

Seeing frequent retry timeouts, and while this isn't the proper fix,
the max retry time is very low, so extending.

Change-Id: I00b45c57198de03ab396cdafa3d900ea023f3bb1
Bug: 181042665
Test: unit tests added
Change-Id: I4f3c23473a2ec643808fbab50253b760a296b35d
The goal of this PR is to take full control of the page which is used
for running web tests.

Apart from that main goal, the karma-related setup was simplified
Fixes [CMP-6660](https://youtrack.jetbrains.com/issue/CMP-6660)

## Testing
`GraphicsLayerTest`

## Release Notes
### Fixes - Multiple Platforms
- _(prerelease fix)_ Fix possible infinity invalidation loop triggered
by `GraphicsLayer.record`
Co-authored-by: Marcello Galhardo <mgalhardo@google.com>
Co-authored-by: Ivan Matkov <ivan.matkov@jetbrains.com>
Do not call text input service directly to stop input from the
`LegacyPlatformTextInputServiceAdapter`

Fixes
https://youtrack.jetbrains.com/issue/CMP-6643/iOS-The-keyboard-closes-while-scrolling-textfield-content-which-is-being-partially-overlapped-by-textfield

## Release Notes
Fix keyboard closing while scrolling content with Text Fields
Adds workaround for https://youtrack.jetbrains.com/issue/CMP-6607 since
a proper solution will be available only in 1.8

## Testing
Scroll interop example page

Before | After
---|---
![Simulator Screenshot - iPhone 15 - 2024-09-13 at 11 14
37](https://github.com/user-attachments/assets/2bb4928d-daf9-4ba9-9585-44cd4efddee8)
| ![Simulator Screenshot - iPhone 15 - 2024-09-13 at 13 01
17](https://github.com/user-attachments/assets/2754dcc8-eb67-4069-8a95-0d3931c6392c)

## Release Notes
### Fixes - iOS
- _(prerelease fix)_ Fix missing interop views with new `onReset`
argument and placing inside more complex reusable layout inside `Lazy*`
lists
…#1562)

Testing: `./gradlew :navigation:navigation-common:desktopTest`
Fixes
https://youtrack.jetbrains.com/issue/CMP-5864/Compose-UI-test-error-on-android-No-static-method-forceEnableAppTracing

Regression after
#1367

During redirection we added dependencies from `androidMain.dependencies`
to the Android target, which contains a lot of prerelease versions.
Also, we usually don't update `androidMain` during merges.

Instead of `androidMain` we should use `commonMain`. Pure `androidMain`
dependencies are added transitively from `androidx` redirection.

## Testing

1.
```
./gradlew :mpp:publishComposeJbToMavenLocal
```

`~/.m2/repository/org/jetbrains/compose/ui/ui-test/0.0.0-SNAPSHOT/ui-test-0.0.0-SNAPSHOT.module`,
search `monitor`. It doesn't exist anymore

2. Retest
#1328

This should be tested by QA.

## Release Notes
### Fixes - Multiplatform
- _(prerelease fix)_ Fix "Compose UI test error on android: No static
method forceEnableAppTracing"
- _(prerelease fix)_ Fix "Android target depends on prerelease versions"
Allow building versions "1.7.0-beta02+build454"

We used this commit for beta01, beta02 builds.
JetBrains/skiko@v0.8.12...v0.8.13

## Release Notes
### Fixes
- Fix bounds of ComposePanel in IntelliJ on macOs
Fixes the following error on iOS 18:
```
The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).
```

Related bug: https://youtrack.jetbrains.com/issue/CMP-6699
Update Jetpack Compose to 1.7.1
Copied from 966cdf5
Update Jetpack Compose Material3 Adaptive 1.0.0-rc01 -> 1.0.0
Copied from 4363555
Fixes https://youtrack.jetbrains.com/issue/CMP-6695

## Testing
Test case from the issue.
This should be tested by QA

## Release Notes
N/A (regression after #1555) wasn't released yet
# Conflicts:
#	docs-tip-of-tree/build.gradle
#	gradle.properties
#	gradle/libs.versions.toml
#	libraryversions.toml
#	lifecycle/lifecycle-runtime-testing/bcv/native/current.txt
#	lifecycle/lifecycle-runtime-testing/src/commonMain/kotlin/androidx/lifecycle/testing/TestLifecycleOwner.kt
#	lifecycle/lifecycle-runtime-testing/src/commonTest/kotlin/androidx/lifecycle/testing/LifecycleEventFlowTest.kt
#	lifecycle/lifecycle-runtime-testing/src/commonTest/kotlin/androidx/lifecycle/testing/LifecycleRegistryTest.kt
#	testutils/testutils-navigation/src/androidMain/kotlin/androidx/testutils/TestNavigator.android.kt
#	testutils/testutils-navigation/src/androidMain/kotlin/androidx/testutils/TestNavigatorDestinationBuilder.android.kt
#	testutils/testutils-navigation/src/commonTest/kotlin/androidx/testutils/TestNavigatorTest.kt
- ignore AOSP stub folders that do not exist in CMP
As @igordmn
[noticed](#1574 (comment))
it's better to use separate observer.

Current solution might cause
```
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: class androidx.compose.ui.graphics.layer.GraphicsLayer cannot be cast to class androidx.compose.ui.node.OwnerScope (androidx.compose.ui.graphics.layer.GraphicsLayer and androidx.compose.ui.node.OwnerScope are in unnamed module of loader 'app')
	at androidx.compose.ui.node.OwnerSnapshotObserver$clearInvalidObservations$1.invoke(OwnerSnapshotObserver.kt:137)
	at androidx.compose.ui.node.OwnerSnapshotObserver$clearInvalidObservations$1.invoke(OwnerSnapshotObserver.kt:137)
	at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.removeScopeIf(SnapshotStateObserver.kt:541)
	at androidx.compose.runtime.snapshots.SnapshotStateObserver.clearIf(SnapshotStateObserver.kt:307)
	at androidx.compose.ui.node.OwnerSnapshotObserver.clearInvalidObservations$ui(OwnerSnapshotObserver.kt:137)
	at androidx.compose.ui.node.RootNodeOwner.clearInvalidObservations(RootNodeOwner.skiko.kt:188)
	at androidx.compose.ui.node.RootNodeOwner.draw(RootNodeOwner.skiko.kt:228)
	at androidx.compose.ui.scene.CanvasLayersComposeSceneImpl.draw(CanvasLayersComposeScene.skiko.kt:250)
	at androidx.compose.ui.scene.BaseComposeScene.render(BaseComposeScene.skiko.kt:190)
	at androidx.compose.ui.scene.ComposeSceneMediator$onRender$1$1.invoke(ComposeSceneMediator.desktop.kt:574)
	at androidx.compose.ui.scene.ComposeSceneMediator$onRender$1$1.invoke(ComposeSceneMediator.desktop.kt:572)
	at androidx.compose.ui.viewinterop.SwingInteropContainer.postponingExecutingScheduledUpdates(SwingInteropContainer.desktop.kt:229)
	at androidx.compose.ui.scene.ComposeSceneMediator.onRender(ComposeSceneMediator.desktop.kt:572)
	at org.jetbrains.skiko.SkiaLayer.update$skiko(SkiaLayer.awt.kt:533)
	at org.jetbrains.skiko.redrawer.AWTRedrawer.update(AWTRedrawer.kt:54)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invokeSuspend(MetalRedrawer.kt:83)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invoke(MetalRedrawer.kt)
	at org.jetbrains.skiko.redrawer.MetalRedrawer$frameDispatcher$1.invoke(MetalRedrawer.kt)
	at org.jetbrains.skiko.FrameDispatcher$job$1.invokeSuspend(FrameDispatcher.kt:33)
```

Fixes https://youtrack.jetbrains.com/issue/CMP-6705

## Testing
No local reproduction 😢 , just report from @chrisbanes 
This should be tested by QA
MatkovIvan and others added 27 commits December 9, 2024 14:08
…1711)

It redirects an android artifact to "material.version=1.8.0-alpha03"
version
Test: No new tests needed
Change-Id: I24b8230b61fa7b9abaad9920bc6eb3c95142c85b
… press/release/scroll.

This behavior is specific to Android, and should thus be optional.

Test: No additional tests needed; the change is in the tests in CMP.
Change-Id: Idf7982d744a810b7392175b93f75d6e59c94cfc7
Add code that joins several frequent text edit commands into a single
commands batch.

Fixes
https://youtrack.jetbrains.com/issue/CMP-6786/when-use-Chinese-keyboard-inputs-get-interrupted.

## Release Notes
### Fixes - iOS
- Fixes an interruption while typing characters on a Chinese keyboard
Accessibility engine should respect layers order as well as should hide
the content under focusable layers.
Implement accessibility tests based on instrumented tests.

Fixes
https://youtrack.jetbrains.com/issue/CMP-7163/Focusable-layers-should-obscure-content-for-accessibility-reader

## Testing
Popups and dialogs should behave the same as they do on Android.

## Release Notes
### Fixes - iOS
- Accessibility reading of content when obscured by layers such as
pop-ups and dialogs.
Actual code changes were in #1715

Additional change: move our fork's addings in `libraryversions.toml` to
the end to minimize merge conflicts
…1714)

Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
…commit (#1721)

Fixes
https://youtrack.jetbrains.com/issue/CMP-7226/copyAnnotation.sh.-to-integration-branch-is-created-from-a-wrong-commit

We took the base commit between the current and `origin/integration`.
But it can be old. Instead, we should take just the current commit,
because we copied it, not the base one.

## Testing
Rerun `copyAnnotation.sh` from eecb9af
(The green commit in the issue)
)

Because we don't use/override material3 version, we align it with
COMPOSE.

The last dev was built with 9999.0.0:


![image](https://github.com/user-attachments/assets/07966757-d011-4a1f-b571-b12a1536965f)
- It has its own versioning
- we don't pass its version from CI (we should add it in `Library.kt`)
- because of this 9999.0.0-SNAPSHOT is published:

![image](https://github.com/user-attachments/assets/95392d97-65f3-4744-a16b-06e613c7aa10)
(already removed from `dev` manually)
Add accessibility demos from Android App to common demos
@Schahen Schahen requested review from MatkovIvan and eymar December 11, 2024 13:48
@Schahen Schahen closed this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.