Skip to content

feat: add inline inapp - #5

Draft
eduzatoni wants to merge 1 commit into
mainfrom
features/inline-inapp
Draft

eduzatoni wants to merge 1 commit into
mainfrom
features/inline-inapp

Conversation

@eduzatoni

@eduzatoni eduzatoni commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Add Inline In-App Support

New Features

✨ Adds cross-platform inline in-app messaging support for Capacitor via a new <emarsys-inline-inapp> custom element. The element measures its DOM position, delegates loading to the native Emarsys SDK, and forwards native completion, close, and app-event callbacks back as DOM events.

Changes

  • src/inlineInAppElement.ts: Introduces the emarsys-inline-inapp custom element, including loadInApp(viewId), frame measurement, z-index handling, resize/scroll updates, and native event routing.
  • src/types/InlineInApp.ts / src/definitions.ts: Adds inline in-app types, plugin method definitions, and listener typing for emarsysInlineInAppHandler.
  • src/index.ts: Registers the inline in-app custom element during plugin initialization and exports related utilities/types.
  • ios/Sources/EmarsysPlugin/*: Adds loadInlineInApp support using EMSInlineInAppView, native view insertion/positioning, transparent WebView handling, and event forwarding to JavaScript.
  • android/src/main/java/com/emarsys/plugin/emarsys/*: Adds loadInlineInApp support using InlineInAppView, native overlay positioning, transparent WebView handling, and callback forwarding to JavaScript.
  • android/build.gradle: Adds androidx.coordinatorlayout dependency for native inline view layout support.
  • src/__tests__/inlineInApp.test.ts: Adds jsdom tests for custom element registration, loading, z-index, event routing, multi-element behavior, and cleanup.
  • src/__tests__/mockBridge.ts: Extends the mock bridge with loadInlineInApp.
  • package.json / lockfiles: Adds jest-environment-jsdom for DOM-based tests.
  • example-app/src/js/tab-inapp.js: Adds a demo button and inline element usage for loading inline in-app campaigns.
  • example-app/src/js/tab-geofence.js: Adds a location permission request button to the example UI.
  • README.md: Documents inline in-app support, usage, DOM events, sizing guidance, and WebView transparency requirements.
  • 🔄 Regenerate and Update Summary
PR Bot Information

Version: 1.31.51

  • Summary Prompt: Default Prompt
  • Output Template: Default Template
  • Correlation ID: b6c3f570-b8f5-11f1-907a-09d3fae239dd
  • Event Trigger: pull_request.opened
  • File Content Strategy: Full file content
  • LLM: gpt-5.5

@eduzatoni
eduzatoni force-pushed the features/inline-inapp branch 3 times, most recently from c004df2 to baf8363 Compare September 25, 2026 15:37
@eduzatoni
eduzatoni force-pushed the features/inline-inapp branch from baf8363 to d4c4533 Compare September 25, 2026 15:39
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