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
activitypub-remote-reply
script enqueues 29 dependencies on all is_singular()
requests
#705
Comments
Sadly #706 removes the JS completely, so I had to remove it for now. I reopened the issue, because we still need a solution for the issue. |
Stupid question, perhaps, and I get that you may want to reuse Gutenberg components, etc., but wouldn't it make sense to just whip up a custom script, to essentially render only a modal with two input fields and two buttons? I also found it doesn't necessarily respect the theme CSS. E.g., the |
I've just found a ton of GlotPress translation stuff in my blog which appears to be coming from this plugin. I love having my blog on the Fediverse. But I want to run a lean and quick website which, as far as possible, works without JS. Would it be possible to have an option to switch off the things we don't need? |
Related: #426 |
Wanted to try and create a vanilla JS modal ... but I did notice WP itself also loads quite a few of these: Could be 'cause I use a block theme with, e.g., a navigation block ... Could be the Interactivity API. Still interested in either a vanilla JS alternative (or something Interactivity API based for reasons of consistency, although user experience and speed should be more important). Looked at some examples and nearly all vanilla JS modals are just a matter of tacking on/removing some classes to/from Edit: Not loading these files where they aren't needed (per this issue's title) is probably even more important, haha. Meaning I'm not making demands or anything, whatever solution is fine. Another edit: Just in case anyone wanted to disable 😬 the link/modal, this seems to work ...
|
I've made a PR that should eliminate loading the script (and its heavy dependencies) in all situations where it's not needed |
Quick summary
Introduced in #689 the
activitypub-remote-reply
script handle now enqueues itself with 29 dependencies:This happens on posts and pages that (1) don't support comments, (2) don't have comments enabled.
This also adds a combined total of almost 2MB of potentially unused JS to all of those requests.
Steps to reproduce
What you expected to happen
What actually happened
The mentioned script and style gets enqueued on all post and page views. The enqueued dependency bundle size is incredibly large.
Impact
Most (> 50%)
Available workarounds?
Yes, difficult to implement
Logs or notes
No response
The text was updated successfully, but these errors were encountered: