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):
- Support for handling the
element in the General HTML Support feature which unblocks #3256566: [upstream] <style> tag support in GHS - A solution for how to downcast a table to table>caption which unblocks #3230230: Enable table captions; override CKE5's default downcast to generate <table><caption></table> instead of <figure><table><figcaption></figure>
Proposed resolution
core/package.jsoncd coreyarn installyarn run vendor-updateyarn run build:ckeditor5yarn 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.| Comment | File | Size | Author |
|---|---|---|---|
| #20 | Screen Shot 2022-03-12 at 0.02.08.png | 163.17 KB | lauriii |
| #16 | cke5-9.3.x-no-vendor.txt | 106.9 KB | xjm |
| #16 | cke5-9.4.x-no-vendor.txt | 115.97 KB | xjm |
| #13 | cke5-10.0.x-no-vendor.patch | 115.82 KB | xjm |
| #5 | 3269064-5-d93.patch | 2.25 MB | lauriii |
Comments
Comment #2
lauriiiComment #3
lauriiiLet's see how testbot likes this.
Comment #4
wim leers🤞
Comment #5
lauriii#3 had few packages accidentally built with dev built tool. Here's a new patch with prod built files.
Comment #6
wim leersThat 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:
<style>is now retained:→ and this works in Full HTML out of the box, and in Basic HTML it works after explicitly allowing
<style>⇒ #3256566: [upstream] <style> tag support in GHS is fixed once this lands!
<table><caption>will require the newPlainTableOutputplugin to be added — let's leave that for #3230230: Enable table captions; override CKE5's default downcast to generate <table><caption></table> instead of <figure><table><figcaption></figure>.This is definitely good to go! 🚀
Comment #7
catchI'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..
Comment #8
lauriii@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).
Comment #9
catch@lauriii the committer hooks use the core script if it's available
Comment #10
lauriiiWondering if there's another reason why it's only happening locally then 🤔
Comment #11
wim leers@catch That output is for
vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css, not in CKE5… 😅Comment #12
xjm@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_modulesand re-runningyarn installwhenever you switch branches?Comment #13
xjmFor 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.jsdocandcore/modules/ckeditor5/js/build/drupalMedia.jsare 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-wordsof 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. :)Comment #14
xjmAside, do all the billionty constraints in
core/package.jsonhave to be changed by hand to create the update?Comment #15
xjmGiven 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.
Comment #16
xjmComment #17
xjmI 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.
Comment #18
xjmWhen I follow the IS instructions locally, I don't get the changes to
ckeditor5.types.jsdoc. 🤔Comment #19
xjmOK too many questions; going to wait on committing this until I can discuss the above things.
Comment #20
lauriiiAdded 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....
Comment #21
xjmThanks @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-typesis 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.
Comment #25
xjmCommitted to 10.0.x, 9.4.x, and 9.3.x. Thanks!
Marking NW for the followups.
Comment #26
lauriiiI 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:ckeditor5is for. We could potentially include it as part of theyarn vendor-updatebut at the moment that command is only updatingassets/vendorfiles, not files in specific modules.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).
Comment #27
wim leersClosed #3256566: [upstream] <style> tag support in GHS and unblocked #3230230: Enable table captions; override CKE5's default downcast to generate <table><caption></table> instead of <figure><table><figcaption></figure>.
Comment #28
xjm@lauriii This document is the place to update:
https://www.drupal.org/about/core/policies/core-change-policies/frontend...
So far I added:
...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.
Comment #29
lauriiiAdded 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.
Comment #30
lauriiiReverted 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.
Comment #33
xjmComment #34
xjmActually, 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.