Review main Merged

70488[TASK] Reduce inline JavaScript in Page Module Paste logic

Benni Mack CR +2 V +2 Hard +85 −238 updated 08/13/21, 09:47

Commit message

When having a content element on the clipboard (normal mode)
the page module dynamically shows paste icons
everywhere.

This change centralizes the generation of the Paste icons
into JavaScript, so the inline javascript usage of "top.*"
functionality to park code somewhere has been removed,
and the actual items are generated in JavaScript.

In addition, as this code is only affecting the page module
when a tt_content element is on the clipboard, the Paste.js
JS module is only loaded when appropriate, thus reducing
the actual loading time for "regular" visits on the Page Module.

The icon in the paste button is now loaded via a native web component,
and only necessary logic is used in the Paste JS module.

The outer rendering for the Page Module has been simplified,
moving this functionality all into PageLayoutController,
reducing cross-dependencies between the PageLayout* classes.

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 1

Files 6