Skip to content
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

Fix example projects #776

Merged

Conversation

cdn34dd
Copy link
Contributor

@cdn34dd cdn34dd commented Jan 16, 2025

What does this PR do?

Fix both example and example-new-architecture and update projects to latest supported react-native version.

@cdn34dd cdn34dd requested a review from a team as a code owner January 16, 2025 10:33
Comment on lines 15 to 20
const viewPredicate: ViewNamePredicate = function customViewNamePredicate(
_event: ComponentDidAppearEvent,
trackedName: string
) {
return 'Custom RNN ' + trackedName;
};

Choose a reason for hiding this comment

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

Code Quality Violation

Function name 'customViewNamePredicate' should match name 'viewPredicate'. (...read more)

Use the same name between your function declaration and the variable or property to which it is assigned.

View in Datadog  Leave us feedback  Documentation

@cdn34dd cdn34dd marked this pull request as draft January 16, 2025 10:33
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 16, 2025

Datadog Report

Branch report: carlosnogueira/RUM-8045/fix-example-projects
Commit report: 48bfff3
Test service: dd-sdk-reactnative

✅ 0 Failed, 630 Passed, 1 Skipped, 12.1s Total Time

- Upgrade react-native to version 0.74.6
- Update project dependencies
- Fix metro & babel configs
- Upgrade gradle version
- Increase minSdkVersion & ndkVersion
- Update 'WixApp' component to access 'Navigation' object from
'@datadog/mobile-react-native-navigation'
…rade

- Upgrade react-native to version 0.74.6
- Update project dependencies
- Fix metro config
- Upgrade gradle version
- Increase minSdkVersion & ndkVersion
- Remove flipper initialization & refactor 'MainApplication.kt'
- Rename 'getBundleURL' to 'bundleURL' in 'AppDelegate.mm'
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-8045/fix-example-projects branch from b1f9c39 to 48bfff3 Compare January 20, 2025 18:25
@cdn34dd cdn34dd marked this pull request as ready for review January 20, 2025 18:26
@marco-saia-datadog marco-saia-datadog force-pushed the carlosnogueira/RUM-8045/fix-example-projects branch from 48bfff3 to aeda8cb Compare January 27, 2025 08:56
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 27, 2025

Datadog Report

Branch report: carlosnogueira/RUM-8045/fix-example-projects
Commit report: 893a35e
Test service: dd-sdk-reactnative

✅ 0 Failed, 630 Passed, 1 Skipped, 12.22s Total Time

Copy link
Member

@marco-saia-datadog marco-saia-datadog left a comment

Choose a reason for hiding this comment

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

Looks good! I have added a patch for react-native-navigation to solve known Android issues in RN 0.75.x, and I have left comments on some minor improvements for the PR.

Comment on lines 6 to 10
includeBuild('../node_modules/@react-native/gradle-plugin')




Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
includeBuild('../node_modules/@react-native/gradle-plugin')
includeBuild('../node_modules/@react-native/gradle-plugin')

@@ -125,5 +116,4 @@ dependencies {
}
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
// apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

Comment on lines 8 to 31
// plugins: [
// [
// 'module-resolver',
// {
// alias: {
// [pakCore.name]: path.join(
// __dirname,
// '../packages/core',
// pakCore.source,
// ),
// [pakNavigation.name]: path.join(
// __dirname,
// '../packages/react-navigation',
// pakNavigation.source,
// ),
// [pakNativeNavigation.name]: path.join(
// __dirname,
// '../packages/react-native-navigation',
// pakNativeNavigation.source,
// ),
// },
// },
// ],
// ],
Copy link
Member

Choose a reason for hiding this comment

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

Let's clean this up if not needed anymore 🧹

Comment on lines 15 to 20
const viewPredicate: ViewNamePredicate = function customViewNamePredicate(
_event: ComponentDidAppearEvent,
trackedName: string
) {
return 'Custom RNN ' + trackedName;
};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const viewPredicate: ViewNamePredicate = function customViewNamePredicate(
_event: ComponentDidAppearEvent,
trackedName: string
) {
return 'Custom RNN ' + trackedName;
};
const viewPredicate: ViewNamePredicate = function viewPredicate(
_event: ComponentDidAppearEvent,
trackedName: string
) {
return 'Custom RNN ' + trackedName;
};

or

Suggested change
const viewPredicate: ViewNamePredicate = function customViewNamePredicate(
_event: ComponentDidAppearEvent,
trackedName: string
) {
return 'Custom RNN ' + trackedName;
};
const viewPredicate: ViewNamePredicate = (
_event: ComponentDidAppearEvent,
trackedName: string
) => {
return 'Custom RNN ' + trackedName;
};

@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-8045/fix-example-projects branch from 2c3ed01 to 893a35e Compare January 27, 2025 14:08
@marco-saia-datadog marco-saia-datadog self-requested a review January 28, 2025 15:40
@marco-saia-datadog marco-saia-datadog merged commit e3f8f42 into develop Jan 28, 2025
9 checks passed
@marco-saia-datadog marco-saia-datadog deleted the carlosnogueira/RUM-8045/fix-example-projects branch January 28, 2025 15:40
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