compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

[Cfw] Layout doesn't start at the top when in mobile portrait mode

Open luludevmuniz opened this issue 1 year ago • 4 comments

Describe the bug Some part of the layout is hidden when accessing the wasm generated website in a smartphone in portrait mode. Some elements goes outside the root composable bounds. (can be seen in https://luludevmuniz.github.io/po11nt-website-dev/)

Affected platforms

  • Web (K/Wasm) - Canvas based API

Versions

  • Kotlin version*: 2.0.0-RC1
  • Compose Multiplatform version*: 1.6.10-beta02
  • OS version(s)* (required for Desktop and iOS issues): Android, iOS
  • Device (model or simulator for iOS issues): Samsung Galaxy M54, iPhone SE 3rd

To Reproduce Steps and/or the code snippet to reproduce the behavior:

@Composable
fun TwoBoxes() {
    Column(modifier = Modifier.fillMaxSize().padding(24.dp)) {
        Box(
            modifier = Modifier.weight(0.5f)
                .fillMaxSize()
                .border(
                    width = 1.dp,
                    color = MaterialTheme.colorScheme.outline
                )
        )
        Box(
            modifier = Modifier.weight(0.5f)
                .fillMaxSize()
                .border(
                    width = 1.dp,
                    color = MaterialTheme.colorScheme.outline
                )
        )
    }
}

Expected behavior Layout starting at the top of the window.

Screenshots IMG-20240425-WA0001 IMG-20240425-WA0000 Captura de Tela 2024-04-25 às 15 40 03

Additional context The issue does not occur when the smartphone is rotated in landscape mode.

luludevmuniz avatar Apr 25 '24 18:04 luludevmuniz

Additional info: seems like the touch target does not match the composable location, you have to touch a bit down where it is showing.

luludevmuniz avatar Apr 25 '24 19:04 luludevmuniz

the link you provided (https://luludevmuniz.github.io/Po11nt-site/) is 404. Could you please check that link is correct?

eymar avatar Apr 29 '24 15:04 eymar

@luludevmuniz can you please check agains the recently released 1.6.10-beta02 prelease version?

Schahen avatar Apr 29 '24 15:04 Schahen

@eymar I'm sorry. I have created two website, one with the issue and the other with a fix.

NOT FIXED: https://luludevmuniz.github.io/po11nt-website-dev/ FIXED: https://luludevmuniz.github.io/po11nt-website/

In the fixed version I just added <meta name="viewport" content="width=device-width, initial-scale=1.0">, that I saw here, that I believe be the same issue as tracked here.

@shabunc Tested against 1.6.10-beta02, issue exists in the website and the TwoBoxes composable.

luludevmuniz avatar Apr 29 '24 16:04 luludevmuniz

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

okushnikov avatar Aug 26 '24 13:08 okushnikov