From 6bba2cde238947a88f553815bf5a881b61aa8c61 Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Sat, 28 Feb 2026 10:31:38 -0500 Subject: [PATCH 1/2] Declare PaddingValues and Dp types to squelch warnings --- Sources/SkipUI/SkipUI/Layout/Presentation.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/SkipUI/SkipUI/Layout/Presentation.swift b/Sources/SkipUI/SkipUI/Layout/Presentation.swift index 8934ddce..a3a2c151 100644 --- a/Sources/SkipUI/SkipUI/Layout/Presentation.swift +++ b/Sources/SkipUI/SkipUI/Layout/Presentation.swift @@ -81,14 +81,14 @@ import struct CoreGraphics.CGFloat let overlayPresentationCornerRadius = 16.0 // Material3 AlertDialog padding and spacing (match AlertDialog.kt). -private let AlertDialogPadding = PaddingValues(start: 24.dp, top: 24.dp, end: 24.dp, bottom: 24.dp) -private let AlertIconPadding = PaddingValues(start: 0.dp, top: 0.dp, end: 0.dp, bottom: 16.dp) -private let AlertTitlePadding = PaddingValues(start: 0.dp, top: 0.dp, end: 0.dp, bottom: 16.dp) -private let AlertTextPadding = PaddingValues(start: 0.dp, top: 0.dp, end: 0.dp, bottom: 24.dp) -private let ButtonsMainAxisSpacing = 8.dp -private let ButtonsCrossAxisSpacing = 12.dp -private let AlertDialogMinWidth = 280.dp -private let AlertDialogMaxWidth = 560.dp +private let AlertDialogPadding: PaddingValues = PaddingValues(start: 24.dp, top: 24.dp, end: 24.dp, bottom: 24.dp) +private let AlertIconPadding: PaddingValues = PaddingValues(start: 0.dp, top: 0.dp, end: 0.dp, bottom: 16.dp) +private let AlertTitlePadding: PaddingValues = PaddingValues(start: 0.dp, top: 0.dp, end: 0.dp, bottom: 16.dp) +private let AlertTextPadding: PaddingValues = PaddingValues(start: 0.dp, top: 0.dp, end: 0.dp, bottom: 24.dp) +private let ButtonsMainAxisSpacing: Dp = 8.dp +private let ButtonsCrossAxisSpacing: Dp = 12.dp +private let AlertDialogMinWidth: Dp = 280.dp +private let AlertDialogMaxWidth: Dp = 560.dp // SKIP INSERT: @OptIn(ExperimentalMaterial3Api::class) @Composable func SheetPresentation(isPresented: Binding, isFullScreen: Bool, context: ComposeContext, content: () -> any View, onDismiss: (() -> Void)?) { From f9c6a418aa2c4e9da1e963cec7929f7ad235d3b5 Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Sat, 28 Feb 2026 10:46:10 -0500 Subject: [PATCH 2/2] Add SKIP NOWARN to Presentation View extensions --- Sources/SkipUI/SkipUI/Layout/Presentation.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/SkipUI/SkipUI/Layout/Presentation.swift b/Sources/SkipUI/SkipUI/Layout/Presentation.swift index a3a2c151..2dc156ea 100644 --- a/Sources/SkipUI/SkipUI/Layout/Presentation.swift +++ b/Sources/SkipUI/SkipUI/Layout/Presentation.swift @@ -819,6 +819,9 @@ struct PresentationDetentPreferences: Equatable { } #endif + +// It is unfortunate that we have to NOWARN this entire extension just to prevent "This extension will be moved into its extended type definition when translated to Kotlin. It will not be able to access this file's private types or fileprivate members"; ideally, we would be able to squelch that specific warning, but leave on the possibility of warning about other potential issues with the code inside the extension (https://github.com/skiptools/skipstone/issues/198) +// SKIP NOWARN extension View { public func alert(_ titleKey: LocalizedStringKey, isPresented: Binding, @ViewBuilder actions: () -> any View) -> any View { return alert(Text(titleKey), isPresented: isPresented, actions: actions)