Part of #1989974: [meta] Clean up/improve consistency of Edit:

  • Rename the 'direct' editor to 'plaintext' editor.
  • Consistently name in-place editors, both in terms of library names as in terms of filenames.

Rationale:

  • The 'direct' editor's name is still a remnant of using Create.js. It's a nonsensical name. It's for editing plain text only, hence the name should say that.
  • The library names are also still remnants of using Create.js, that's why they contain "editorWidget" in their name, which makes zero sense today.
  • This is not an API change.
CommentFileSizeAuthor
#1 2133907-1.patch16.11 KBWim Leers
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Status: Active » Needs review
FileSize
16.11 KB

After manual testing, everything continues to work fine.

jessebeach’s picture

Status: Needs review » Reviewed & tested by the community
  1. +++ b/core/modules/edit/edit.module
    @@ -123,11 +123,11 @@ function edit_library_info() {
    -  $libraries['edit.editorWidget.direct'] = array(
    -    'title' => 'Direct in-place editor',
    +  $libraries['edit.inPlaceEditor.plainText'] = array(
    +    'title' => 'Plain text in-place editor',
    

    This is much easier to understand. The direct* and form* Editor labels always confused me.

  2. +++ b/core/modules/edit/lib/Drupal/edit/Plugin/InPlaceEditor/PlainTextEditor.php
    @@ -12,13 +12,13 @@
    -class DirectEditor extends EditorBase {
    +class PlainTextEditor extends EditorBase {
    

    Much more clear.

Lots of code doc consistency cleanups and a few label renamings. I manually tested on Simplytest.me and this patch does not introduce any behavior changes or regressions. Overall, the changes make the code easier to read and understand.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Agreed; these new labels definitely feel a lot more sensible to me.

Committed and pushed to 8.x. Thanks!

jessebeach’s picture

Issue tags: -sprint

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.