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

ComposeScene/Owner refactor (Part 1) #891

Closed
wants to merge 6 commits into from

Conversation

MatkovIvan
Copy link
Member

@MatkovIvan MatkovIvan commented Oct 26, 2023

Proposed Changes

  • Rename SkiaBasedOwner to RootNodeOwner
  • Remove owners list from ComposeScene class
  • Add CombinedRootNodeOwner to allow adding multiple root nodes to the same canvas/ComposeScene
  • ComposeSceneAccessible now uses the new accessibilityControllers owner property

Testing

Test: CI should pass, everything should work as before

@MatkovIvan MatkovIvan changed the base branch from jb-main to ivan.matkov/test-owner-registry November 9, 2023 13:02
@MatkovIvan MatkovIvan marked this pull request as ready for review November 9, 2023 13:16
@MatkovIvan MatkovIvan force-pushed the ivan.matkov/owner-refactor-1 branch 2 times, most recently from 826e13b to fa9f68a Compare November 10, 2023 08:44
@MatkovIvan MatkovIvan marked this pull request as draft November 10, 2023 08:50
@MatkovIvan MatkovIvan marked this pull request as ready for review November 10, 2023 10:43
Base automatically changed from ivan.matkov/test-owner-registry to jb-main November 10, 2023 14:41
MatkovIvan added a commit that referenced this pull request Nov 10, 2023
## Proposed Changes

It's a part of #891

- Add callbacks to `SkiaRootForTest` to collect references in
`ComposeRootRegistry` (original Google's approach like in the Android
source set)
- Remove "child" scenes introduced in #697. Currently it's handled in
`ComposeRootRegistry` (tests-only)
- Deprecate `ComposeScene.roots` that was never intended to be public
- Address TODO in `isInScreenBounds()`: `contentSize` instead of
`containerSize` where used

## Testing

Test: CI should pass, everything should work as before
@MatkovIvan MatkovIvan closed this Nov 13, 2023
@MatkovIvan MatkovIvan deleted the ivan.matkov/owner-refactor-1 branch November 13, 2023 18:24
@MatkovIvan MatkovIvan mentioned this pull request Nov 21, 2023
MatkovIvan added a commit that referenced this pull request Nov 24, 2023
## Proposed Changes

It's the evolution of #891

Compose scene:
- Deprecate the existing API and introduce an internal interface instead
- Remove key listeners from `setContent`
- `constraints` -> `size`
- Add `lastKnownPointerPosition` to public interface 
- `CombinedComposeScene` as a compatible version of scene
- Remove recently added `semanticsOwner`
- `ComposeScene.Pointer` -> `ComposeScenePointer`

Other changes:
- Rename `SkiaBasedOwner` to `RootNodeOwner`. Also, it uses aggregation
instead of implementing a few interfaces.
- `SkikoComposeUiTest` overrides `PlatformContext.RootForTestListener`
now. It solves TODOs about `WindowInfo` in tests.
- `SkiaRootForTest` is renamed to `PlatformRootForTest`
- `onRootCreatedCallback`/`onRootDisposedCallback` is now part of
`PlatformContext`
- `PlatformRootForTest` exposes real `visibleBounds` instead of just
window size information.
- `PlatformRootForTest` exposes send pointer input methods instead of
`scene` reference.
- `InternalComposeUiApi` is opted in inside the same module.
- `Platform` -> `PlatfromContext`
- `dialogScrimBlendMode` -> `isWindowTransparent`
- `AccessibilityController`: Remove interface from `skikoMain` source
set
- `AccessibilityController`: `syncLoop` triggered right from
desktop-only part
- Replaced `Platform.accessibilityController(SemanticsOwner)` to
`semanticsOwnerListener`
- Fixes an invalid test case: out of screen Popup cannot receive input
now
- Removed unnecessary expect/actual `createSkiaLayer`
- Moves "Deprecated" `DefaultViewConfiguration` to test where there is a
single usage of it.

## API Changes

See `compose/ui/ui/api/desktop/ui.api` file

## Testing

Test: run existing tests.
mazunin-v-jb pushed a commit that referenced this pull request Dec 7, 2023
## Proposed Changes

It's a part of #891

- Add callbacks to `SkiaRootForTest` to collect references in
`ComposeRootRegistry` (original Google's approach like in the Android
source set)
- Remove "child" scenes introduced in #697. Currently it's handled in
`ComposeRootRegistry` (tests-only)
- Deprecate `ComposeScene.roots` that was never intended to be public
- Address TODO in `isInScreenBounds()`: `contentSize` instead of
`containerSize` where used

## Testing

Test: CI should pass, everything should work as before
mazunin-v-jb pushed a commit that referenced this pull request Dec 7, 2023
## Proposed Changes

It's the evolution of #891

Compose scene:
- Deprecate the existing API and introduce an internal interface instead
- Remove key listeners from `setContent`
- `constraints` -> `size`
- Add `lastKnownPointerPosition` to public interface 
- `CombinedComposeScene` as a compatible version of scene
- Remove recently added `semanticsOwner`
- `ComposeScene.Pointer` -> `ComposeScenePointer`

Other changes:
- Rename `SkiaBasedOwner` to `RootNodeOwner`. Also, it uses aggregation
instead of implementing a few interfaces.
- `SkikoComposeUiTest` overrides `PlatformContext.RootForTestListener`
now. It solves TODOs about `WindowInfo` in tests.
- `SkiaRootForTest` is renamed to `PlatformRootForTest`
- `onRootCreatedCallback`/`onRootDisposedCallback` is now part of
`PlatformContext`
- `PlatformRootForTest` exposes real `visibleBounds` instead of just
window size information.
- `PlatformRootForTest` exposes send pointer input methods instead of
`scene` reference.
- `InternalComposeUiApi` is opted in inside the same module.
- `Platform` -> `PlatfromContext`
- `dialogScrimBlendMode` -> `isWindowTransparent`
- `AccessibilityController`: Remove interface from `skikoMain` source
set
- `AccessibilityController`: `syncLoop` triggered right from
desktop-only part
- Replaced `Platform.accessibilityController(SemanticsOwner)` to
`semanticsOwnerListener`
- Fixes an invalid test case: out of screen Popup cannot receive input
now
- Removed unnecessary expect/actual `createSkiaLayer`
- Moves "Deprecated" `DefaultViewConfiguration` to test where there is a
single usage of it.

## API Changes

See `compose/ui/ui/api/desktop/ui.api` file

## Testing

Test: run existing tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant