Skip to content

feat: Ignore Fragment components by default for react component annotation #687

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

Closed
wants to merge 2 commits into from

Conversation

lforst
Copy link

@lforst lforst commented Feb 26, 2025

Fixes #686

I think there are like 0 cases where we would actually want to annotate fragments as they do not manifest in dom elements in any case.

@lforst lforst requested a review from 0Calories February 26, 2025 07:48
@0Calories
Copy link
Contributor

Thanks @lforst 🙏
Ideally we should have the default skipped components set in the babel plugin rather than the Sentry bundler plugins. Otherwise standalone users of the component annotation plugin will not have the changes in this PR

@btpnlsl
Copy link

btpnlsl commented Feb 26, 2025

Would this check in isReactFragment (which is called by the applyAttributes method) not already filter out adding attributes to Fragments already?

@lforst lforst requested review from 0Calories and removed request for 0Calories February 27, 2025 11:01
@lforst lforst closed this Mar 3, 2025
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.

reactComponentAnnotation passes props to Fragment
3 participants