Review main Merged

67663[TASK] Drop unneeded renderElement from lit-helper

Benjamin Franzke CR +2 V +2 Easy +26 −13 updated 02/08/21, 17:46

Commit message

renderElement() was added in patchset 2 of #93446.
The code was then refactored to use renderHTML, but the method was
forgotten to be removed in the final patchset.

Now, the intention of the mentioned patchset 2 was to render nodes
directly to the DOM in PageTreeDragHandler, instead of rendering to
a temporary element, just to export and re-import as HTML string
with jQuery/innerHTML.

Therefore PageTreeDragHandler is now refactored to a new,
(internal) method renderNodes() which allows the returned
nodes to be directly attached to the document.

Also, while at it, all other lit-helper methods are marked as
internal as well, as they are still subject to change:
 * `renderHTML()` is only needed when mixing traditional jQuery
   rendering and lit-html (same as for the new `renderNodes()`.)
 * The `icon()` method could likely be replaced by a custom
   <typo3-backend-icon> component
 * `lll()` is only of use for globally available language identifiers
   (which are added via inline JS)  So this is also likely to change
   when more backend modules start to use lit-html/LitElement.

Review

  • Code review CR +2

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

  • Verified V +2

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

Issues 2

Files 4