Review main Abandoned

79093[BUGFIX] Load all backend stylesheets for typo3-backend-icon

Nikita Hovratov CR 0 V 0 Easy +23 −12 updated 07/29/23, 21:13

Commit message

As custom IconProvider exist, all registered backend stylesheets need to
be injected into the typo3-backend-icon web component. Oftentimes they
come with custom markup and css classes, which are styled through
globally registered stylesheets in
`$GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']`. One example are
custom FontAwesome icons for content element preview icons.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 7

Review log 59

  1. Nikita Hovratov uploaded patch set 1 05/19/23, 13:34

  2. Nikita Hovratov commented on patch set 1 05/19/23, 13:38

    I know this is ugly, but I don't see another solution for now. In the longrun we need to introduce a new API for specific CSS for web components instead / or in parallel to global CSS for the backend. Else, it won't be possible to customize the TYPO3 backend as before, when everything becomes a web component.
  3. core-ci voted on patch set 1 V -1 05/19/23, 13:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41925

  4. Nikita Hovratov uploaded patch set 2 V -1 05/19/23, 14:10

  5. core-ci voted on patch set 2 V -1 05/19/23, 14:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41927

  6. core-ci commented on patch set 2 05/19/23, 14:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41927

  7. core-ci commented on patch set 2 05/19/23, 14:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41927

  8. Oliver Hader commented on patch set 2 07/03/23, 18:04

    icon-element.ts:63 Unresolved

    This won't work with content-security-policy and `nonce=` values enabled - the nonce is stored in `window.litNonce`. The `lit-helpers.ts` have a function for using inline styles `styleTag`. Besides that (independent of CSP), creating `link` elements in ShadowDOM might lead to problems due to https://developer.mozilla.org/en-US/docs/Web/API/Document/adoptedStyleSheets#sharing_a_stylesheet_with_a_shadow_dom

    PageRenderer.php:2248 Unresolved

    This probably should be scoped for `icon-element.ts`, e.g. `iconElementStyles`...
  9. Nikita Hovratov abandoned the change 07/29/23, 21:13

    doesn't work apparently. Help of JS pro needed.