Review main Merged

77658[BUGFIX] Avoid re-paints and re-layouts in page tree on drag&drop

Andreas Kienast CR +2 V +2 Easy +17 −31 updated 02/02/23, 07:54

Commit message

When using drag&drop in the page tree, many style changes happen:

* a shadow node is rendered that is moved around
* the content within the shadow node changes depending on whether
  dropping is allowed
* CSS classes are changed

The previous implementation was not optimal in several ways:

* the nodes wrapper (aka the "tree") was updated twice which each
  `dragover` event, being expensive on huge trees
* adding and removing CSS classes may have become redundant in some
  cases, triggering a re-paint every time

All these cases are handled in this patch by executing tasks only when
absolutely necessary.

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