Skip to content

feature/cp-10601-make-banner-non-blocking#375

Open
cpandya25 wants to merge 2 commits into
masterfrom
feature/cp-10601-make-banner-non-blocking
Open

feature/cp-10601-make-banner-non-blocking#375
cpandya25 wants to merge 2 commits into
masterfrom
feature/cp-10601-make-banner-non-blocking

Conversation

@cpandya25
Copy link
Copy Markdown
Contributor

@cpandya25 cpandya25 commented May 7, 2026

implemented functionality of allow users to interact with app while in-app banner is visible.


Summary by cubic

Allows in-app banners to be non-blocking so users can keep using the app while a banner is visible. Default stays modal; opt in via a new API. Addresses CP-10601.

  • New Features
    • Added +[CleverPush setAppBannersNonBlocking:] (also on CleverPushInstance and CPAppBannerModule) to switch to a pass-through overlay.
    • Non-blocking mode embeds CPAppBannerViewController as a child and uses CPAppBannerPassthroughView to forward touches outside the banner while keeping the close button active.
    • Unified dismissal via windowDismissBlock; when a banner action opens Safari and dismisses, we dismiss first, then open the link. Modal flow is unchanged.

Written for commit 05595c1. Summary will update on new commits.

implemented functionality of allow users to interact with app while in-app banner is visible.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 14 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="CleverPush/Source/CPAppBannerPassthroughView.m">

<violation number="1" location="CleverPush/Source/CPAppBannerPassthroughView.m:16">
P1: HTML banners can still block app interaction because all touches inside the full-screen WKWebView are treated as banner touches.</violation>
</file>

<file name="CleverPush/Source/CPAppBannerModuleInstance.m">

<violation number="1" location="CleverPush/Source/CPAppBannerModuleInstance.m:1704">
P2: Avoid capturing `appBannerViewController` strongly inside its own `windowDismissBlock`; this creates a retain cycle and can leak dismissed banner controllers.</violation>
</file>

<file name="CleverPush/Source/CPBannerCardContainer.m">

<violation number="1" location="CleverPush/Source/CPBannerCardContainer.m:592">
P1: Forwarding dismiss to `self.controller onDismiss` causes duplicate `showNextActivePendingBanner` calls in dismiss flows, which can lead to duplicate/unstable pending-banner presentation.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread CleverPush/Source/CPAppBannerPassthroughView.m
Comment thread CleverPush/Source/CPBannerCardContainer.m
Comment thread CleverPush/Source/CPAppBannerModuleInstance.m
implemented functionality of allow users to interact with app while in-app banner is visible.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="CleverPush/Source/CPAppBannerViewController.m">

<violation number="1" location="CleverPush/Source/CPAppBannerViewController.m:838">
P1: Handle JavaScript height-evaluation failures in non-blocking mode; returning early leaves the HTML web view full-screen and can make the “non-blocking” overlay block app interaction.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Comment thread CleverPush/Source/CPAppBannerViewController.m Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="CleverPush/Source/CPAppBannerViewController.m">

<violation number="1" location="CleverPush/Source/CPAppBannerViewController.m:858">
P2: Disabling `webView.userInteractionEnabled` on height-evaluation failure makes the HTML banner (including its close button) non-interactive, which can leave an undismissable banner visible.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Comment thread CleverPush/Source/CPAppBannerViewController.m Outdated
@cpandya25 cpandya25 force-pushed the feature/cp-10601-make-banner-non-blocking branch from 1a98754 to 05595c1 Compare May 7, 2026 10:21
@cpandya25 cpandya25 requested a review from snuricp May 7, 2026 10:23
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

Successfully merging this pull request may close these issues.

1 participant