84679[BUGFIX] Allow to use CKEditor style definitions with an empty class
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Benjamin Franzke +1
- Benni Mack +1
-
Verified V +2 Done
- Garvin Hicking +2
- Benjamin Franzke +1
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 4
Review log 2231
Show 46 earlier messages
-
Garvin Hicking uploaded patch set 1 06/13/24, 08:21
-
Garvin Hicking commented on patch set 1 06/13/24, 08:22
(Slack Thread: https://typo3.slack.com/archives/C03AM9R17/p1718085246741089) -
core-ci voted on patch set 1 V -1 06/13/24, 08:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59423
-
Garvin Hicking uploaded patch set 2
V -106/13/24, 10:05cgl -
core-ci voted on patch set 2 V +1 06/13/24, 10:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59455
-
Harald Witt voted on patch set 2 CR +1 06/13/24, 11:10
-
Harald Witt voted on patch set 2 V +1 06/13/24, 11:11
-
Mogens Fiebrandt voted on patch set 2 CR +1 V +1 06/29/24, 11:07
-
Stefan Bürk commented on patch set 2 CR -1 06/29/24, 13:29
CKEditor5Migrator.php:963Would it work when unsetting the classes key if it is an empty array ? ``` if ($definition['classes'] === []) { unset($definition['classes']); } ``` Providing a empty string as "class" looks wrong in all ways. Can you check if unsetting would be a (nicer) working fix here instead ? -
Garvin Hicking commented on patch set 2 06/29/24, 16:44
CKEditor5Migrator.php:963ReplyIf I unset the 'classes' key, there are several places in the code that currently expect 'classes' to always be an array (line 1001, 627, 630, 729, 993). I'm thinking fixing it everywhere there to deal with the array key not existing would introduce further regression issues. Fixing this with an empty string array key seems to be the safer bet here, IMO. -
Garvin Hicking uploaded patch set 3
CR +1V +107/16/24, 15:38rework -
core-ci voted on patch set 3 V +1 07/16/24, 15:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61646
-
Garvin Hicking commented on patch set 3 07/16/24, 15:50
CKEditor5Migrator.php:963ReplyOK, with https://forge.typo3.org/issues/103499 I did some more digging: https://ckeditor.com/docs/ckeditor5/latest/api/module_style_styleconfig-StyleDefinition.html this defines "classes" to be an array. It cannot be missing (then the CKEditor style dropdown no longer works). So we cannot unset it, even if we address all the references to the attribute in the CKMigrator Code. Also, setting this attribute to "true" or "false" or "null" (without quotes) just leads to CKEditor using `<code class="true">`, `<code class="false">` and `<code class="null">` there. Also, using `['']` actually leads to `<code class="">` getting inserted. But I do not see a way around this with current CKEditor5, this would need reporting as a CKEditor5 bug presumably. I've asked this as a question (https://github.com/ckeditor/ckeditor5/issues/16737) for now, but guess we will need an interrim solution like outlined here. -
Garvin Hicking rebased onto patch set 4
V +107/31/24, 08:08 -
core-ci voted on patch set 4 V +1 07/31/24, 08:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62502
-
Garvin Hicking commented on patch set 4 08/02/24, 13:18
CKEditor5Migrator.php:963Reply(Marking this as resolved because I'm fairly certain there'll be no movement from CKEditor5 on this as an alternative) -
Garvin Hicking rebased onto patch set 5
V +108/02/24, 13:18 -
core-ci voted on patch set 5 V +1 08/02/24, 13:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62731
-
Simon Schaufelberger uploaded patch set 6
V +108/22/24, 23:05 -
core-ci voted on patch set 6 V -1 08/22/24, 23:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64026
-
Simon Schaufelberger rebased onto patch set 7
V -108/22/24, 23:12 -
core-ci voted on patch set 7 V +1 08/22/24, 23:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64027
-
Garvin Hicking uploaded patch set 8
V +108/29/24, 07:32 -
core-ci voted on patch set 8 V +1 08/29/24, 07:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64460
-
Benjamin Franzke uploaded patch set 9
V +108/29/24, 08:25 -
Benjamin Franzke commented on patch set 9 08/29/24, 08:25
I've been long very reserved about this change, but I tried to fix CKEditor5 directly (their contribution CLA process sucks and it isn't to change additionally). …but I figured – if we introduce/keep-on with custom syntax here – we should strive for the configuration format that we desire, that is: Do not specifiy empty classes array at all, but omit it. Although we're not happy with the rendering yet, this patch fixes the missing element-application, therefore I'm fine with this now. @gh@faktor-e.de I hope my change is fine with you. -
Garvin Hicking commented on patch set 9 08/29/24, 08:33
Reply
I love that alteration, I wish I came up with it. This makes the YAML lean and understandable, but "fixes" the old syntax, great. -
core-ci voted on patch set 9 V +1 08/29/24, 08:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64461
-
Benni Mack voted on patch set 9 CR +1 V +1 08/29/24, 09:23
-
Garvin Hicking commented on patch set 9 CR +2 V +2 08/29/24, 09:57
preparing backport -
Garvin Hicking merged patch set 10 08/29/24, 09:58