Skip to content

feat(react-native): add <LDMask> and <LDUnmask> wrapper components#535

Merged
beekld merged 3 commits into
mainfrom
beeklimt/O11Y-1399
May 7, 2026
Merged

feat(react-native): add <LDMask> and <LDUnmask> wrapper components#535
beekld merged 3 commits into
mainfrom
beeklimt/O11Y-1399

Conversation

@beekld
Copy link
Copy Markdown
Contributor

@beekld beekld commented May 7, 2026

Summary

Implements <LDMask> and <LDUnmask> wrapper components for views. The names were chosen to be consistent with existing LD APIs in RN. The implementation piggybacks on the TestID implementation. While I considered other ways of implementing it (such as walking the tree and marking individual controls), this was the only design that didn't have a small window at render time where masked controls could be visible.

How did you test this change?

Added a new section to the example app to exercise the new features. Everything is correct on Android. On iOS, there is only the known issue that will have to be fixed in the iOS repo separately.

Are there any deployment considerations?

N/A


Note

Medium Risk
Changes how masking configuration is sent to native by prepending internal testID sentinels, which could affect apps relying on maskTestIDs/unmaskTestIDs ordering or using the reserved IDs. It also introduces new privacy-related behavior that should be validated across platforms.

Overview
Adds new <LDMask> and <LDUnmask> wrapper components that mark a React Native subtree as explicitly masked/unmasked in session replay via reserved internal testID values.

Updates configureSessionReplay (and plugin registration) to always prepend those internal sentinel IDs to maskTestIDs/unmaskTestIDs before forwarding options to native, and extends tests, the example app, and the README with the new masking precedence rules and usage.

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

@beekld beekld requested a review from a team as a code owner May 7, 2026 17:38
@beekld beekld merged commit 2b25a7e into main May 7, 2026
24 checks passed
@beekld beekld deleted the beeklimt/O11Y-1399 branch May 7, 2026 17:57
abelonogov-ld pushed a commit that referenced this pull request May 8, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>session-replay-react-native: 0.10.0</summary>

##
[0.10.0](session-replay-react-native-0.9.0...session-replay-react-native-0.10.0)
(2026-05-08)


### Features

* **react-native:** add &lt;LDMask&gt; and &lt;LDUnmask&gt; wrapper
components
([#535](#535))
([2b25a7e](2b25a7e))
* **react-native:** drop accessibilityIdentifiers options; mark
minimumAlpha iOS-only
([#538](#538))
([e3c1ba4](e3c1ba4))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release bookkeeping only: version/manifest bumps and
changelog updates, with no implementation code changes in this diff.
> 
> **Overview**
> Publishes `@launchdarkly/session-replay-react-native` **v0.10.0** by
bumping the version in `package.json` and updating
`.release-please-manifest.json`.
> 
> Updates the package `CHANGELOG.md` to include the `0.10.0` release
notes (adds `LDMask`/`LDUnmask` wrappers and removes
`accessibilityIdentifiers` options / clarifies `minimumAlpha` as
iOS-only).
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
72fe58b. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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.

2 participants