Propose PRs for the projects that are now patched ad-hoc
adamziel opened this issue · 4 comments
Let's start Pull Requests to improve the projects WordPress Playground is currently patching ad-hoc:
These patches are not specific to the WordPress Playground project, they enable either WebAssembly compatibility or browser compatibility.
About the WordPress SQLite plugin, I heard people have started work on integrating it directly into WP core. From the following article:
Let’s make WordPress officially support SQLite
The comment thread at the bottom links to the newest development, which is the SQLite Integration module in the Performance Lab plugin.
Implement new experimental SQLite integration module #547
The code for the SQLite implementation was copied from https://github.com/aaemnnosttv/wp-sqlite-db/blob/master/src/db.php, which is a fork of the original work on the sqlite-integration plugin. It was then refactored a bit, coding-standards were applied, and an integration with the plugin was built.
I'm guessing the code under wp-includes/sqlite will be eventually moved into core.
Just for curiosity, I checked what the current patch in Playground does to the SQLite plugin; then searched for the corresponding lines in the new SQLite module.
So when this SQLite support does get into core, I imagine the patch can be made into a pull request there (instead of the plugin which will be obsolete at that point).
An overview of the patches applied by WordPress Playground: #119 (comment)
The srcDoc patch may need to forever remain a Playground-applied patch.
For Gutenberg, we'd need to replace <iframe srcDoc="<!DOCTYPE html>"> with <iframe src="doctype.html"> around here:
Otherwise we have to patch it ourselves:
The problem is: The block-editor Gutenberg package gets shipped in npm and also merged to WordPress, and then it can be used in many different ways:
- Loaded in WordPress from the default
/wp-contentURL you'd expect - Loaded in WordPress by a script concatenator or some cache plugin
- Bundled outside of WordPress with a bundler that doesn't include HTML files in the build
- Loaded from unkpg
- ...probably way more
Which means there's no easy way to replace srcDoc with src. We can do it in this project, because we can fix the loading sequence in place, but it doesn't sound like a great idea for a generic Gutenberg package.
srcDoc got replaced for src in WordPress/gutenberg#50875 (comment)