83143[FEATURE] Introduce tree node labels
Commit message
Review
-
Code review CR +2 Done
- Benjamin Kott +2
- Benjamin Franzke +1
- Oli Bartsch +1
-
Verified V +2 Done
- Benjamin Kott +2
- Benjamin Franzke +1
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 21
- Build/Sources/Sass/component/_tree.scss+12 −1
- Build/Sources/TypeScript/backend/tree/page-tree-element.ts+1 −0
- Build/Sources/TypeScript/backend/tree/tree-node.ts+7 −0
- Build/Sources/TypeScript/backend/tree/tree.ts2+43 −3
- typo3/sysext/backend/Classes/Controller/FileStorage/TreeController.php+1 −0
- typo3/sysext/backend/Classes/Controller/Page/TreeController.php3+35 −0
- typo3/sysext/backend/Classes/Controller/FormSelectTreeAjaxController.php+1 −0
- typo3/sysext/backend/Classes/Dto/Tree/Label/Label.php6new+35 −0
- typo3/sysext/backend/Classes/Dto/Tree/TreeItem.php+3 −0
- typo3/sysext/backend/Resources/Public/Css/backend.css+2 −1
- typo3/sysext/backend/Resources/Public/JavaScript/tree/page-tree-element.js+1 −1
- typo3/sysext/backend/Resources/Public/JavaScript/tree/tree.js+6 −3
- typo3/sysext/core/Documentation/Changelog/13.1/Deprecation-103211-DeprecatePageTreebackgroundColor.rst3new+54 −0
- typo3/sysext/core/Documentation/Changelog/13.1/Feature-103211-IntroduceTreeNodeLabels.rst13new+64 −0
- typo3/sysext/core/Resources/Private/Language/locallang_core.xlf+3 −0
- typo3/sysext/core/Tests/Acceptance/Application/FormEngine/CategoryTreeCest.php+2 −2
- typo3/sysext/core/Tests/Acceptance/Application/Impexp/ExportCest.php+2 −2
- typo3/sysext/core/Tests/Acceptance/Application/IndexedSearch/IndexedSearchModuleCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Page/PageModuleCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Template/TemplateCest.php+1 −1
Review log 3949
Show 1824 earlier messages
-
Benjamin Kott uploaded patch set 1 02/26/24, 15:23
-
core-ci voted on patch set 1 V -1 02/26/24, 15:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53625
-
Benjamin Kott uploaded patch set 2
V -102/27/24, 11:20 -
core-ci voted on patch set 2 V -1 02/27/24, 11:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53633
-
Benjamin Kott uploaded patch set 3
V -102/27/24, 11:42 -
core-ci voted on patch set 3 V +1 02/27/24, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53635
-
Benjamin Kott uploaded patch set 4
V +102/27/24, 13:08 -
core-ci voted on patch set 4 V +1 02/27/24, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53640
-
Benni Mack commented on patch set 4 02/27/24, 13:42
nice job! -
Markus Klein voted on patch set 4 CR +1 02/27/24, 13:59
-
Markus Klein commented on patch set 4 02/27/24, 14:01
Deprecation-103211-DeprecatePageTreebackgroundColor.rst:30not sure about the spelling here, is it "TSconfig" maybe make clear here, that this is *user* TSconfig here. -
Jasmina Ließmann commented on patch set 4 02/27/24, 16:43
Deprecation-103211-DeprecatePageTreebackgroundColor.rst:30ReplyGood catch. Yes, it has to be called "TSconfig". -
Jasmina Ließmann commented on patch set 5
CR +1V +102/27/24, 19:36Published edit on patch set 4. -
Jasmina Ließmann commented on patch set 5 02/27/24, 19:36
Deprecation-103211-DeprecatePageTreebackgroundColor.rst:30ReplyDone -
core-ci voted on patch set 5 V -1 02/27/24, 19:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53662
-
Jasmina Ließmann commented on patch set 6
V -102/27/24, 19:43Published edit on patch set 5. -
core-ci voted on patch set 6 V +1 02/27/24, 19:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53663
-
Markus Klein voted on patch set 6 CR +1 02/27/24, 20:10
-
Oli Bartsch commented on patch set 6 02/28/24, 21:02
TreeController.php:391Correct to add the deprecated label in any case? Because if the old and the new way are used for the same page, the color is taken from the new config while the label contains the old "Color: #XXXXXX" part.Label.php:23Do we want to name this "TreeNodeLabel" as it's called in JS? Otherwise it IMO sounds strange to have the DTO Label in the Namespace \Label.Feature-103211-IntroduceTreeNodeLabels.rst:38Any reason for not allowing to define the priority here?Feature-103211-IntroduceTreeNodeLabels.rst:55Using the example above (setting priority=0 in the listener) the label from TSconfig will be used as it is defined beforehand, even if it uses the same priority. Maybe we should adjust the example or add the information that in case labels with the same priority exists, the first one is used. -
Simon Schaufelberger commented on patch set 6 02/28/24, 23:46
Would it be a good idea to add an example to the styleguide (create a page with a label)? -
Benjamin Kott commented on patch set 6 02/29/24, 07:28
Reply
Not sure about this, we also did not do this for status information.TreeController.php:391ReplyThis is the replacement for the old part, it was removed in the original tree rebuild patch and is now added as a migration to this again. It was dropped in the original patch without notice, this patch now handles and deprecates it. Since it is only deprecated, I think it´s best to keep both available ... for now.Label.php:23ReplyWe did not do this with for example the StatusInformation, not sure if we now need to do it here.Feature-103211-IntroduceTreeNodeLabels.rst:38ReplyYes, you can only set 1 label here, no need to have a priority.Feature-103211-IntroduceTreeNodeLabels.rst:55ReplyFor me, it is just an example. We can change the priority to 1 here if you feel more comfortable about it. -
Benjamin Kott commented on patch set 7
CR +1V +102/29/24, 07:45Published edit on patch set 6. -
Benjamin Kott commented on patch set 7 02/29/24, 07:46
Feature-103211-IntroduceTreeNodeLabels.rst:38ReplyDone -
Benjamin Kott commented on patch set 7 02/29/24, 07:47
TreeController.php:391ReplyDoneLabel.php:23ReplyDoneFeature-103211-IntroduceTreeNodeLabels.rst:55ReplyDone
-
Benjamin Kott commented on patch set 7 02/29/24, 07:47
Reply
Done -
core-ci voted on patch set 7 V +1 02/29/24, 07:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53701
-
Jasmina Ließmann commented on patch set 7 02/29/24, 08:15
Feature-103211-IntroduceTreeNodeLabels.rst:38ReplyWhat if a node has multiple labels, for example one defined by TSconfig and one defined by Event. 1 / Will those defined by Event always have a higher priority because those defined by TSconfig cannot have a priority? 2 / Case: I want to reorder labels set automatically by extensions via Event and prioritize my custom label that I created via TSconfig. Would a rearrangement only be possible via Event? -
Benjamin Franzke commented on patch set 7 02/29/24, 08:27
tree.ts:918We should explicitly use `backgroundColor` to ensure no one tries to embed images or other combined `background` options. -
Benjamin Kott uploaded patch set 8
V +102/29/24, 08:50 -
Benjamin Kott commented on patch set 8 02/29/24, 08:52
tree.ts:918Replygood catch -
core-ci voted on patch set 8 V +1 02/29/24, 08:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53705
-
Simon Schaufelberger commented on patch set 8 02/29/24, 09:01
Reply
at least it would make testing easier and also show the capability that TYPO3 can do sweet things like that. -
Benjamin Kott commented on patch set 8 02/29/24, 09:07
Feature-103211-IntroduceTreeNodeLabels.rst:38Reply1. No, the default priority is 0. If you want to set a higher priority you need to set it. 2. You have full control over the entries with your event. -
Benjamin Kott commented on patch set 8 02/29/24, 09:09
Reply
I agree, but I would prefer a style guide for the components - instead of records being generated. Iirc Jasmina is looking currently into something. -
Andreas Kienast commented on patch set 8 CR -1 02/29/24, 09:35
on it -
Andreas Kienast uploaded patch set 9
CR -1V +102/29/24, 09:38 -
Andreas Kienast voted on patch set 9 CR +1 V +1 02/29/24, 09:38
-
core-ci voted on patch set 9 V +1 02/29/24, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53708
-
Markus Klein voted on patch set 9 CR +1 02/29/24, 09:48
-
Benjamin Franzke uploaded patch set 10
CR +1V +102/29/24, 15:56 -
core-ci voted on patch set 10 V +1 02/29/24, 16:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53730
-
Oli Bartsch commented on patch set 10 02/29/24, 20:34
Feature-103211-IntroduceTreeNodeLabels.rst:38Reply> 1. No, the default priority is 0. If you want to set a higher priority you need to set it. But you can't using just TSconfig. Not all integrators are able to write PHP - use the Event. This means one extension defines a Label and by extension loading order, the extension is loaded beforehand and therefore wins. That's why I highly recommend to allow setting the priority also via TSconfig. -
Oli Bartsch commented on patch set 10 02/29/24, 20:37
Label.php:23ReplyThere the namespace is \Status while the class name is StatusInformation. This sounds fine. However, having namespace \Label with class name Label sounds as mentioned a bit strange. Especially because using TreeNodeLabel would make the actual intension much more clear. -
Jasmina Ließmann commented on patch set 10 02/29/24, 23:32
Feature-103211-IntroduceTreeNodeLabels.rst:38ReplyI support that. In my day-to-day business as an integrator, I don't write Events. -
Benjamin Kott commented on patch set 10 03/01/24, 06:31
Label.php:23ReplyBut isn´t that what the namespace is for?Feature-103211-IntroduceTreeNodeLabels.rst:38ReplyIt is not helpful to assign multiple labels and sort them without any logic attached. It´s the same reason why you only can create 1. label through tsconfig. while being able to create multiple ones through PHP. The label gets inherited automatically when no label is set to child nodes. They are not merged, so there is also no need to set a priority. If a label is added to a node with PHP. A label is only inherited when there is no label set for the current node. There is no priority you need to handle. -
Benni Mack commented on patch set 10 03/01/24, 07:32
Feature-103211-IntroduceTreeNodeLabels.rst:38ReplyI also think that configuring priorities is not necessarily needed for TSconfig, as it makes it quite complicated. -
Oli Bartsch commented on patch set 10 CR +1 V +1 03/01/24, 11:02
Label.php:23ReplyDoneFeature-103211-IntroduceTreeNodeLabels.rst:38ReplyDone -
Benjamin Kott voted on patch set 10 CR +2 V +2 03/01/24, 11:03
-
Benjamin Kott merged patch set 11 03/01/24, 11:03