Closed milomord closed 3 weeks ago
Hey @milomord,
Could you share a snippet of your react-native view if possible, or a MRE, so we can troubleshoot this?
Btw, just transfered the ticket to this repo
@milomord any more context here?
Sure, I can provide a simplified example. I am able to reproduce with this snippet for instance in our Expo application:
import { View, Text } from 'react-native'
function Homepage() {
return (
<View style={{ flex: 1 }}>
<Text style={{ fontSize: 32 }}>Example text</Text>
<View style={{ flex: 1, gap: 16 }} accessibilityLabel="ph-no-capture">
<Text>Some</Text>
<Text>Sensitive</Text>
<Text>Content</Text>
</View>
</View>
)
}
export default HomePage
I just confirmed that when I render this component, all views are present in the screen recording. In case it is helpful, our current version of posthog-react-native
is 3.3.6
and our current posthog-react-native-session-replay
version is 0.1.5
@milomord I managed to reproduce this on iOS.
The issue is that View
gets converted to RCTView
, but Text
also gets converted to RCTView
depending on the styles instead of RCTTextView
which is strange.
Usually, accessibilityLabel
gets promoted to the RCTRootContentView
view parent as well, so the whole screen is redacted, which makes it much harder.
@milomord for WebView, are you using https://www.npmjs.com/package/react-native-webview? can you share a code snippet?
@milomord I think https://github.com/PostHog/posthog-ios/pull/230 should solve that
once the v3.14.1 is published, you can upgrade your Pods and test it, thanks.
Bug Description
Bug description
We recently enabled the react-native session replay feature, which seems really great as is! However, we would like to set
ph-no-capture
on aWebView
, or its surroundingView
. For us it seems likeaccessibilityLabel="ph-no-capture"
works for theText
component, but notView
orWebView
. Is it possible right now to redact an entireView
component?How to reproduce
accessibilityLabel="ph-no-capture"
toView
component somewhere in react native appView
is visible in uploaded recording on posthog dashboardAdditional context
This is observed for us on iOS, I have not yet tested if it works for Android as that's not important for our use case right this moment.
Debug info