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

ArrowOrientation.BOTTOM and END not working in M3 ModalBottomSheet #627

Open
easyhooon opened this issue Apr 28, 2024 · 0 comments
Open

Comments

@easyhooon
Copy link

easyhooon commented Apr 28, 2024

  • Library Version [v1.6.4]
  • Affected Device(s)
    Samsung Galaxy zflip4 with Android 14 and Pixel5(emulator)

Describe the Bug:
When I use Ballon in M3 Modal BottomSheet
ArrowOrientation.BOTTOM is applied as ArrowOrientation.TOP
also, ArrowOrientation.END is applied as ArrowOrientation.START

Add a clear description about the problem.

        // setup Ballon
        val builder = rememberBalloonBuilder {
            setArrowSize(10)
            setArrowPosition(0.1f)
            setArrowOrientation(ArrowOrientation.BOTTOM) // <- ArrowOrientation Setup
            setWidth(BalloonSizeSpec.WRAP)
            setHeight(BalloonSizeSpec.WRAP)
            setPadding(9)
            setCornerRadius(8f)
            setBackgroundColor(Color(0xFFF5687E))
            setBalloonAnimation(BalloonAnimation.FADE)
            setDismissWhenClicked(true)
            setDismissWhenTouchOutside(false)
            setFocusable(false)
        }
        // ...other codes
                        Balloon(
                            builder = builder,
                            balloonContent = {
                                Text(
                                    modifier = Modifier
                                        .wrapContentWidth()
                                        .noRippleClickable {
                                            onFestivalUiAction(FestivalUiAction.OnTooltipClick)
                                        },
                                    text = stringResource(id = R.string.festival_search_onboarding_title),
                                    textAlign = TextAlign.Center,
                                    color = Color.White,
                                    style = Content5,
                                )
                            },
                        ) { balloonWindow ->
                            LaunchedEffect(key1 = Unit) {
                                scope.launch {
                                    delay(500L)
                                    balloonWindow.awaitAlignEnd()
                                }
                            }
                        }

result)
ArrowOrientation.BOTTOM is applied liked this(like ArrowOrientation.TOP)
image

ArrowOrientation.END is applied liked this(like ArrowOrientation.START)
image

ArrowOrientation.TOP and START is works normally as I intended.

Other Composable liked Screen in M3 Scaffold works normally as I inteded

full code is here.
https://github.com/Project-Unifest/unifest-android/blob/develop/core/ui/src/main/kotlin/com/unifest/android/core/ui/component/FestivalBottomSheet.kt

Expected Behavior:
ArrowOrientation.BOTTOM and END should be expressed as Orientation is set.

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

No branches or pull requests

1 participant