Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPlugin: Remove replace_editor filter, extend core editor #13569
Conversation
aduth
added
[Status] In Progress
[Component] Plugin
labels
Jan 29, 2019
aduth
added this to In Progress
in Remove PHP
via automation
Jan 29, 2019
youknowriad
referenced this pull request
Jan 29, 2019
Closed
Remove PHP code merged into WordPress 5.0 #11015
Jan 30, 2019
This was referenced
This comment has been minimized.
This comment has been minimized.
Commented in #5670 (comment) |
aduth
referenced this pull request
Jan 30, 2019
Merged
Plugin: Remove `user_can_richedit` filtering #13608
aduth
force-pushed the
remove/replace-editor
branch
from
27a8cd8
to
4185fc6
Jan 31, 2019
Jan 31, 2019
This was referenced
aduth
force-pushed the
remove/replace-editor
branch
from
4185fc6
to
e7a7d5e
Feb 27, 2019
aduth
requested review from
ajitbohra,
chrisvanpatten,
gziolo,
mkaz,
nosolosw,
notnownikki and
youknowriad
as
code owners
Feb 27, 2019
aduth
force-pushed the
remove/replace-editor
branch
from
a65cf0c
to
b65649e
Feb 28, 2019
aduth
referenced this pull request
Feb 28, 2019
Merged
Plugin: Remove wp-editor-font stylesheet override #14176
aduth
force-pushed the
remove/replace-editor
branch
2 times, most recently
from
e6f47f1
to
44351ed
Mar 1, 2019
aduth
requested review from
nerrad,
ntwb and
talldan
as
code owners
Mar 1, 2019
aduth
changed the title
WIP: Plugin: Remove replace_editor filter, extend core editor
Plugin: Remove replace_editor filter, extend core editor
Mar 1, 2019
aduth
removed
the
[Status] In Progress
label
Mar 1, 2019
aduth
force-pushed the
remove/replace-editor
branch
from
225d2f6
to
a9df08f
Mar 5, 2019
This comment has been minimized.
This comment has been minimized.
Build is green now For what it's worth, I was having some issues with intermittent failures for the new tags end-to-end tests introduced in #13129 (cc @jorgefilipecosta). It should have been improved with #14219, so I might think it could have just been some caching problem. |
aduth
added a commit
that referenced
this pull request
Mar 6, 2019
aduth
force-pushed the
remove/replace-editor
branch
from
d9a4482
to
5b77a48
Mar 6, 2019
aduth
referenced this pull request
Mar 7, 2019
Merged
If a more recent revision/autosave exists, store its state on editor setup #7945
gziolo
added
the
Good First Review
label
Mar 8, 2019
aduth
force-pushed the
remove/replace-editor
branch
from
5b77a48
to
e3a0dd5
Mar 12, 2019
This comment has been minimized.
This comment has been minimized.
@jorgefilipecosta Can you please review this in mind of rebased refactor of widgets interoperability, per changes of #13511. |
aduth
requested a review
from
jorgefilipecosta
Mar 12, 2019
jorgefilipecosta
reviewed
Mar 13, 2019
I did a set of tests with legacy widgets (including JavaScript ones), and I did not notice any difference of behavior in this version when compared with the previous one. Thank you for applying these changes that isolate the legacy widget mechanism I also did some tests with metaboxes and everything worked as before. I left a comment regarding a dependency removal that I did not understand but other than that the changes look good to me. |
@@ -299,7 +299,7 @@ function gutenberg_register_scripts_and_styles() { | |||
gutenberg_override_style( | |||
'wp-block-library', | |||
gutenberg_url( 'build/block-library/style.css' ), | |||
current_theme_supports( 'wp-block-styles' ) ? array( 'wp-block-library-theme' ) : array(), |
This comment has been minimized.
This comment has been minimized.
jorgefilipecosta
Mar 13, 2019
Member
I'm not understanding the reason for this change. I think 'wp-block-styles' should still depend on 'wp-block-library-theme' if the theme supports them.
gutenberg_override_style calls wp_register_style with the new dependencies so even if this dependency was set in core as we are registering it again we still need to pass it.
This comment has been minimized.
This comment has been minimized.
youknowriad
Mar 13, 2019
Contributor
I have vague memories that it's done in a different way in Core and this might align both approaches. The thing is, it's not possible to call current_theme_supports
in the script loader in Core.
This comment has been minimized.
This comment has been minimized.
aduth
Mar 13, 2019
Author
Member
Yes, there's a bit more of an explanation in in the extended comment description for 2282ee4 . It still exists, but it's manually enqueued in core's implementation of the block scripts and styles function:
You can confirm this adding the following snippet somewhere in a theme which adds support for wp-block-styles
(e.g. Twentynineteen):
add_action( 'enqueue_block_assets', function() {
var_export( current_theme_supports( 'wp-block-styles' ) );
var_export( wp_style_is( 'wp-block-library-theme', 'enqueued' ) );
exit;
} );
Should display "truetrue" on the editor screen.
This comment has been minimized.
This comment has been minimized.
aduth
added some commits
Mar 1, 2019
aduth
force-pushed the
remove/replace-editor
branch
from
e3a0dd5
to
c31f85d
Mar 13, 2019
This comment has been minimized.
This comment has been minimized.
I did another force-push since it seemed Travis became stuck again. |
jorgefilipecosta
approved these changes
Mar 13, 2019
In think we should merge this soon so we have more time to test. In my tests I did not found any regression and the changes make sense to me (althougth I dont' have deep knowlodge in some of the areas). Thank you for this changes and improvements |
This comment has been minimized.
This comment has been minimized.
Thanks for the reviews @jorgefilipecosta |
aduth commentedJan 29, 2019
•
edited
Related: #11015
This pull request seeks to eliminate Gutenberg's
replace_editor
feature, instead allowing the default core block editor to load, changing Gutenberg's behavior to instead extend the core block editor and replace the core script handles with the Gutenberg latest versions.Tasks separated out:
gutenberg_add_admin_body_class
(#13572)editor-styles.css
to editor settings by filter. (#13625)_wpLoadGutenbergEditor
,gutenberg
theme supports (#14144)Needs confirmation as core aligned:
In fixing #5667, Gutenberg filtersuser_can_richedit
as always true in the context of the block editor. Was this implemented in core?Does Gutenberg still need to extend / replace thestyles
property from the block editor settings?Gutenberg's heartbeat-to-hooks proxying must be implemented in coreConfirm whether core implemented the "Screen Options" hiding equivalent to Gutenberg'sscreen_options_show_screen
filtering