Skip to content

Add svg testing screen to Benchmark#1321

Open
jonathanmos wants to merge 3 commits into
developfrom
jmoskovich/add-svg-screens
Open

Add svg testing screen to Benchmark#1321
jonathanmos wants to merge 3 commits into
developfrom
jmoskovich/add-svg-screens

Conversation

@jonathanmos

@jonathanmos jonathanmos commented Jul 5, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Adds screen to benchmark to test svgs.
In addition, fixes an issue with running on ios 26.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 5, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4580336 | Docs | Datadog PR Page | Give us feedback!

@jonathanmos jonathanmos force-pushed the jmoskovich/add-svg-screens branch 3 times, most recently from 1be6678 to 9bb5849 Compare July 5, 2026 21:32
@jonathanmos jonathanmos force-pushed the jmoskovich/add-svg-screens branch from 9bb5849 to 0f89ace Compare July 7, 2026 10:48
@jonathanmos jonathanmos changed the title Add svg testing screens to the example subprojects Add svg testing screen to Benchmark Jul 7, 2026
@jonathanmos jonathanmos marked this pull request as ready for review July 7, 2026 11:56
@jonathanmos jonathanmos requested a review from a team as a code owner July 7, 2026 11:56
Copilot AI review requested due to automatic review settings July 7, 2026 11:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an SVG-focused benchmark screen to the Session Replay UI catalog in the benchmarks app, along with the build/config plumbing to import .svg files as React components and an iOS/Xcode 26 build workaround.

Changes:

  • Added a new Session Replay “SVG Test Screen” with a broad set of SVG rendering/privacy test cases plus local SVG assets and a TS *.svg module declaration.
  • Enabled SVG imports in Metro via react-native-svg-transformer and enabled Datadog Session Replay SVG tracking via the benchmark Babel config.
  • Added react-native-svg (and transformer deps) to the benchmarks app and introduced a Podfile post-install patch to mitigate Xcode 26+ fmt consteval build failures.

Reviewed changes

Copilot reviewed 8 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
yarn.lock Locks new dependencies for SVG rendering/transformer and related transitive packages.
benchmarks/svg.d.ts Adds TS module typings for *.svg imports as React.FC<SvgProps>.
benchmarks/src/scenario/SessionReplay/UIDetailView.tsx Wires the new SVG screen into the detail view switch.
benchmarks/src/scenario/SessionReplay/types.ts Adds UIElement.Svg to the UI catalog enum.
benchmarks/src/scenario/SessionReplay/component/Svg.tsx New SVG test screen exercising static shapes, transforms, dynamic props, file imports, privacy wrappers, and an unsupported-element repro.
benchmarks/src/scenario/SessionReplay/component/assets/star.svg Adds local SVG asset used by import test cases.
benchmarks/src/scenario/SessionReplay/component/assets/shield.svg Adds local SVG asset used by import test cases.
benchmarks/src/scenario/SessionReplay/component/assets/heart.svg Adds local SVG asset used by import test cases.
benchmarks/src/scenario/SessionReplay/component/assets/icons.ts Adds a barrel export to validate named-export SVG import behavior.
benchmarks/package.json Adds react-native-svg dependency and transformer + Datadog babel plugin devDependencies.
benchmarks/metro.config.js Configures Metro to treat .svg as source and transform via react-native-svg-transformer.
benchmarks/ios/Podfile.lock Updates pods to include RNSVG and reflects dependency graph checksum changes.
benchmarks/ios/Podfile Adds a post_install patch to disable fmt consteval under Xcode 26+ Apple Clang.
benchmarks/babel.config.js Enables @datadog/mobile-react-native-babel-plugin with sessionReplay.svgTracking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread benchmarks/src/scenario/SessionReplay/UIDetailView.tsx Outdated
Comment thread benchmarks/src/scenario/SessionReplay/component/Svg.tsx Outdated
Comment thread benchmarks/ios/Podfile
# Workaround for fmt consteval errors with Xcode 26+ Clang:
# The fmt library's consteval usage is incompatible with newer Apple Clang.
# Patch base.h to disable consteval by adding a guard for the current Xcode.
fmt_base_header = File.join(installer.sandbox.pod_dir('fmt'), 'include', 'fmt', 'base.h')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this, I hadn't tested this with XCode 26.6 until now 😅

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.

3 participants