Problem/Motivation
As a developer, when you run into an issue with CKEditor 5, in particular a plugin, all files are minified and debug can be a challenge.
For instance running into #3273510: CKEditor 5 crash when multiple alignment buttons are activated due to duplicate configuration you may want to see what is going on in aligment.js file but you can't.
It would be nice, for DX, to point at the documentation to install an unminified version.
Steps to reproduce
Try any reproduction scenario from a given CKE5 specific issue and try debugging. For instance the one given in description is a good candidate.
Proposed resolution
I suggest to add a message to the error message to point at the documentation. This really saves time as a developer.
Comment | File | Size | Author |
---|---|---|---|
#23 | 3273532-18-9.5.x.patch | 1.41 KB | Wim Leers |
#18 | 3273532-18.patch | 653 bytes | smustgrave |
| |||
#18 | interdiff-14-18.txt | 789 bytes | smustgrave |
Comments
Comment #2
Dom. CreditAttribution: Dom. as a volunteer and at ACINO commentedProviding here a demo patch for the idea.
Before:
After:
Remaining task:
Comment #3
marcvangendUsually I would be cautious to add console.log/warn/error, but since there is a console.error already, I don't think that should be a problem. Some other thoughts:
drupal.org/node/[nid]
form instead of the aliased URL.console.log()
orconsole.info()
is more appropriate.Comment #4
Dom. CreditAttribution: Dom. as a volunteer and at ACINO commented@marcvangend
Thanks a lot for review. Let me answer point by point here :
Comment #5
Wim Leers#2: love it! 🤩
Great feedback by @marcvangend, and already addressed by @Dom. — fantastic! I think there is zero chance of the link breaking because it's using the node ID, not the path alias.
This is unquestionably a DX improvement.
RTBC! (Only slightly clarified the handbook page 🤓)
Comment #6
bnjmnmThe documentation page this references outdated The
command was removed a while back. There is currently no command in core to build an unminified version.
Comment #7
Wim Leers@bnjmnm But then … wouldn't it be better to still commit this and then update the handbook page later? That would at least point users in a helpful direction? 😊
Comment #8
Wim LeersAlso, are you sure? @Dom. actually used this earlier today. And it sure seems to check out 🤓
Based on what I can see, it seems to confirm @Dom.'s experience:
Comment #9
bnjmnmIf it pointed them in a helpful direction, yes. In this case they're directed to an outdated documentation page that has objectively incorrect information. It's bad enough this page is up to begin with. If someone is directed there intentionally, it gives them all the more reason to believe that something is wrong on their end, not the documentation. They could waste time trying to get a feature to work that doesn't actually exist.
Comment #10
bnjmnmOh this is for installing an entire separate CKEditor, not an unminified version in core. That's my mistake.
At one when this was in contrib we were doing more direct interaction with
dll
and could create an unminified instance pretty easily. It kinda looked like that so I decided it was that 🤭. If this process works with the core plugins it sounds fine, especially if it benefits the dev days participation I've been pleased to see happening.Comment #13
smustgrave CreditAttribution: smustgrave at Mobomo commentedNeeds reroll for 10.1
Comment #14
smustgrave CreditAttribution: smustgrave at Mobomo commentedRerolled for 10
Comment #16
smustgrave CreditAttribution: smustgrave at Mobomo commentedThink this is a random failure.
Comment #17
nod_Why the string split? it's not usual to do that in the JS
Comment #18
smustgrave CreditAttribution: smustgrave at Mobomo commentedThought I would be dinged for the 80 character limit but think I got that mixed up. Uploaded a patch with no breaks.
Comment #19
nod_all good for me :)
Comment #20
alexpottCommitted and pushed 58b45dcb6f to 10.1.x and 8bed000244 to 10.0.x. Thanks!
We could backport this to Drupal 9 if people want to.
Comment #23
Wim LeersLet's do that. Many people won't be jumping to 10, but will be making the small step to 9.5, and hence will be developing/testing CKEditor 5 in there, so … 🙏
Comment #24
alexpottCommitted dfacc85 and pushed to 9.5.x. Thanks!