-
Notifications
You must be signed in to change notification settings - Fork 67
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
Migrate demos to new installation methods #38
Conversation
ec529a5
to
9fb007c
Compare
ai-assistant/index.ts
Outdated
} | ||
|
||
// AI Assistant requires additional configuration. | ||
// See https://ckeditor.com/docs/ckeditor5/40.2.0/features/ai-assistant/ai-assistant-integration.html#integrating-with-the-proxy-endpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why link to 40.2.0's docs? If it ws this way in the docs, it's probably some outdated link and should use "latest"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Fixed in cfbf7d4.
I think we need to move forward with all of them anyway and just comment those bits out for now. That's what I did in the feature-rich initially. The biggest problem is the wproofreader demo :| Because it makes no sense without WSC :D Maybe we could keep it migrated on another branch and once we have WSC's release confirmed, merge it to the main one? In other words: to be ready to complete the migration. |
Yes, I guess both WProofreader and Mathtype demos doesn't make sense without those external plugins. For the rest I can migrate commenting out 3rd-party plugins. Or I can prepare separate branch migrating all demos with external plugins which will be waiting to be merged. So we have still all demos fully functional (and fully featured) on
Sure, that would work 👍 The question from me is if we want to merge this branch to |
9df8fc9
to
f82d61e
Compare
I'm putting this on review and rest of demos (with external plugins), I'll cover in separate branch as mentioned:
I'll keep each demo update as separate commit as here, so we can cherry-pick if needed - Done in #40. |
cfbf7d4
to
7b7dbd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks great 🎉 but after recent decision of changing the css file names please change all imports from:
import 'ckeditor5/index.css';
import 'ckeditor5-premium-features/index.css';
into
import 'ckeditor5/ckeditor5.css';
import 'ckeditor5-premium-features/ckeditor5-premium-features.css';
Co-authored-by: Piotr Szczęśniak <[email protected]>
@pszczesniak There is a follow-up PR (covering 3rd-party extensions) - #40, where this had been fixed for all samples. I think we would merge them into one soon (or sync) and then you could maybe just review #40 as this will be redundant. |
Closing in favor of #40, all the work will be concluded there. |
This PR migrates demos to use new installation methods (see ckeditor/ckeditor5#15502).
The main change is getting rid of webpack, replacing it with vite, and using
ckeditor5
andckeditor5-premium-features
packages only (nightly
builds ATM). I took inspiration from https://github.com/ckeditor/new-installation-methods.Updated demos
There are few demos which cannot be migrated now due to having 3rd-party plugins which do not support NIM yet. Those are:
There was one also demo with custom code where making TS happy was a bit tricky:
Other minor changes
I made few other minor changes in demo packages itself:
ckeditor5*
packages asdevDeps
..main
field frompackage.json
(I don't think it's needed for our usage).Differences in the code
There were some minor changes I noticed when switching to new packages. Not sure if related directly to NIM, switching to TS or demos were a bit outdated. Still noted it down, might be useful to check if any of these could be a part of migration guides:
UploadAdapter
was imported and used as plugin. Now, it is TS interface and specific implementation needs to be used, e.g.CKFinderUploadAdapter
orCloudServicesUploadAdapter
for Easy Image (at least that's my understanding).{ "content": ... }
is now{ translations: lang }
(whereimport lang from 'ckeditor5/translations/ja.js';
).cloudServices
are nowCloudServices
,DocumentList
->List
,DocumentListProperites
->ListProperites
Tests
I slightly reworked how tests are run to support old webpack builds (not yet migrated demos) and NIM. For webpack it stayed the same. For NIM, all demos are build and then copied to single tmp
builds
directory. This wayhttp-server
could be run there and cypress can quickly visit and validate each demo (the same way it is done for webpack builds). See 94e193d.Test run longer now, because I also added missing demos which were not tested before.(Not really, it was Circle CI maintenance yesterday which made runs longer).CKEditor 5 demos webpage
Most likely https://ckeditor.com/ckeditor-5/demo/ are not build directly from code from this repo, but I'm waiting for confirmation.Confirmed that this repo is only used as public code samples linked from CKE5 demo page and not used to built it.