feature/cp-10601-make-banner-non-blocking#375
Open
cpandya25 wants to merge 2 commits into
Open
Conversation
implemented functionality of allow users to interact with app while in-app banner is visible.
There was a problem hiding this comment.
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.
implemented functionality of allow users to interact with app while in-app banner is visible.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
1a98754 to
05595c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
+[CleverPush setAppBannersNonBlocking:](also onCleverPushInstanceandCPAppBannerModule) to switch to a pass-through overlay.CPAppBannerViewControlleras a child and usesCPAppBannerPassthroughViewto forward touches outside the banner while keeping the close button active.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.