[actionNameAttribute] prop doesn't accept value with curly braces
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react-native, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 145
- Fork
- 65
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataDog/dd-sdk-reactnative
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DataDog/dd-sdk-reactnative#1495 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Expose Android app startup Activity filtering in the React Native SDKCó thể đã có người làm @sbarrio đã nhận 7 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DataDog/dd-sdk-reactnative#1485 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
GraphQL variables with non-ASCII contents will make Apollo Client request throw errorCó thể đã có người làm @cdn34dd đã nhận 9 ngày trước. Đang mởawaiting response bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
DataDog/dd-sdk-reactnative#1482 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
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 callCó thể đã có người làm @cdn34dd đã nhận 7 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
DataDog/dd-sdk-reactnative#1377 · 1 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Babel plugin emits untransformed JSX when a tracked component has .map() children, breaking the Hermes buildCó thể đã có người làm @cdn34dd đã nhận 7 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
DataDog/dd-sdk-reactnative#1353 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của DataDog/dd-sdk-reactnative
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/rocketmq-dashboard#6872 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
fab-geocommuns/RNB-site#539 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Guest multiview tile label leaks raw virtual-source-id "Whip" instead of the guest name / slot labelĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Eyevinn/open-live-studio#211 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
sujithputta02/Esapay#13 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
ehmpathy/rhachet-roles-bhuild#468 ·
Maintainer thường phản hồi trong vòng 1 ngày