-
Notifications
You must be signed in to change notification settings - Fork 98
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
What needs to be done in order to get this merged into core? #884
Comments
You could have the theme prompt the user to install the plugin. That's pretty common among themes, right? It's also common for themes to have to do feature detection to determine if an API is available. For example, if a theme is needing to be backwards-compatible with older versions of WP, then the theme would need to check if a given function/class exists. That same approach can be taken with the PWA plugin. I wouldn't recommend bundling this plugin with your theme, as that will cause many more headaches later as versions diverge.
That's a good question. I suppose there just hasn't been a clamoring from users to have this in core. In order for something to be merged into core, it should be useful for the majority. According to the WordPress Philosophy, the features in core should be applicable to 80% or more of end users. Is that the case for PWA? I'm not entirely sure yet. It seems there should be a key use case that everyone benefits from, like offline access to the block editor or site editor. Otherwise, the offline browsing feature of the plugin is currently opt-in via the Reading settings screen. Would that need to become enabled by default? But then will that hurt the web to have every WordPress site registering a service worker? I think there is a path to make a case, but lately I've not had PWA as my main priority so it's not something I've been pushing forward actively. |
Thanks! My thought re: bundling would be to just keep merging this upstream repo to my plugin to avoid diversion headaches. But, yes, I suppose it's not the end of the world to include a check that prevents activation if this plugin is not already active. It seems to me that the issue with the lack of interest in PWAs is not relevance, whatsoever. As you say, things like Offline Post creation and general site administration is reason enough to make it 100% relevant. And while most sites/webapps would not be appropriate for installing to a homescreen, push notifications etc..., surely nearly EVERY site beyond a single page brochure could benefit from improved caching, offline capabilities etc... This would improve both client/user experience as well as reduce server loads and bandwidth, and ultimately energy/carbon usage and $. Moreover, complex/dynamic/app-like sites are becoming more and more the norm these days, be it LMS, BuddyBoss, WooCommerce etc... - all of which would massively benefit from PWA capabilities. So, it seems clear to me that the real issue is one of awareness and possibility. Most people (devs included) are simply not aware of PWAs, and why should they be? The tooling in Core simply doesn't exist and this plugin is kind of hidden in relative obscurity... And many of the popular freemium PWA plugins are extremely limited (little to no capabilities for dynamically caching AJAX GET and POST requests), which surely turns people away. I don't think any of them use Workbox either, though they have no need for that given their sheer simplicity. Anyway, surely 100% of the folks who are responsible for deciding what goes into Core can appreciate the implications and relevance if the case was clearly made. If this were to happen, it would generate considerably more awareness, more plugins and themes using it, and thus the high relevance would follow - perhaps even to the point that Apple would finally fully get on the PWA train, thus making them even more relevant. So, it seems that there really just needs to be a champion for the technology wherever possible. WordPress (40+% of the web) and Google (~100% of the web, in one way or another) seem like as good of a place as any for this to happen! I see that it was last brought up in the Performance team chat 10 months ago. Frankly, I think this has FAR more potential relevance/impact than many of the things that the Performance team are doing, and teams across WP in general... So, to the extent that you don't have the bandwidth to champion this, I'm happy to help wherever/however possible - I'm not sure to what degree I can spearhead development (though I can surely contribute some), but I'd be happy to bring it up and politely and persistently pester people about it if that would be helpful. If you're interested in my help with this, perhaps we could brainstorm and formalize a post/argument for it all and present it to the performance team or even a post on make.wordpress.org (assuming you have access to such a thing)? If not, I suppose I'll just continue on with my plans to make a highly functional (dynamic caching etc...) PWA for a BuddyBoss/LMS/and more site that I expect to get considerable traction. I'll perhaps even turn it into a freemium plugin as well, which would generate more interest in it all, which might break Core's inertia... Whether I'd do so on top of this plugin or write something custom (and surely more streamlined given that it won't be an extensible PWA framework), I'm not yet sure... It would be a great shame if I didn't use this as a base though, but its hard to justify the bloat if this has little prospects of getting into Core. |
One other argument for this - "accessibility"/democratization of publishing/internet. A large portion of the world's population have limited and/or expensive internet access. As a visitor/user, being able to visit somewhere with wifi and download posts and other pages/assets to be used later while offline would be massively important - this is my primary motivation for all of this. And, likewise, as a site owner, being able to do admin stuff while offline would be very helpful as well. And there's surely plenty of other use cases that we can't even conceive of yet. If the mechanism were to exist, people's creativity would bring them forth. If we can identify and address whatever concerns there might be to doing so, there's frankly zero reason this shouldn't be a real priority to get merged into core. |
I love this initiative, to create a central wp pwa mechanism that will eventually end up in core. But until that happens, it seems like if we want to build a theme or plugin on top of this, we will require users to install this plugin as well. That seems extremely impractical - extra steps, confusion etc...
So, do you have any recommendations for using this plugin in a more streamlined way? Should I just clone/fork it and build my plugin on top of it, and if/when it gets merged into core, I can remove this plugin from my plugin?
On a related note, are you able to provide any clarity on if/when this might be merged into core? Likewise, is there anything in particular that is outstanding that is preventing this from happening? Are they things that I or others could help at all with?
Thanks!
The text was updated successfully, but these errors were encountered: