Review main Abandoned

67674[WIP][TASK] Migrate backend context menu to lit-html

Benjamin Franzke CR 0 V 0 Expert +1848 −395 updated 02/09/21, 09:59

Commit message

Migrates backend UI component `ContextMenu` to be based on `lit-html`
and `lit-element`.

This also marks the `record` property and fetch() and show() methods as public,
as LegacyTree and SvgTree use these as API.

The ContextMenu is mirated to use shadow dom, that means no global
styles are used, just local ones.
Therefore the bootstrap classes are being removed and a new
IconElement custom component is added which allows icons to be
displayed within a shadow root.

Colors and custom sizes can be applied to this IconElement via
the typo3-backend-icon CSS color property:

  typo3-backend-icon[identifier=status-dialog-information] {
    color:#6daae0;
    // An explicitly set font-size will be used as icon width and height
    // @todo: if we do not `reflect` the size attribute, we
    // could also implicitly inherit font size, if not
    // explicit size attribute is given
    font-size: 20px;
  }

TODO:
 * Include something https://www.npmjs.com/package/minify-html-literals
   as additonal minifier, as terser can't minify inline html and css
 * Fix submenus
 * Move positioning code into ContextMenuElement
 * Handle context menu visibility as element state

 * Move the new IconElement into a separate patch
   (then probably drop lit-helper.icon, as that has a EXT:core
   to EXT:backend dependency)

Resolves: #93103
Releases: master
Change-Id: I227f44d4530d303b19efc68a077e449efe57b1e9

[WIP] SVG based font-awesome v4 icons

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Files 28

Show 8 more files