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

Order of interop components in Scaffold doesn't match the paint order #4485

Open
brewin opened this issue Mar 14, 2024 · 4 comments · May be fixed by JetBrains/compose-multiplatform-core#1340
Assignees
Labels
bug Something isn't working p:high High priority reproduced uikit interop

Comments

@brewin
Copy link

brewin commented Mar 14, 2024

Describe the bug
Using 1.6.10-dev1514, a UIView in a Scaffold's topBar or bottomBar is invisible when the Scaffold's content is a UIView and the bar overlaps the content.

Affected platforms

  • iOS

Versions

  • Kotlin version*: 1.9.22
  • Compose Multiplatform version*: 1.6.10-dev1514
  • OS version(s)* (required for Desktop and iOS issues): iOS 17.4
  • OS architecture (x86 or arm64): arm64
  • Device (model or simulator for iOS issues): All

To Reproduce
Run iosApp: https://github.com/brewin/cmp-bug

See: https://github.com/brewin/cmp-bug/blob/main/shared/src/iosMain/kotlin/main.ios.kt

Additional context
This is a Material3 Scaffold. I don't know if the problem also affects Material2 Scaffold (@mazunin-v-jb: material2 scaffold is not affected) or other Composables. The same layout works when using a Box instead of a Scaffold.

@brewin brewin added bug Something isn't working submitted labels Mar 14, 2024
@eymar
Copy link
Collaborator

eymar commented Mar 15, 2024

Reproduced using 1.6.0, 1.6.1 and 1.6.10-dev
Works correctly with 1.5.12

@igordmn igordmn added the p:high High priority label Mar 15, 2024
@mazunin-v-jb mazunin-v-jb self-assigned this Mar 25, 2024
@OsmanMusse
Copy link

@igordmn @mazunin-v-jb I've got the same issue as @brewin ,Any way of solving this issue with the scaffold not showing the SwiftUi elements

@elijah-semyonov
Copy link
Contributor

elijah-semyonov commented Apr 17, 2024

The order of interop views (desktop ones too) rely on order of traversing the Modifier nodes.
The fix to that would include a change in common, we first need to discuss it with Google first.

@elijah-semyonov elijah-semyonov changed the title UIView in Scaffold bar is invisible when overlapping another UIView in content Order of interop components in Scaffold doesn't match the paint order Apr 17, 2024
@MatkovIvan
Copy link
Member

I've removed the "regression" label because before JetBrains/compose-multiplatform-core#1145 (1.6.10) the order of interop was actually in "undefined" state and doesn't respect drawing order at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p:high High priority reproduced uikit interop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants