Revert "feat: Remove plugins related code, which is not used (#123)"#133
Merged
Revert "feat: Remove plugins related code, which is not used (#123)"#133
plugins related code, which is not used (#123)"#133Conversation
This reverts commit 42ffd92.
8fcce49 to
5e1bfb7
Compare
size-limit report 📦
|
billyvg
commented
Dec 5, 2023
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, | ||
| }, | ||
| }), | ||
| ), | ||
| })) || [], |
Member
Author
There was a problem hiding this comment.
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), | ||
| ); | ||
| } |
| fontObserver(); | ||
| selectionObserver(); | ||
| customElementObserver(); | ||
| pluginHandlers.forEach((h) => h()); |
Comment on lines
+328
to
+336
| for (const plugin of plugins || []) { | ||
| if (plugin.getMirror) | ||
| plugin.getMirror({ | ||
| nodeMirror: mirror, | ||
| crossOriginIframeMirror: iframeManager.crossOriginIframeMirror, | ||
| crossOriginIframeStyleMirror: | ||
| iframeManager.crossOriginIframeStyleMirror, | ||
| }); | ||
| } |
Comment on lines
+201
to
+205
| for (const plugin of plugins || []) { | ||
| if (plugin.eventProcessor) { | ||
| e = plugin.eventProcessor(e); | ||
| } | ||
| } |
Member
|
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! |
0223c1b to
5e1bfb7
Compare
Member
Author
|
@mydea done! |
c298lee
approved these changes
Dec 7, 2023
mydea
approved these changes
Dec 7, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.