-
Notifications
You must be signed in to change notification settings - Fork 117
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
[WIP] Upgrade CkEditor to v41 #9212
base: master
Are you sure you want to change the base?
Conversation
…itor plugins This upgrades the package versions of CkEditor and all its first-party plugins to latest, and deals with some webpack config and ckeditor plugin config changes this requires. It also enables Typescript for CkEditor plugins (but doesn't yet make tsc autorun on the plugins the way it does for the main repo, and doesn't yet pull the trigger on converting any particular plugins).
Without this ts-loader uses whatever tsc it finds in the environment, which is an unpredictable version.
It's possible that some things like this are actually just API changes between major versions (though obviously also possible that we're just passing in invalid things now, too). |
…o upgrade-ckeditor
This broke collaborative editing, somehow, in a very hard to trace way. See: https://lworg.slack.com/archives/C75BWSNBH/p1715886953045709
…o upgrade-ckeditor
Looks like this broke Cypress tests somehow. It doesn't correspond to anything particularly broken on the client, and the classname it looks for to find CkEditor isntances is still used. Hrm. Going to try this with Playwright. |
…r watchdog replacmeent
Grumble, failure appears only in Cypress, but looks real-enough that it needs fixing. |
Try merging master and see it occurs on playwright |
…o upgrade-ckeditor
This upgrades CkEditor to v41. The basics are working including collaborative editing, but I need to test dialogues, LaTeX, and our other plugins more. There is one mysterious console error "collection-add-invalid-id".
In addition to the version upgrade, this enables both Typescript and eslint checking for our CkEditor plugins. In order to get Typescript to pass, I put in a lot of casts to "AnyBecauseTodo", and the stricter Typescript settings (
noImplicitAny
,strictNullChecks
) are not yet turned on. I used theckeditor5
eslint preset merged with our main repo preset, then turned off a lot of rules that the ckeditor5 preset had added (see comments in.esintrc.js
).Some of those casts to AnyBecauseTodo are covering things that look like they might be crash-bugs in our plugins. In particular, there are things that traverse the document and expect to find a particular element type (but don't check that they found what they expected), and event handlers that use their sender (but don't check that the event sender is what they expected). There were also a few functions that straight up passed completely incorrect arguments, eg calls to
toWidget
passing the string"div"
in the place where an options object should be. I expect that tightening this up will improve the stability of our editor.┆Issue is synchronized with this Asana task by Unito