Skip to content

feat: Touch events now track components with sentry-label #2068

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

Merged
merged 5 commits into from
Feb 26, 2022

Conversation

jennmueng
Copy link
Member

@jennmueng jennmueng commented Feb 17, 2022

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Support tracking touch events on components with the prop sentry-label.

Note that this does not throw a typescript error as "it is not a valid JS Identifier"

It will fall back to other properties, with the hierarchy sentry-label > accessibilityLabel > displayName.

Also, removed the tracking of name on components without a displayName, found that doing so just caused components to be logged twice.

💡 Motivation and Context

Resolves #1913
Likely #950 too

💚 How did you test it?

Tested on sample app, and added unit tests.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2022

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against c8b6489

@marandaneto
Copy link
Contributor

@AbhiPrasad or @bruno-garcia would you be able to review this? Looks good to me but I don't know much about the component tree and its properties, thanks.

@bruno-garcia
Copy link
Member

Thanks @jennmueng
Does this require a migration guide update? Seems like it does need a docs entry though?

@jennmueng
Copy link
Member Author

@bruno-garcia Yep, working on the docs PR

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.

Use accessibilityLabel for identifying touch events
4 participants