Bug #83821

SvgTree / SelectTreeElement - Various issues / improvement possibilities

Added by Andreas Allacher over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Pagetree
Start date:
2018-02-09
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When working with SVG-Tree in 8.7 I noticed some issues and improvement possibilities:
  1. selectable option for DatabaseTreeNode is currently ignored because \TYPO3\CMS\Backend\Tree\Renderer\ExtJsJsonTreeRenderer::getNodeArray (or corresponding 9.x class) doesn't unset the checked array entry but sets it to false instead.
  2. SelectTreeElement always sets data-tree-expand-up-to-level which results in expanded setting of a node to be ignored. So either provide an option to not set this option at all or let node.expanded not be ignored otherwise.
  3. SVGs with SvgIconProvider and a viewBox that exceeds 16x16 width are not scaled down in the tree but displayed as defined by the viewBox which can be way too huge. Workaround is to use BitmapIconProvider but that isn't perfect.
  4. Tree Element doesn't render field wizards at all currently, even if one were to manually add them.
  5. ExtJsJsonTreeRenderer does not set expanded setting for node, even if one were to specify it in DatabaseTreeNode.
  6. Tree is missing field wizards like otherLanguageContent, if not manually added.
  7. Various options like selectable / expandable are only available for DatabaseNode. However, if I create an own TreeProvider that is not related to the Database those settings would still make sense to be available.
  8. Overriding the dataProvider for trees also sets internal_type = 'db' if it isn't specified which it shouldn't be for a tree of type "select".
    The only soltuion was to manually set "internal_type" to an empty string to avoid setting lookup fields etc. for my non-database tree provider.
  9. Due to renderType checks the TcaSelectItems DataProvider will be executed if one uses a own renderType for the tree
  10. If a set dataProvider provides various options for the tree, they will be ignored when finding out the currently set values which means one has to provide an itemsProcFunc or items array additionally, if it isn't a Database based tree.
  11. TcaSelectTreeDataProvider executes processSelectFieldValue and processDatabaseFieldValue before itemsProcFunc is executed and therefore removing values even with itemsProcFunc supplying the values. Also getStaticValues is never executed.

Related issues

Related to TYPO3 Core - Bug #86280: SVG images are not scaled in the backend page tree New 2018-09-17

History

#1 Updated by Andreas Allacher over 1 year ago

Maybe creating a story and various sub-tickets might be the better way to handle this though. Just wanted to create the initial information.

#2 Updated by Tymoteusz Motylewski over 1 year ago

regarding point 3, the workaround is not to use bitmap provider, but optimize the icon, so it doesn't contain custom viewbox (any graphical tool can do that).

#3 Updated by Andreas Allacher over 1 year ago

Any SVG can contain a "custom" viewBox that is not "0 0 16 16" and is valid. Actually all viewBox values are custom defined for that graphic.
The easiest "workaround" is to use the BitmapIconProvider because this might not be for just one icon. Might not be perfect but it works without going through all icons and change the viewBox accordingly.
But it is a solution where the icons will be useable as inline SVG for the tree.

However, it should instead be scaled accordingly by TYPO3 / CSS.

Furthermore, the icon doesn't even have to be 1:1 aspect ratio, it can even contain one with a 4:3 aspect ratio and it should still not exceed the height / width of the icon for the tree.

#4 Updated by Tymoteusz Motylewski over 1 year ago

  • Category changed from Backend User Interface to Pagetree

#5 Updated by Riccardo De Contardi about 1 month ago

  • Related to Bug #86280: SVG images are not scaled in the backend page tree added

Also available in: Atom PDF