Skip to content

Add paywall-tester web_view sample#3724

Draft
AlvaroBrey wants to merge 13 commits into
alexrepty/paywalls-web-view-messagingfrom
alvaro/paywall-tester-web-view-sample
Draft

Add paywall-tester web_view sample#3724
AlvaroBrey wants to merge 13 commits into
alexrepty/paywalls-web-view-messagingfrom
alvaro/paywall-tester-web-view-sample

Conversation

@AlvaroBrey

Copy link
Copy Markdown
Contributor

WIP

@AlvaroBrey AlvaroBrey self-assigned this Jul 6, 2026
@AlvaroBrey AlvaroBrey force-pushed the alexrepty/paywalls-web-view-messaging branch from c93bab1 to 7aa8626 Compare July 6, 2026 15:48
@AlvaroBrey AlvaroBrey force-pushed the alvaro/paywall-tester-web-view-sample branch from 08f1895 to d19eb4a Compare July 6, 2026 15:49
alexrepty and others added 10 commits July 7, 2026 15:06
Introduces the Paywalls V2 `web_view` component (`WebViewComponent`) and registers it in the `PaywallComponent` sealed hierarchy / serializer. Adds the minimal cross-module `when` branches required for the project to compile now that the sealed type has a new member (StyleFactory returns no style yet; image pre-download and unsupported-condition checks treat it as a leaf / traverse its fallback).

No rendering, CSP, messaging, or pre-warming yet — those land in later PRs in the stack.

Recommended labels: pr:other
Adds the Compose rendering path for the Paywalls V2 `web_view` component: a `WebView`-backed `WebViewComponentView`, the `WebViewComponentStyle`, the `StyleFactory` mapping, `ComponentView` dispatch, and `WebViewUrlResolver` (template resolution + HTTPS/host validation). When the URL is missing or invalid the component renders its fallback stack.

No CSP, messaging, or pre-warming yet.

Recommended labels: pr:other, pr:RevenueCatUI, feat:Paywalls_V2
When a `web_view` declares a `protocol_version`, the renderer injects a fixed Content-Security-Policy meta tag at document start to isolate the content from external sources: only same-origin images/scripts/fonts are allowed, `data:` references for images/fonts are blocked, and XHR/fetch/WebSocket are disallowed (`connect-src 'none'`). Geolocation is disabled. The bundle must be fully self-contained.

Recommended labels: pr:other, pr:RevenueCatUI, feat:Paywalls_V2
Adds a bidirectional JS<->native bridge for the Paywalls V2 `web_view` component: a document-start `window.RevenueCatWebView` shim, message parsing/validation (`WebViewMessageParser`, `WebViewMessageType`), the public `PaywallWebViewMessage` / `PaywallWebViewValue` / `PaywallWebViewMessageHandler` / `PaywallWebViewController` surface, and an SDK-managed variables provider (locale, color scheme, custom variables). Apps opt in via `PaywallOptions.setWebViewMessageHandler(...)`, threaded through `PaywallState` / `OfferingToStateMapper`.

Regenerates ui/revenuecatui/api.txt for the new public API.

Recommended labels: pr:feat, pr:RevenueCatUI, feat:Paywalls_V2
Adds a bidirectional JS<->native bridge for the Paywalls V2 `web_view` component: a document-start `window.RevenueCatWebView` shim, message parsing/validation (`WebViewMessageParser`, `WebViewMessageType`), the public `PaywallWebViewMessage` / `PaywallWebViewValue` / `PaywallWebViewMessageHandler` / `PaywallWebViewController` surface, and an SDK-managed variables provider (locale, color scheme, custom variables). Apps opt in via `PaywallOptions.setWebViewMessageHandler(...)`, threaded through `PaywallState` / `OfferingToStateMapper`.

Regenerates ui/revenuecatui/api.txt for the new public API.

Recommended labels: pr:feat, pr:RevenueCatUI, feat:Paywalls_V2
Adds a bidirectional JS<->native bridge for the Paywalls V2 `web_view` component: a document-start `window.RevenueCatWebView` shim, message parsing/validation (`WebViewMessageParser`, `WebViewMessageType`), the public `PaywallWebViewMessage` / `PaywallWebViewValue` / `PaywallWebViewMessageHandler` / `PaywallWebViewController` surface, and an SDK-managed variables provider (locale, color scheme, custom variables). Apps opt in via `PaywallOptions.setWebViewMessageHandler(...)`, threaded through `PaywallState` / `OfferingToStateMapper`.

Regenerates ui/revenuecatui/api.txt for the new public API.

Recommended labels: pr:feat, pr:RevenueCatUI, feat:Paywalls_V2
Adds a bidirectional JS<->native bridge for the Paywalls V2 `web_view` component: a document-start `window.RevenueCatWebView` shim, message parsing/validation (`WebViewMessageParser`, `WebViewMessageType`), the public `PaywallWebViewMessage` / `PaywallWebViewValue` / `PaywallWebViewMessageHandler` / `PaywallWebViewController` surface, and an SDK-managed variables provider (locale, color scheme, custom variables). Apps opt in via `PaywallOptions.setWebViewMessageHandler(...)`, threaded through `PaywallState` / `OfferingToStateMapper`.

Regenerates ui/revenuecatui/api.txt for the new public API.

Recommended labels: pr:feat, pr:RevenueCatUI, feat:Paywalls_V2
@AlvaroBrey AlvaroBrey force-pushed the alexrepty/paywalls-web-view-messaging branch from 5470ac8 to 38a6f6f Compare July 7, 2026 13:53
@AlvaroBrey AlvaroBrey force-pushed the alvaro/paywall-tester-web-view-sample branch from e4a5781 to d53c047 Compare July 7, 2026 13:53
@AlvaroBrey AlvaroBrey force-pushed the alvaro/paywall-tester-web-view-sample branch from d53c047 to 683c41d Compare July 7, 2026 14:03
@AlvaroBrey AlvaroBrey force-pushed the alexrepty/paywalls-web-view-messaging branch from 38a6f6f to d101582 Compare July 7, 2026 14:35
@AlvaroBrey AlvaroBrey force-pushed the alvaro/paywall-tester-web-view-sample branch from 683c41d to 9891f16 Compare July 7, 2026 14:35
@JZDesign JZDesign force-pushed the alexrepty/paywalls-web-view-messaging branch 2 times, most recently from 3cbac3d to 526f83d Compare July 10, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants