p

    Photoxor

    1 year ago
    The behavior of
    Popup
    has changed in alpha11. Width is now limited to parent width. Is this intended?
    matvei

    matvei

    1 year ago
    cc @Louis Pullen-Freilich [G] as he might know more info
    l

    Louis Pullen-Freilich [G]

    1 year ago
    I'm not aware of any changes here, if you have a simple reproduction could you file a bug?
    Piotr Prus

    Piotr Prus

    1 year ago
    @Photoxor In my opinion, the width is limited to ~75% of screen width, even if child has midifier.fillMaxWidth(). In which version of compose the popup was full width? I want to compare the codebase and file an issue.
    Guys, I prepared an easy to check scenario:
    @Composable
    fun DropdownTest() {
    
        val (showMenu, setVisibility) = remember { mutableStateOf(true) }
        if (showMenu) {
            Popup(
                alignment = Alignment.TopCenter,
                isFocusable = true,
                onDismissRequest = { setVisibility(false) },
            ) {
                Column(
                    modifier = Modifier
                        .fillMaxWidth()
                        .background(Color.Gray)
                ) {
                    Text(text = "This should take the whole width, but it takes around 75-80%")
                    Text(text = "Is that intended?")
                }
            }
        }
    }
    Calling above code in
    setContent
    results in following:
    l

    Louis Pullen-Freilich [G]

    1 year ago
    Thanks! Would you mind filing a bug with this information?
    Was this not the case for before alpha11?
    Piotr Prus

    Piotr Prus

    1 year ago
    I have checked alpha 8 and 9. I will check few more and report an issue