Review main Merged

67687[FEATURE] Use SVG Trees in Record Selector

Benni Mack CR +2 V +2 Expert +1190 −456 updated 04/16/21, 11:35

Commit message

This change adds the SVG-based page tree in the
record selector and the Page Link picker, replacing
decade-old clumsy HTML code for generating trees.

This replacement not only unifies the user experience
across the navigation trees and the Element
Browser / Link Pickers making the whole look + feel
very consistent.

It also allows to finally use all the features built
in the SVG trees:

* A filter across the tree built on the browser and automatic
  refreshing
* collapse + expand and post-loading is now built with the
  same AJAX endpoints as the navigation components, making
  the general loading much faster
* Temporary Mount Points now look exactly the same as in the
  navigation area.
* Keyboard navigation
* The Content Area inside the Record Selector and the Link
  Pickers is replaced via AJAX calls

Especially the last feature makes it a breeze to use
the new trees to select items much faster.

All existing features, such as directly selecting a page
or link to a page within the tree is added as so-called
SVG-tree "actions" in the right corner when hovering,
avoiding the additional "play" icon in the tree.

Custom support for Element Browser "mount points" is also
kept and included.

The SVG tree is added to the following components:

* Database Browser / Record Selector (e.g. choosing storagePid in plugins)
* File Browser / Record Selector (e.g. selecting an image in the plugin)
* Folder Browser / Record Selector
* Link Picker for Pages / Content Elements ("link to a page")
* Link Picker for Files ("link to a file")
* Link Picker for Folders ("link to a folder")
* Link Picker for Records (e.g. news record)

All link picker functionality is available for typolink fields (e.g. tt_content.header_link)
and when linking inside the Rich Text Editor.

Some technical details under-the-hood:
* The trees are now built as SVG tree / LIT elements
* All Element Browser / Link Picker trees are named "Browsable...Tree"
* The AJAX endpoints for fetching data are used
* The Page Tree now uses a different configuration URL with a "?readonly=1" parameter, with the main difference to initialize EB mountpoints instead
* Within the tree: The SVG tree actions is a separate container for elements on the right-hand of the tree
* The GET parameter "contentOnly" represents to only load parts of the HTML (the content area) when fetching from AJAX

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 47

Show 27 more files