Automattic / gutenberg-ramp

Control conditions under which Gutenberg loads - either from your theme code or from a UI
https://wordpress.org/plugins/gutenberg-ramp/
76 stars 15 forks source link

Make Ramp + Classic Editor play nicer together #73

Open maevelander opened 5 years ago

maevelander commented 5 years ago

Running Ramp + Classic Editor plugins together (any version combos) yields quirky results. The behaviour itself is ok. But the UI labels cause confusion.

Classic Editor UI image

With the first option selected - "Replace the Block editor with the Classic editor" - Classic Editor overrides Ramp settings.

With the second option selected - "Use the Block editor by default and include optional links back to the Classic editor" - Ramp settings override Classic Editor.

An interesting side effect of this is that it allows a user to control default loading behaviour with Ramp, but utilise Classic Editor's second option to provide a fallback for editors. This is similar to the requested behaviour described in Issue #65

Proposed Solution Leave the behaviour as-is, but change the Classic Editor labels via filter to make the behaviour clear. This would require Classic Editor plugin to place the current text in a variable that can be filtered to change to custom text by Ramp.

@justnorris @azaozz Any thoughts on this?

azaozz commented 5 years ago

I'm actually planning more updates to Classic Editor now that 5.0-beta is out. Should at least wrap the code in a static class :)

Thinking to add two more options:

Of course we can add filters in Classic Editor if needed. But wondering if we should try to make Gutenberg Ramp and Classic Editor work alongside, or disable one when the other is installed? They are adding functionality that overlaps and seems conflicts like this one would happen often?

maevelander commented 5 years ago

Of course we can add filters in Classic Editor if needed. But wondering if we should try to make Gutenberg Ramp and Classic Editor work alongside, or disable one when the other is installed? They are adding functionality that overlaps and seems conflicts like this one would happen often?

Thanks for weighing in @azaozz The new features sound great. As Classic Editor plugin becomes more sophisticated, and especially if it is included with Core in some form, perhaps we should revisit the possibility of moving Ramp functionality into Classic Editor plugin?

One key consideration from VIPs side is that Ramp was created explicitly to ensure control over Gutenberg loading behaviour is not subject to the whims of editorial staff in wp-admin. That seems somewhat opposed to Classic Editor's current approach where the aim is to give everyone as much choice and options as possible? How do you see that working? cc @justnorris @pento