Skip to content

Alerts with long button titles are truncated on Android #135

@johnthuss

Description

@johnthuss

Alerts with long button titles are truncated on Android because they aren't changed to be in a VStack container.

Example code:

import SwiftUI

struct ContentView: View {
    @State private var showAlert = false
    var body: some View {
        VStack {
            Button("Show alert") {
                showAlert = !showAlert
            }
            .alert("Alert Title?", isPresented: $showAlert) {
                Button("Long destructive button text", role: .destructive) {
                }
                Button("Long cancel button text", role: .cancel) {
                }
            } message: {
                Text("Long message body for the alert which is displayed in skip")
            }
        }
    }
}

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    appearanceInconsistencies between the expected appearance of components in Jetpack Compose vs. SwiftUIhelp wantedExtra attention is neededlayoutSwiftUI/Jetpack Compose layout issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions