Problem/Motivation

Update to CKEditor 5 v33.0.0 in core: https://github.com/ckeditor/ckeditor5/releases/tag/v33.0.0.

Key changes we need (besides the many bugfixes we benefit from):

Proposed resolution

  1. core/package.json
  2. cd core
  3. yarn install
  4. yarn run vendor-update
  5. yarn run build:ckeditor5
  6. yarn run build:ckeditor5-types

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CKEditor 5 asset library updated to version 33.0.0.

Comments

lauriii created an issue. See original summary.

lauriii’s picture

lauriii’s picture

Status: Active » Needs review
StatusFileSize
new6.03 MB

Let's see how testbot likes this.

wim leers’s picture

Issue tags: +blocker

🤞

lauriii’s picture

StatusFileSize
new2.25 MB
new2.25 MB
new2.25 MB

#3 had few packages accidentally built with dev built tool. Here's a new patch with prod built files.

wim leers’s picture

That explains the 6 MB patch :D

Reviewing this patch as thoroughly as #3261600-29: Update to CKEditor5 v32.0.0 a few days ago…

Applied #5 and:

This is definitely good to go! 🚀

catch’s picture

Status: Reviewed & tested by the community » Needs work

I'm getting hundreds of styleint errors from the patch. Are we missing an exclusion of the ckeditor library?

This didn't happen with the previous update patch..

vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css
   2:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   3:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   4:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   5:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   6:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   7:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   8:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   9:5   ✖  Expected indentation of 2 spaces                          indentation                                   
   9:23  ✖  Expected "#F9F9F9" to be "#f9f9f9"                        color-hex-case                                
  10:5   ✖  Expected "color" to come before "background-color"        order/properties-order                        
  10:5   ✖  Expected indentation of 2 spaces                          indentation           
lauriii’s picture

@catch I think that's a problem with the committer hooks.. It doesn't fully support CKEditor 5 unlike the script in core (as can be seen that the patch is passing on DrupalCI).

catch’s picture

@lauriii the committer hooks use the core script if it's available

lauriii’s picture

Wondering if there's another reason why it's only happening locally then 🤔

wim leers’s picture

Status: Needs work » Reviewed & tested by the community

@catch That output is for vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css, not in CKE5… 😅

xjm’s picture

@catch The yarn build is clean for me too and I was able to commit it cleanly to all the branches. Are you deleting core/node_modules and re-running yarn install whenever you switch branches?

xjm’s picture

StatusFileSize
new115.82 KB

For the sake of reviewability and not crashing Chrome, here's the 10.0.x patch without the vendor changes. (I gave it the wrong extension but set it to not test so hopefully it won't.)

It looks like core/modules/ckeditor5/js/build/ckeditor5.types.jsdoc and core/modules/ckeditor5/js/build/drupalMedia.js are being updated by this build. The latter is minified so I can't review changes for it. Would there be an easy way for me to check the non-minified diff of it?

Edit: I tried a git diff --color-words of the file and it looks like only one section is actually changing, but I still can't parse out the changes all on one line. :)

xjm’s picture

Aside, do all the billionty constraints in core/package.json have to be changed by hand to create the update?

xjm’s picture

Assigned: Unassigned » xjm

Given what this is blocking I'm going to go ahead and commit it despite not knowing the answer to #13, but hopefully we can still document/address that for future updates.

xjm’s picture

StatusFileSize
new115.97 KB
new106.9 KB
xjm’s picture

Issue tags: +Needs followup

I think we need to update the frontend dev tools docs with CKEditor 5 update instructions. Right now it refers to generically "CKEditor" with what I believe are the CKEditor 4 build instructions.

xjm’s picture

When I follow the IS instructions locally, I don't get the changes to ckeditor5.types.jsdoc. 🤔

xjm’s picture

Assigned: xjm » Unassigned

OK too many questions; going to wait on committing this until I can discuss the above things.

lauriii’s picture

Issue summary: View changes
StatusFileSize
new163.17 KB

Added missing command to the IS.

#14: The constraints need to be updated manually right now.
#17: Agreed that it would be good to add the steps from IS there.

I diffed the minified file and the only changes in the minified file are caused by: https://github.com/ckeditor/ckeditor5/commit/eb544bb51d4c9656cb9e4e12e2c....

xjm’s picture

Thanks @lauriii.

I added the CKEditor 5 instructions from the IS here:
https://www.drupal.org/node/2996785/revisions/view/12567698/12581731

It could still use followup work to explain what yarn run build:ckeditor5-types is for.

Also, is it possible to include that step in the main CKEditor 5 build script? Why is it separate? Leaving tagged for followup for that too.

I'd also love documented steps to see the un-minified diff as above. :) Or even a tool in core for that; it's something we've identified as a stable blocker. But that can be a followup too.

  • xjm committed 438ec9e on 10.0.x
    Issue #3269064 by lauriii, xjm, Wim Leers: Update to CKEditor 5 v33.0.0
    

  • xjm committed 5e2c913 on 9.4.x
    Issue #3269064 by lauriii, xjm, Wim Leers: Update to CKEditor 5 v33.0.0
    

  • xjm committed 1632cb1 on 9.3.x
    Issue #3269064 by lauriii, xjm, Wim Leers: Update to CKEditor 5 v33.0.0
    
xjm’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Needs work
Issue tags: -blocker

Committed to 10.0.x, 9.4.x, and 9.3.x. Thanks!

Marking NW for the followups.

lauriii’s picture

Also, is it possible to include that step in the main CKEditor 5 build script? Why is it separate? Leaving tagged for followup for that too.

I think we want to keep it as a separate step since it only needs to be run when CKEditor 5 is being updated, not when we make changes to our plugins which yarn build:ckeditor5 is for. We could potentially include it as part of the yarn vendor-update but at the moment that command is only updating assets/vendor files, not files in specific modules.

It could still use followup work to explain what yarn run build:ckeditor5-types is for.

Where should we document it? I'd be happy to update the docs without having a specific issue for it (unless code changes are needed).

xjm’s picture

@lauriii This document is the place to update:
https://www.drupal.org/about/core/policies/core-change-policies/frontend...

So far I added:

Updating CKEditor 5

  1. Increase the package constraints for the CKEditor 5 dependencies as needed in core/package.json (all packages with the @ckeditor namespace).
  2. Perform a clean installation of core's yarn dependencies:
    cd core
    rm -rf node_modules
    yarn install
  3. Update the vendor assets: yarn run vendor-update.
  4. Run the CKEditor 5 build: yarn run build:ckeditor5.
  5. Run yarn run build:ckeditor5-types.

...but the last step should mention what that step is for/why we do it, and since it's not documentede anywhere else on the page, we also need to document it in its own section, potentially in the quick reference at the end, and/or wherever else the step might be required.

lauriii’s picture

Added explanation to that list. I don't think anyone needs to run that command outside of updating CKEditor 5, so maybe it's fine to have it explained on that list.

lauriii’s picture

Version: 9.3.x-dev » 9.4.x-dev
Status: Needs work » Fixed
Issue tags: -Needs followup

Reverted the 9.3.x because of #3269619: [upstream] CKEditor 33.0.0 list plugin not compatible with data-caption. Leaving the commit in 9.4.x and 10.0.x so that we can continue development on top of the latest version, which makes resolving #3269619: [upstream] CKEditor 33.0.0 list plugin not compatible with data-caption easier too. Opened follow-up for un-reverting #3269651: Update Drupal 9.3.x to CKEditor 5 v34.0.0 along with other un-backported issues.

@xjm I'm marking this issue as fixed but feel free to move this back in case the documentation still needs some changes.

  • lauriii committed 31c1091 on 9.3.x
    Revert "Issue #3269064 by lauriii, xjm, Wim Leers: Update to CKEditor 5...

Status: Fixed » Closed (fixed)

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

xjm’s picture

xjm’s picture

Issue tags: -9.4.0 release notes

Actually, since we ended up backporting this to 9.3.x and 9.4.x hasn't had an alpha yet, it doesn't need to go in the 9.4.x release notes.