[actionNameAttribute] prop doesn't accept value with curly braces
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react-native, typescript
- Ambito
- mobile
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 145
- Fork
- 65
- Merge medio
- 2g 16h
- PR unite (30g)
- 20
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DataDog/dd-sdk-reactnative
-
Expose Android app startup Activity filtering in the React Native SDKForse già presa @sbarrio l’ha presa 5 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
DataDog/dd-sdk-reactnative#1485 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
GraphQL variables with non-ASCII contents will make Apollo Client request throw errorForse già presa @cdn34dd l’ha presa 7 giorni fa. Apertaawaiting response bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
DataDog/dd-sdk-reactnative#1482 · 2 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
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 callForse già presa @cdn34dd l’ha presa 5 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
DataDog/dd-sdk-reactnative#1377 · 1 commento · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Babel plugin emits untransformed JSX when a tracked component has .map() children, breaking the Hermes buildForse già presa @cdn34dd l’ha presa 5 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
DataDog/dd-sdk-reactnative#1353 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
iOS: network error events from JS-tracked requests bypass the drop_resource deduplication and cannot be filtered — expose a native error mapper?Forse già presa @marco-saia-datadog l’ha presa 5 giorni fa. Apertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
DataDog/dd-sdk-reactnative#1338 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di DataDog/dd-sdk-reactnative
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
homarr-labs/homarr#7191 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AvaProtocol/ava-sdk-js#276 ·
I maintainer di solito rispondono entro 1 giorno
-
useFragment does not require `variables` when the fragment's variables type has required fieldsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apollographql/apollo-client#13493 ·
I maintainer di solito rispondono entro 1 giorno