Skip to content

feat: add showScrollIndicators prop to inline in app message#593

Open
xavi-999 wants to merge 1 commit into
customerio:mainfrom
xavi-999:feat/inline-shows-scroll-indicators
Open

feat: add showScrollIndicators prop to inline in app message#593
xavi-999 wants to merge 1 commit into
customerio:mainfrom
xavi-999:feat/inline-shows-scroll-indicators

Conversation

@xavi-999
Copy link
Copy Markdown

@xavi-999 xavi-999 commented May 19, 2026

Allow consumers to opt into hiding the WebView scroll indicators on the inline in-app message component. Defaults to true to preserve existing behavior; supports runtime toggling on both iOS and Android.

Problem

InlineInAppMessageView renders its animated content inside a native WKWebView (iOS) / WebView (Android). When the message content initially renders within the component's bounds the scroll indicators are visual noise — they flash on load and then disappear, making the component look off. Hiding them is the correct UX for typical inline-message usage.
This was mainly replicated in Android. In smaller screen devices, sometimes, the scroll bar remains on screen indefinitely.

Screen.Recording.2026-05-19.at.17.17.16.mov

However, hiding them unconditionally in the SDK has two problems:

  1. It changes default behavior for every existing consumer without opt-in — a silent breaking change.
  2. It removes any escape hatch for consumers who render oversized messages and do want the user to know the content is scrollable.

There was no prop to control this. The only path was to bake in a hardcoded value, which is not appropriate for a public SDK.

Solution

Add a showScrollIndicators?: boolean prop to InlineInAppMessageView, defaulting to true (native default, zero regression for existing consumers). Consumers set showScrollIndicators={false} to opt into hiding.

The prop is wired end-to-end:

1. Codegen spec (src/specs/components/InlineMessageNativeComponent.ts)

2. Public TS component (src/components/InlineInAppMessageView.tsx)

3. Android (ReactInlineInAppMessageView.kt + InlineInAppMessageViewManager.kt)

4. iOS (ReactInlineMessageView.swift + .h + RCTInlineMessageNative.mm)

All setters are declarative — they apply the value in both directions, so toggling at runtime works without remounting the component.


Note

Low Risk
Low risk: adds an optional UI-only prop with a default of true, and the native changes are limited to toggling scroll indicator visibility without altering message loading or event semantics.

Overview
Adds a new showScrollIndicators?: boolean prop to InlineInAppMessageView (defaulting to true) so consumers can hide WebView scroll bars for inline in-app messages.

Wires the prop end-to-end via RN Codegen (WithDefault<boolean, true>), updates the public TS props/API report, and applies the setting at runtime on Android by recursively enabling/disabling view scrollbars and on iOS by toggling WKWebView.scrollView indicator visibility (including during load/size-change callbacks).

Reviewed by Cursor Bugbot for commit 7b1aeae. Bugbot is set up for automated code reviews on this repo. Configure here.

@xavi-999 xavi-999 requested a review from a team as a code owner May 19, 2026 16:21
Comment thread ios/wrappers/inapp/inline/ReactInlineMessageView.swift
@xavi-999 xavi-999 force-pushed the feat/inline-shows-scroll-indicators branch from 833e06e to 8beffd6 Compare May 19, 2026 16:53
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 8beffd6. Configure here.

Comment thread api-extractor-output/customerio-reactnative.api.md Outdated
@xavi-999 xavi-999 force-pushed the feat/inline-shows-scroll-indicators branch from 8beffd6 to 7b1aeae Compare May 19, 2026 17:17
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