From 7dfa3c8a13c54be228c48d008efc483e1e40f611 Mon Sep 17 00:00:00 2001 From: Fadi George Date: Thu, 29 Oct 2026 11:26:48 -0700 Subject: [PATCH 1/2] chore: [SDK-5634] add extra IAM type buttons to demo app Co-Authored-By: Claude Opus 5.5 --- examples/demo/App/Models/AppModels.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/demo/App/Models/AppModels.swift b/examples/demo/App/Models/AppModels.swift index d98591df0..cac668a05 100644 --- a/examples/demo/App/Models/AppModels.swift +++ b/examples/demo/App/Models/AppModels.swift @@ -56,6 +56,10 @@ enum InAppMessageType: String, CaseIterable, Identifiable { case bottomBanner = "Bottom Banner" case centerModal = "Center Modal" case fullScreen = "Full Screen" + case fullBleed = "Full Screen (No Margin)" + case carousel = "Carousel" + case carouselBleed = "Carousel (No Margin)" + case html = "HTML" var id: String { rawValue } @@ -66,6 +70,10 @@ enum InAppMessageType: String, CaseIterable, Identifiable { case .bottomBanner: return "bottom_banner" case .centerModal: return "center_modal" case .fullScreen: return "full_screen" + case .fullBleed: return "full_bleed" + case .carousel: return "carousel" + case .carouselBleed: return "carousel_bleed" + case .html: return "html" } } } From bac660e99ff3549f52682cfebdf046cf94d8e45c Mon Sep 17 00:00:00 2001 From: Fadi George Date: Thu, 29 Oct 2026 14:57:32 -0700 Subject: [PATCH 2/2] chore: [SDK-5634] show IAM buttons in a 2-column grid with shorter labels Co-Authored-By: Claude Opus 5.5 --- examples/demo/App/Models/AppModels.swift | 16 ++++++++-------- .../App/Views/Components/ActionButton.swift | 2 ++ .../App/Views/Sections/SendIamSection.swift | 19 +++++++++++++------ 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/examples/demo/App/Models/AppModels.swift b/examples/demo/App/Models/AppModels.swift index cac668a05..970fe27e0 100644 --- a/examples/demo/App/Models/AppModels.swift +++ b/examples/demo/App/Models/AppModels.swift @@ -52,14 +52,14 @@ enum NotificationType: String, CaseIterable, Identifiable { /// Sample in-app message layouts triggered by the iam_type trigger enum InAppMessageType: String, CaseIterable, Identifiable { - case topBanner = "Top Banner" - case bottomBanner = "Bottom Banner" - case centerModal = "Center Modal" - case fullScreen = "Full Screen" - case fullBleed = "Full Screen (No Margin)" - case carousel = "Carousel" - case carouselBleed = "Carousel (No Margin)" + case topBanner = "Top" + case bottomBanner = "Bottom" + case centerModal = "Center" case html = "HTML" + case fullScreen = "Full" + case fullBleed = "Full Bleed" + case carousel = "Carousel" + case carouselBleed = "Carousel Bleed" var id: String { rawValue } @@ -69,11 +69,11 @@ enum InAppMessageType: String, CaseIterable, Identifiable { case .topBanner: return "top_banner" case .bottomBanner: return "bottom_banner" case .centerModal: return "center_modal" + case .html: return "html" case .fullScreen: return "full_screen" case .fullBleed: return "full_bleed" case .carousel: return "carousel" case .carouselBleed: return "carousel_bleed" - case .html: return "html" } } } diff --git a/examples/demo/App/Views/Components/ActionButton.swift b/examples/demo/App/Views/Components/ActionButton.swift index a5a301642..ca596bb0b 100644 --- a/examples/demo/App/Views/Components/ActionButton.swift +++ b/examples/demo/App/Views/Components/ActionButton.swift @@ -72,7 +72,9 @@ struct ActionButton: View { Text(title) .font(OS.Font.bodyMedium.weight(.semibold)) .lineLimit(1) + .minimumScaleFactor(0.7) } + .padding(.horizontal, 8) .frame(maxWidth: .infinity) .frame(height: OS.Layout.buttonHeight) .foregroundColor(foregroundColor) diff --git a/examples/demo/App/Views/Sections/SendIamSection.swift b/examples/demo/App/Views/Sections/SendIamSection.swift index 9fd851a6e..79a9c586c 100644 --- a/examples/demo/App/Views/Sections/SendIamSection.swift +++ b/examples/demo/App/Views/Sections/SendIamSection.swift @@ -31,18 +31,25 @@ import SwiftUI struct SendIamSection: View { @EnvironmentObject var viewModel: OneSignalViewModel + private let columns = Array( + repeating: GridItem(.flexible(), spacing: OS.Spacing.cardGap), + count: 2 + ) + var body: some View { SectionCard( title: "SEND IN-APP MESSAGE", sectionKey: "send_iam", onInfoTap: { viewModel.showTooltip(for: "sendInAppMessage") } ) { - ForEach(InAppMessageType.allCases) { type in - ActionButton( - type.rawValue.uppercased(), - accessibilityID: "send_iam_\(type.triggerValue)_button" - ) { - viewModel.sendIamTrigger(type) + LazyVGrid(columns: columns, spacing: OS.Spacing.cardGap) { + ForEach(InAppMessageType.allCases) { type in + ActionButton( + type.rawValue.uppercased(), + accessibilityID: "send_iam_\(type.triggerValue)_button" + ) { + viewModel.sendIamTrigger(type) + } } } }