[actionNameAttribute] prop doesn't accept value with curly braces
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react-native, typescript
- 领域
- mobile
调研方向
Start by reading the mobile React Native Babel plugin configuration and its handling of the configured actionNameAttribute. Compare how it processes a plain string prop with a value supplied in curly braces, then find the relevant plugin tests or add a focused regression case if the existing tests cover this behavior. Done means the expression value is used as the action name, with the regression case passing.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Hey 👋🏻
I use actionNameAttribute = "testID" in @datadog/mobile-react-native config. And I'm using also @datadog/mobile-react-native-babel-plugin with following config:
{
actionNameAttribute: "testID",
components: {
useContent: true,
useNamePrefix: true,
tracked: [
{
name: "Button",
handlers: [{ event: "onPress", action: "TAP" }],
},
{
name: "TextButton",
handlers: [{ event: "onPress", action: "TAP" }],
},
{ name: "FAB", handlers: [{ event: "onPress", action: "TAP" }] },
{
name: "Checkbox",
handlers: [{ event: "onPress", action: "TAP" }],
},
{
name: "ListItem",
handlers: [{ event: "onPress", action: "TAP" }],
},
Then if testID is added to element with curly braces testID={"some_test_id"} I get aria-label, button content or something like that as action name instead of object property.
If I use plain string as testID it works, for example testID="some_test_id".
Problem is that I would like to have element ids not as plain string but reference to object key value: testID={TestIDs.someTestId} and keep them in one place instead of adding them inline.
Reproduction steps
- Add mentioned setup
- Add testID to some RN element, remember that test id should be added with curly braces
- Tap element to test what's logged as event name
SDK logs
No response
Expected behavior
Event names added with curly braces are sent properly to DD.
Affected SDK versions
3.9.0, 3.10.0
Latest working SDK version
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Yarn
React Native Version
0.79.5
Package.json Contents
"@datadog/mobile-react-native": "3.9.0",
"@datadog/mobile-react-native-babel-plugin": "3.9.0",
"@datadog/mobile-react-native-session-replay": "3.9.0",
"@datadog/mobile-react-navigation": "3.9.0",
"expo": "^53.0.0",
iOS Setup
No response
Android Setup
No response
Device Information
No response
Other relevant information
No response
- 主要语言
- TypeScript
- 星标
- 145
- 派生
- 65
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 20
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DataDog/dd-sdk-reactnative 的其他 Issue
-
Expose Android app startup Activity filtering in the React Native SDK可能已有人在做 @sbarrio 于 4 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 35/100
DataDog/dd-sdk-reactnative#1485 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
GraphQL variables with non-ASCII contents will make Apollo Client request throw error可能已有人在做 @cdn34dd 于 6 天前认领。 未关闭awaiting response bug
难度 4/5 3-5 天 新手友好度 42/100
DataDog/dd-sdk-reactnative#1482 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 2 天内回复
-
Interaction tracking records nothing: the babel plugin's injected import makes Metro bundle a second copy of the SDK, so DdBabelInteractionTracking.config is set on a different class than instrumented handlers call可能已有人在做 @cdn34dd 于 4 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
DataDog/dd-sdk-reactnative#1377 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 2 天内回复
-
Babel plugin emits untransformed JSX when a tracked component has .map() children, breaking the Hermes build可能已有人在做 @cdn34dd 于 4 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 76/100
DataDog/dd-sdk-reactnative#1353 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
iOS: network error events from JS-tracked requests bypass the drop_resource deduplication and cannot be filtered — expose a native error mapper?可能已有人在做 @marco-saia-datadog 于 4 天前认领。 未关闭enhancement
难度 3/5 1-2 天 新手友好度 58/100
DataDog/dd-sdk-reactnative#1338 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 DataDog/dd-sdk-reactnative 的全部 Issue
相似的 Issue
-
ai-driven-qa bug claude Minor
难度 2/5 1-3 小时 新手友好度 70/100
linagora/twake-contacts-frontend#241 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result count未关闭
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
priority:high
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
ahmedkhaleel2004/gitdiagram#228 ·