Skip to content

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Dec 5, 2023

This reverts commit 42ffd92.

We need plugins to enable our custom canvas playback method. We can keep record plugins removed as we don't use them.

@billyvg billyvg force-pushed the feat-export-canvas-types branch from 8fcce49 to 5e1bfb7 Compare December 5, 2023 23:00
@github-actions
Copy link

github-actions bot commented Dec 5, 2023

size-limit report 📦

Path Size
rrweb - record only (gzipped) 16.78 KB (+1.12% 🔺)
rrweb - record & getCanvasManager only (gzipped) 22.92 KB (+1.65% 🔺)
rrweb - record only (min) 57.74 KB (+0.98% 🔺)
rrweb - record with treeshaking flags (gzipped) 15.55 KB (+1.28% 🔺)

@billyvg billyvg marked this pull request as ready for review December 5, 2023 23:03
Comment on lines +614 to +630
plugins:
plugins
?.filter((p) => p.observer)
?.map((p) => ({
observer: p.observer!,
options: p.options,
callback: (payload: object) =>
wrappedEmit(
wrapEvent({
type: EventType.Plugin,
data: {
plugin: p.name,
payload,
},
}),
),
})) || [],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably remove this

Comment on lines +1318 to +1323
const pluginHandlers: listenerHandler[] = [];
for (const plugin of o.plugins) {
pluginHandlers.push(
plugin.observer(plugin.callback, currentWindow, plugin.options),
);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used

fontObserver();
selectionObserver();
customElementObserver();
pluginHandlers.forEach((h) => h());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used

Comment on lines +328 to +336
for (const plugin of plugins || []) {
if (plugin.getMirror)
plugin.getMirror({
nodeMirror: mirror,
crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,
crossOriginIframeStyleMirror:
iframeManager.crossOriginIframeStyleMirror,
});
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used

Comment on lines +201 to +205
for (const plugin of plugins || []) {
if (plugin.eventProcessor) {
e = plugin.eventProcessor(e);
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used

@mydea
Copy link
Member

mydea commented Dec 7, 2023

It's not a huge amount of code so I'd vote to keep all of it, if we keep some of the plugins code and not other it may become confusing in the future!

@billyvg billyvg force-pushed the feat-export-canvas-types branch from 0223c1b to 5e1bfb7 Compare December 7, 2023 13:52
@billyvg
Copy link
Member Author

billyvg commented Dec 7, 2023

@mydea done!

@billyvg billyvg requested review from c298lee and mydea December 7, 2023 15:53
@billyvg billyvg merged commit 65d2717 into sentry-v2 Dec 7, 2023
@billyvg billyvg deleted the feat-export-canvas-types branch December 7, 2023 16:17
billyvg added a commit that referenced this pull request Apr 26, 2024
#133)

This reverts commit 42ffd92.

We need plugins to enable our custom canvas playback method.
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.

4 participants