Skip to content

MOB-6716 Add Web Integration example screen and documentation - #4

Open
sanjacurcic-taboola wants to merge 1 commit into
mainfrom
MOB-6716-add-web-integration-screen
Open

MOB-6716 Add Web Integration example screen and documentation#4
sanjacurcic-taboola wants to merge 1 commit into
mainfrom
MOB-6716-add-web-integration-screen

Conversation

@sanjacurcic-taboola

@sanjacurcic-taboola sanjacurcic-taboola commented Sep 11, 2026

Copy link
Copy Markdown

Summary

Adds a runnable Web Integration example to the RN 4.x sample app so publishers have a concrete reference for the mode where the Taboola plugin attaches its native↔JS bridge to a publisher-owned react-native-webview (as opposed to the SDK owning the WebView, as in Classic mode). The new screen mirrors the three-step usage shown in the Confluence doc Web Integration (React Native Plugin 4.x):

  1. Taboola.getWebPage() — create a web page handle (and clean it up on unmount).
  2. Wrap the publisher WebView in <TBLWebviewWrapper>.
  3. Load the real content page only inside onWebviewRegistered — the iOS bridge is only visible to a page whose load starts after registration. The sample Taboola HTML page is extracted into src/screens/webIntegration/taboolaPageHtml.ts so the screen itself reads as SDK
    usage, not tag boilerplate. iOS-specific caveats (blank-first navigation, onMessage no-op fallback, decelerationRate scroll-feel opt-in) are inline where the code lives so future cleanup passes don't silently remove them.

⚠️ Before merging

Bump @taboola/react-native-plugin-4x from ^4.0.4^4.0.10 in package.json. The screen depends on TBLWebviewWrapper and Taboola.getWebPage, which are new in 4.0.10. A //TODO marker sits above the dep as a reminder.

Files

  • src/screens/WebIntegrationScreen.tsx — the demo screen
  • src/screens/webIntegration/taboolaPageHtml.ts — sample publisher HTML builder
  • src/navigation/AppNavigator.tsx — drawer entry
  • src/utils/constants.tsWEB_INTEGRATION screen name/title
  • README.md — Web Integration section + Confluence link
  • package.json — plugin TODO note

Test plan

  • Runs on Android (Samsung SM-A525F, RN 0.79.2) — both placements (Mid Article alternating-1x2-widget, Feed without video thumbs-feed-01) render, no red screens
  • Runs on iOS Simulator (iPhone 16 Pro, iOS 18.6) — same, blank-first navigation flow works

The screen mirrors the three-step usage from the Confluence doc (getWebPage -> wrap with TBLWebviewWrapper -> load the real content page inside onWebviewRegistered), keeps the iOS blank-first navigation comment inline so it survives future cleanup passes, and factors the sample Taboola HTML page into a separate builder so a publisher reading the screen sees SDK usage, not tag boilerplate.

README updated with a Web Integration section and links to the Confluence reference.

Screenshot_20260911_123544 Screenshot_20260911_123603

Give publishers a runnable reference for the Web Integration mode of
the React Native Plugin 4.x: the SDK attaches its native<->JS bridge
to a publisher-owned WebView instead of owning the WebView itself.

The screen mirrors the three-step usage from the Confluence doc
(getWebPage -> wrap with TBLWebviewWrapper -> load the real content
page inside onWebviewRegistered), keeps the iOS blank-first navigation
comment inline so it survives future cleanup passes, and factors the
sample Taboola HTML page into a separate builder so a publisher reading
the screen sees SDK usage, not tag boilerplate.

README updated with a Web Integration section and links to the
Confluence reference.
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