Review main Merged

77358[BUGFIX] Cover all CKEditor4 toolbar configurations in migration

Benjamin Kott CR +2 V +2 Expert +1036 −102 updated 01/17/23, 15:22

Commit message

CKEditor4 had several ways of defining toolbars - Basic, Advanced,
Toolbar Groups, and Toolbar References. All these cases are now covered
in the migration and updated to the CKEditor5 format.

There can only be one `toolbar` or a `toolbarGroups` definition. The
preference is `toolbarGroups` since we assume it only exists on an
incomplete migration.

Instead of mapping groups to new definitions, we are now resolving each
main and subgroup to the CKEditor4 defaults. Each item is migrated to
the CKEditor5 equivalent if one exists.

CKEditor5 allows buttons to appear multiple times in a configuration.
The migration now ensures that buttons exist once. Duplicates are
removed during the migration to reproduce the behavior of CKEditor4.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 2334

Show 59 earlier messages
  1. Benjamin Kott uploaded patch set 1 01/11/23, 16:07

  2. core-ci voted on patch set 1 V -1 01/11/23, 16:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35702

  3. Benjamin Kott uploaded patch set 2 V -1 01/12/23, 07:39

  4. core-ci voted on patch set 2 V -1 01/12/23, 07:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35715

  5. Benjamin Kott uploaded patch set 3 V -1 01/12/23, 15:06

  6. core-ci voted on patch set 3 V -1 01/12/23, 15:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35728

  7. Benjamin Kott uploaded patch set 4 V -1 01/13/23, 08:21

  8. core-ci voted on patch set 4 V -1 01/13/23, 08:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35744

  9. Andreas Kienast commented on patch set 4 01/13/23, 09:05

    CKEditor5Migrator.php:133

    prefer

    CKEditor5Migrator.php:137

    nitpick: combine both unset() calls into a single invocation

    CKEditor5Migrator.php:447

    $this->configuration['wordCount']['displayCharacters'] ?? true

    CKEditor5Migrator.php:448

    $this->configuration['wordCount']['displayWords'] ?? true
  1. Frank Nägler commented on patch set 4 CR -1 01/13/23, 09:10

    CKEditor5MigratorTest.php:179

    - === | , Benji will check that
  2. Benjamin Kott uploaded patch set 5 CR -1 V -1 01/13/23, 09:13

  3. Benjamin Kott uploaded patch set 6 01/13/23, 09:14

  4. Benjamin Kott uploaded patch set 7 01/13/23, 09:17

  5. Benjamin Kott commented on patch set 4 01/13/23, 09:17

    CKEditor5Migrator.php:133 Reply

    Done

    CKEditor5Migrator.php:137 Reply

    Done

    CKEditor5Migrator.php:447 Reply

    Done

    CKEditor5Migrator.php:448 Reply

    Done
  6. Benjamin Kott commented on patch set 7 01/13/23, 09:17

    CKEditor5MigratorTest.php:179 Reply

    Done
  7. Frank Nägler voted on patch set 7 V +1 CR +1 01/13/23, 09:22

  8. core-ci voted on patch set 5 V -1 01/13/23, 09:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35748

  9. core-ci voted on patch set 7 V -1 01/13/23, 09:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35750

  10. core-ci voted on patch set 6 V -1 01/13/23, 09:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35749

  11. Benjamin Kott uploaded patch set 8 CR +1 V +1 01/16/23, 11:13

  12. core-ci voted on patch set 8 V -1 01/16/23, 11:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35846

  13. Benjamin Kott uploaded patch set 9 V -1 01/16/23, 12:50

  14. core-ci voted on patch set 9 V +1 01/16/23, 12:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35848

  15. Benjamin Kott uploaded patch set 10 V +1 01/16/23, 15:18

  16. core-ci voted on patch set 10 V +1 01/16/23, 15:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35857

  17. Josef Glatz commented on patch set 10 01/17/23, 09:05

    Benji, can you explain how this patch can be tested the easiest way? I also wonder if I should test it against real world scenarios?!
  18. Benjamin Kott commented on patch set 10 01/17/23, 09:37

    Reply

    - load CKEditor4 toolbar definitions from core (full, minimal, default) - load Bootstrap Package toolbar definitions - load CKEditor5 toolbar definitions from core (full, minimal, default) - Custom Config https://ckeditor.com/latest/samples/toolbarconfigurator/index.html & https://ckeditor.com/docs/ckeditor4/latest/features/toolbarconcepts.html#item-by-item-configuration Remember not all buttons can be migrated, some are just dropped See BUTTON_MAP in CKEditor5Migrator In general all cases are covered in the tests.
  19. Benni Mack voted on patch set 10 V +1 CR +1 01/17/23, 13:43

  20. Andreas Kienast commented on patch set 10 CR -1 01/17/23, 14:58

    on it
  21. Andreas Kienast uploaded patch set 11 CR +1 V +1 01/17/23, 15:04

  22. Andreas Kienast voted on patch set 11 CR +1 01/17/23, 15:04

  23. core-ci voted on patch set 11 V +1 01/17/23, 15:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35973

  24. Benni Mack voted on patch set 11 V +2 CR +2 01/17/23, 15:22

  25. Benni Mack merged patch set 12 01/17/23, 15:22