-
Notifications
You must be signed in to change notification settings - Fork 62
[RUM-18012] feat: support RN 0.87 #1368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
marco-saia-datadog
merged 5 commits into
develop
from
marcosaia/rums-18012/rn-87-support-alt
Aug 13, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
00bc6d0
fix: angle-bracket imports in RCTFabricWrapper for RN 0.87 support
marco-saia-datadog ec774a8
fix: hardcode Android DD SDK version in internal-testing-tools
marco-saia-datadog fb1bef6
fix: android 'Function invocation expected' error
marco-saia-datadog f504566
fix: disable heatmaps on RN 0.65 for compatibility
marco-saia-datadog 6b3ccbf
chore: add internal-testing-tools to bump-native-dd-sdk script
marco-saia-datadog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
38 changes: 38 additions & 0 deletions
38
...ges/core/android/src/oldarch/kotlin/com/datadog/reactnative/HeatmapViewResolverFactory.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /* | ||
| * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | ||
| * This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
| * Copyright 2016-Present Datadog, Inc. | ||
| */ | ||
|
|
||
| package com.datadog.reactnative | ||
|
|
||
| import android.view.View | ||
| import com.facebook.react.bridge.ReactApplicationContext | ||
| import com.facebook.react.uimanager.UIManagerHelper | ||
| import com.facebook.react.uimanager.common.UIManagerType | ||
|
|
||
| /** | ||
| * Resolves a React tag to its native [View] for heatmap tap tracking, via | ||
| * `UIManager.resolveView(reactTag)`. That method exists on the old-architecture `UIManager` | ||
| * interface from React Native 0.66 onward — see the `oldarch65` source set's counterpart of | ||
| * this function for RN <= 65, where it doesn't exist. | ||
| * | ||
| * This is the base `oldarch` source set, used whenever no more specific split applies: it | ||
| * covers every old-architecture RN version newer than the highest version-specific split | ||
| * defined (currently `oldarch65`). If a future RN release removes/changes another API this | ||
| * function (or another old-arch file) depends on, split off a new `oldarch<N>` source set named | ||
| * for the highest old-arch minor version it covers — e.g. `oldarch70` for RN <= 70 — following | ||
| * this same pattern, and this directory keeps meaning "later than the highest split." | ||
| */ | ||
| internal fun createHeatmapViewResolver( | ||
| reactApplicationContext: ReactApplicationContext, | ||
| telemetry: DdTelemetry | ||
| ): (Int) -> View? = { reactTag -> | ||
| try { | ||
| UIManagerHelper.getUIManager(reactApplicationContext, UIManagerType.DEFAULT) | ||
| ?.resolveView(reactTag) | ||
| } catch (e: Exception) { | ||
| telemetry.telemetryError("Failed to resolve view for heatmap tracking", e) | ||
| null | ||
| } | ||
| } |
20 changes: 20 additions & 0 deletions
20
...s/core/android/src/oldarch65/kotlin/com/datadog/reactnative/HeatmapViewResolverFactory.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /* | ||
| * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | ||
| * This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
| * Copyright 2016-Present Datadog, Inc. | ||
| */ | ||
|
|
||
| package com.datadog.reactnative | ||
|
|
||
| import android.view.View | ||
| import com.facebook.react.bridge.ReactApplicationContext | ||
|
|
||
| /** | ||
| * `UIManager.resolveView(reactTag)` was added in React Native 0.66; the old-architecture | ||
| * `UIManager` interface doesn't declare it on RN <= 65 (this source set), so a React tag can't | ||
| * be resolved to its native [View] for heatmap tap tracking here — this always returns null. | ||
| */ | ||
| internal fun createHeatmapViewResolver( | ||
| reactApplicationContext: ReactApplicationContext, | ||
| telemetry: DdTelemetry | ||
| ): (Int) -> View? = { null } |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh boy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to add this file to the
bump-native-dd-sdkscript:dd-sdk-reactnative/bump-native-dd-sdk.sh
Lines 13 to 17 in a9111a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!