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

Closed
easyhooon opened this issue Apr 28, 2024 · 3 comments
Closed
Labels
compose Jetpack Compose Issue

Comments

@easyhooon
Copy link
Sponsor

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.

@skydoves
Copy link
Owner

Hey @easyhooon, sorry for the late response. Have you fixed this issue using your own solution?

@skydoves
Copy link
Owner

I will close this issue for now. If you still have any troubles from this issue, please reopen this!

@easyhooon
Copy link
Sponsor Author

easyhooon commented Aug 17, 2024

@skydoves Currently, I have disabled the use of balloon in this bottom sheet. Since the issues mentioned above do not occur within the other Screen, i'm only using it in the TopAppBar within the screen. If I use it again in the future(in bottomSheet), I will check to see if the problem still persists :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compose Jetpack Compose Issue
Projects
None yet
Development

No branches or pull requests

2 participants