MOB-6716 Add Web Integration example screen and documentation - #4
Open
sanjacurcic-taboola wants to merge 1 commit into
Open
MOB-6716 Add Web Integration example screen and documentation#4sanjacurcic-taboola wants to merge 1 commit into
sanjacurcic-taboola wants to merge 1 commit into
Conversation
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.
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.
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):Taboola.getWebPage()— create a web page handle (and clean it up on unmount).<TBLWebviewWrapper>.onWebviewRegistered— the iOS bridge is only visible to a page whose load starts after registration. The sample Taboola HTML page is extracted intosrc/screens/webIntegration/taboolaPageHtml.tsso the screen itself reads as SDKusage, not tag boilerplate. iOS-specific caveats (blank-first navigation,
onMessageno-op fallback,decelerationRatescroll-feel opt-in) are inline where the code lives so future cleanup passes don't silently remove them.Bump
@taboola/react-native-plugin-4xfrom^4.0.4→^4.0.10inpackage.json. The screen depends onTBLWebviewWrapperandTaboola.getWebPage, which are new in 4.0.10. A//TODOmarker sits above the dep as a reminder.Files
src/screens/WebIntegrationScreen.tsx— the demo screensrc/screens/webIntegration/taboolaPageHtml.ts— sample publisher HTML buildersrc/navigation/AppNavigator.tsx— drawer entrysrc/utils/constants.ts—WEB_INTEGRATIONscreen name/titleREADME.md— Web Integration section + Confluence linkpackage.json— plugin TODO noteTest plan
Mid Articlealternating-1x2-widget,Feed without videothumbs-feed-01) render, no red screensThe 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.