Review main Merged

83048[BUGFIX] Preserve ordering of prefixed CKEditor5 CSS stylesheets

Benjamin Franzke CR +2 V +2 Easy +22 −12 updated 02/23/24, 09:22

Commit message

When CKEditor5 `contentsCss` configuration options references multiple
CSS, respective `fetch()` requests may finish in non-sequential order,
depending on server load and file size, causing intended CSS ordering
to break.

Ensure sequential ordering by waiting for all promises to be settled
via `Promise.allSettled()`.
It is guaranteed to return the promise status and values "in the order
of the promises passed, regardless of completion order":
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled#return_value

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Markus Klein +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Jakub Zgirski +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 89

  1. Benjamin Franzke uploaded patch set 1 02/20/24, 15:32

  2. core-ci voted on patch set 1 V +1 02/20/24, 15:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53384

  3. Markus Klein voted on patch set 1 CR +1 02/20/24, 15:43

  4. Andreas Kienast voted on patch set 1 CR +1 02/20/24, 16:04

  5. Jakub Zgirski commented on patch set 1 V +1 02/21/24, 08:01

    I've tested it on affected T3 instance and it works.
  6. Benjamin Franzke commented on patch set 1 02/23/24, 08:32

    @a.fernandez@scripting-base.de *hint hint*, can be verfied with: ``` contentsCss: - https://demos.bnf.dev/slow-css/slowww.css - https://demos.bnf.dev/slow-css/fast.css ``` `slowww.css` is delayed by 2 seconds. Without the patch the RTE font will be red, with the patch it is blue (as defined in fast.css). Requires connect-src CSP via typo3/sysext/backend/Configuration/ContentSecurityPolicies.php ``` new Mutation( MutationMode::Extend, Directive::ConnectSrc, new UriValue('demos.bnf.dev') ), ```
  7. Andreas Kienast voted on patch set 1 V +1 02/23/24, 09:11

  8. Benjamin Franzke commented on patch set 1 CR +2 V +2 02/23/24, 09:13

    Reply

    Thanks.
  9. Benjamin Franzke merged patch set 2 02/23/24, 09:22