Skip to content
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

Ignore "Disable visual editor" setting #5670

Merged
merged 1 commit into from
Mar 20, 2018
Merged

Conversation

mcsf
Copy link
Contributor

@mcsf mcsf commented Mar 16, 2018

Fixes #5667

See wp-includes/class-wp-editor's behavior around self::$this_tinymce:

https://github.com/WordPress/WordPress/blob/176a28905041fd79c439946a4ba290a87db5991f/wp-includes/class-wp-editor.php#L360

How Has This Been Tested?

Follow steps in parent issue.

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@mcsf mcsf added [Component] TinyMCE Backwards Compatibility Issues or PRs that impact backwards compatability labels Mar 16, 2018
@mcsf mcsf requested a review from mtias March 16, 2018 19:16
@mcsf mcsf force-pushed the fix/5667-missing-tinymce-dep branch from 0b21f36 to e75be7a Compare March 16, 2018 22:39
@mcsf
Copy link
Contributor Author

mcsf commented Mar 19, 2018

Related: #4634

Should Gutenberg respect the rich_editing user option?

There's room for different interpretations. This PR is concerned with avoiding the total failure to load the editor described in #5667, but further steps may be:

  • defaulting to Code view if rich_editing is false;
  • defaulting to the legacy editor altogether.

The latter is much more aggressive. The decision hinges on the what we believe are the needs that a user expresses by disabling this setting. For instance, can it signal a stronger technical imperative (e.g., no JS execution desired?) than a simple UX choice? Is a11y a factor for those who disable it? If so, can we ensure that Gutenberg's Code view fulfills these needs, thereby eschewing the cop-out of redirecting to the classic editor?

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting further improvements to considering the setting, I agree this is a good interim fix to the immediate issue 👍

@mtias mtias merged commit 1f1f49d into master Mar 20, 2018
@mtias mtias deleted the fix/5667-missing-tinymce-dep branch March 20, 2018 09:47
@aduth
Copy link
Member

aduth commented Jan 30, 2019

In considering general removals as part of #13569, it does not appear to me that something like this made its way as part of a WordPress 5.0 merge, and is unclear whether it needed to.

@mcsf
Copy link
Contributor Author

mcsf commented Jan 30, 2019

In considering general removals as part of #13569, it does not appear to me that something like this made its way as part of a WordPress 5.0 merge, and is unclear whether it needed to.

Yes, the custom filter doesn't seem to be in 5.0.

unclear whether it needed to.

Going back to the original issue, #5667, I now see that, in WP 5.0 with the Gutenberg plugin disabled, enabling user setting "disable visual editor" makes the block editor load in Code mode, with no option to switch to Visual. So it seems like the contract is honoured. I don't see any remaining action here; do you?

@aduth
Copy link
Member

aduth commented Jan 30, 2019

Looking at #12000 and #12151, it seems like the filter may be a lingering fragment from the awkwardness of the revert + reimplementation.

I don't see any remaining action here; do you?

It needs to be removed from Gutenberg, but it shouldn't require a core patch, no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loading a Classic block when visual editor is disabled in user profile
3 participants