-
Notifications
You must be signed in to change notification settings - Fork 142
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
♻️ [RUM-8319] Use assembly hook for action #3305
base: main
Are you sure you want to change the base?
Conversation
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
f1eb9ec
to
46c2b56
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3305 +/- ##
==========================================
- Coverage 93.71% 93.64% -0.08%
==========================================
Files 291 291
Lines 7670 7676 +6
Branches 1747 1751 +4
==========================================
Hits 7188 7188
- Misses 482 488 +6 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
} | ||
|
||
return { | ||
type: eventType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event will already have a type
property, right? Assuming that's true, it may make sense to only have the hook return the properties it's adding or changing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! Specifying the type is a bit of an ugly hack to improve type checking 😞. See
// Ensuring the `type` field is always present improves type checking, especially in conditional logic in hooks (e.g., `if (eventType === 'view')`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to discuss a better alternative :)
Motivation
The overall goal is to create a Modular SDK to simplify contributions and enhance extensibility.
This PR uses the assemble hook to decouple action assembly
Changes
Testing
I have gone over the contributing documentation.