Update CKEditor 5 to 37.1.0

Created on 20 April 2023, over 1 year ago
Updated 26 April 2023, over 1 year ago

Problem/Motivation

https://github.com/ckeditor/ckeditor5/releases/tag/v37.0.0
https://github.com/ckeditor/ckeditor5/releases/tag/v37.0.1
https://github.com/ckeditor/ckeditor5/releases/tag/v37.1.0

👇 Highlights:

  • Fully converted to TypeScript — does not affect Drupal core at all, but means a better DX for plugin developers 👍 This is something they've been working on for a very long time, and it will enable them to iterate faster in the future, with more confidence that no BC breaks are introduced! 🚀
  • 🐛 [upstream] CKEditor 5 mangles table structure Fixed should be fixed — at least partially (see #3339763-11: [upstream] CKEditor 5 mangles table structure ).
  • 37.1.0 made a change to <span lang="fr">Bonjour</span> — that'd have been italic until this release. This may require us adding .ck-content span[lang] { font-style: italic; } to core/modules/ckeditor5/css/language.css … or not. Because we already have this in place:
    .ck-content [lang] {
      outline: 1px dotted gray;
    }
    

    Arguably this is actually a net improvement, and avoids user confusion — that's also why this was done in the first place: https://github.com/ckeditor/ckeditor5/issues/12672.

    That needs a decision from a front-end framework manager.

  • Many bugfixes!

Steps to reproduce

Proposed resolution

  1. Update core/package.json
  2. cd core
  3. yarn install
  4. yarn build
  5. yarn build:ckeditor5-types

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CKEditor has been updated to 37.1.0

📌 Task
Status

Fixed

Version

10.1

Component
CKEditor 5 

Last updated about 18 hours ago

Created by

🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @wim leers
  • Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Not currently mergeable.
  • @wim-leers opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    29,291 pass
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Analyzed the release notes. AFAICT we need manual testing for:

    1. Table ("Table") plugin: 🐛 [upstream] CKEditor 5 mangles table structure Fixed — verify if it is fixed in its entirety or partially
    2. TextPartLanguage ("Language") plugin: 37.1.0 made a change to <span lang="fr">Bonjour</span> — that'd have been italic until this release. This may require us adding .ck-content span[lang] { font-style: italic; } to core/modules/ckeditor5/css/language.css … or not. Because we already have this in place:
      .ck-content [lang] {
        outline: 1px dotted gray;
      }
      

      Arguably this is actually a net improvement, and avoids user confusion — that's also why this was done in the first place: https://github.com/ckeditor/ckeditor5/issues/12672.

      That needs a decision from a front-end framework manager. Tagging accordingly.

  • 🇫🇮Finland lauriii Finland

    I think we want to refrain from making the text italic to benefit from the UX fix. It looks like we have an alternative affordance in place already so that's good 👍

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    I agree the outline is an improvement as it is visually distinguishing the [lang] use in a manner that won't be confused with intentionally italicized text.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Excellent, thanks both of you! Then also untagging .

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Applied the MR locally and following 🐛 [upstream] CKEditor 5 mangles table structure Fixed

    Pasted

    <table>
      <tr>
        <th>Header</th>
        <th>Header</th>
        <th>Header</th>
      </tr>
      <tr>
        <th>Header</th>
        <td>Data</td>
        <td>Data</td>
      </tr>
    </table>
    

    and got

    <table>
        <tbody>
            <tr>
                <th>
                    Header
                </th>
                <th>
                    Header
                </th>
                <th>
                    Header
                </th>
            </tr>
            <tr>
                <th>
                    Header
                </th>
                <th>
                    Data
                </th>
                <th>
                    Data
                </th>
            </tr>
        </tbody>
    </table>
    

    Gross

    Applied the patch and tried again but this time I got

    <table>
        <thead>
            <tr>
                <th>
                    Header
                </th>
                <th>
                    Header
                </th>
                <th>
                    Header
                </th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th>
                    Header
                </th>
                <td>
                    Data
                </td>
                <td>
                    Data
                </td>
            </tr>
        </tbody>
    </table>
    

    Which seems correct as the th's were wrapped in a thead vs tbody like before.

    Spot checked some other plugins but didn't notice anything.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    29,304 pass
    • catch committed 8e474357 on 10.1.x
      Issue #3355358 by Wim Leers, lauriii, bnjmnm, smustgrave: Update...
  • Status changed to Fixed over 1 year ago
  • 🇬🇧United Kingdom catch

    Let's get this in before the alpha so it gets as much testing as possible.

    Committed/pushed to 10.1.x, thanks!

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Thanks, @smustgrave & @catch!

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

Production build 0.71.5 2024