Review main Merged

92136[TASK] Add backend sidebar component registry

Oli Bartsch CR +2 V +2 Expert +1439 −178 updated 01/30/26, 12:03

Commit message

Adds a new registry system for backend sidebar
components, allowing to register custom components
with flexible ordering capabilities.

Components are registered using the #[AsSidebarComponent]
attribute with support for dependency-based ordering via
before/after parameters. The existing module menu has been
migrated to use this new system.

This new registry is internal for now.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Benjamin Franzke +1
    • Georg Ringer +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Benjamin Franzke +1
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 27

Show 7 more files

Review log 4058

Show 2333 earlier messages
  1. Oli Bartsch uploaded patch set 1 12/16/25, 22:37

  2. core-ci voted on patch set 1 V -1 12/16/25, 22:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92317

  3. Benni Mack commented on patch set 1 12/17/25, 06:55

    SidebarComponentInterface.php:38

    I feel we'd need some kind of interface to hand sth in? for now this would be AbstractUserAuthentication?

    SidebarComponentsRegistry.php:30

    I think we can remove the singleton here

    SidebarComponent.fluid.html:6

    let's discuss if we should wrap this in a div, or if the component itself should handle this? Same goes with format.raw
  4. Oli Bartsch uploaded patch set 2 V -1 12/17/25, 11:27

  5. Oli Bartsch commented on patch set 2 12/17/25, 11:28

    SidebarComponentInterface.php:38 Reply

    Since this is a backend only component, BackendUserAuthentication seems sufficient.

    SidebarComponentsRegistry.php:30 Reply

    Done

    SidebarComponent.fluid.html:6 Reply

    I don't understand. This is already a div?
  6. core-ci voted on patch set 2 V +1 12/17/25, 11:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92345

  7. Benjamin Kott commented on patch set 2 CR -1 12/18/25, 10:59

    on it
  8. Benjamin Kott uploaded patch set 3 CR -1 V +1 12/18/25, 13:46

  9. Benjamin Kott commented on patch set 3 12/18/25, 13:47

    SidebarComponent.fluid.html:6 Reply

    removed the templates
  10. Benjamin Kott commented on patch set 3 12/18/25, 14:04

    SidebarComponent.fluid.html:6 Reply

    Done
  11. core-ci voted on patch set 3 V -1 12/18/25, 14:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92419

  12. Benni Mack commented on patch set 3 CR -1 12/19/25, 08:10

    on it
  13. Benni Mack uploaded patch set 4 CR -1 V -1 12/19/25, 12:08

  14. core-ci voted on patch set 4 V -1 12/19/25, 12:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92475

  15. Oli Bartsch rebased onto patch set 5 V -1 01/19/26, 17:03

  16. Oli Bartsch commented on patch set 5 01/19/26, 17:03

    SidebarComponentInterface.php:38 Reply

    Done
  17. core-ci voted on patch set 5 V -1 01/19/26, 17:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93793

  18. Oli Bartsch uploaded patch set 6 V -1 01/27/26, 21:06

  19. core-ci voted on patch set 6 V +1 01/27/26, 21:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94450

  20. Oli Bartsch uploaded patch set 7 V +1 01/28/26, 07:19

  21. core-ci voted on patch set 7 V -1 01/28/26, 07:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94477

  22. Oli Bartsch uploaded patch set 8 V -1 01/28/26, 07:43

  23. core-ci voted on patch set 8 V +1 01/28/26, 07:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94479

  24. Oli Bartsch uploaded patch set 9 V +1 01/28/26, 08:43

  25. core-ci voted on patch set 9 V +1 01/28/26, 08:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94483

  26. Oli Bartsch uploaded patch set 10 V +1 01/28/26, 09:01

  27. core-ci voted on patch set 10 V +1 01/28/26, 09:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94484

  28. Benjamin Franzke commented on patch set 10 01/28/26, 10:00

    ModuleMenuSidebarComponent.php:75

    Since the components are intended to be refreshable, we should not allow `JavaScriptModuleInstruction`s here, since that allows to call initializer functions which then work for initial rendering, but may not update when the component is refreshed. For that reason I'd suggest a simple `getJavaScriptModule(): string` here, as in setting types.

    Sidebar.php:99

    Let's return an array of modules (`list<string>`) here to avoid side effects in this components. The modules should be added to javaScriptRenderer/pageRenderer by the controller.

    SidebarComponentInterface.php:42

    I don't like that sidebar's receive a request, as its a generic container and does not clarify what is actually needed. I understand that we currently need that because BackendViewFactory requires that :\ To be able to extend the sidebar context i propose to wrap this in final `SidebarComponentContext` object that is passed to `render()` (see dashboard renderers for an example).
  29. Oli Bartsch commented on patch set 10 01/28/26, 10:08

    BackendController.php:213

    This should return SidebarComponentResult directly.
  30. Benjamin Franzke commented on patch set 10 01/28/26, 10:10

    SidebarComponentInterface.php:42

    Let's return `SidebarComponentResult`
  31. Oli Bartsch commented on patch set 10 01/28/26, 10:10

    AsSidebarComponent.php:22

    Add @internal
  32. Oli Bartsch uploaded patch set 11 V +1 01/28/26, 11:21

  33. Oli Bartsch uploaded patch set 12 01/28/26, 11:24

  1. Oli Bartsch commented on patch set 12 01/28/26, 11:30

    AsSidebarComponent.php:22 Reply

    Done

    BackendController.php:213 Reply

    Done

    ModuleMenuSidebarComponent.php:75 Reply

    Done

    Sidebar.php:99 Reply

    Done

    SidebarComponentInterface.php:42 Reply

    Done

    SidebarComponentInterface.php:42 Reply

    Done
  2. core-ci voted on patch set 11 V +1 01/28/26, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94493

  3. core-ci voted on patch set 12 V +1 01/28/26, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94494

  4. Oli Bartsch uploaded patch set 13 V +1 01/28/26, 11:49

  5. core-ci voted on patch set 13 V +1 01/28/26, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94497

  6. Benjamin Kott commented on patch set 13 CR -1 01/29/26, 11:47

    @ben@bnf.dev is on it and does bnf things
  7. Benjamin Franzke uploaded patch set 14 CR -1 V +1 01/29/26, 12:28

  8. core-ci voted on patch set 14 V -1 01/29/26, 12:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94567

  9. Oli Bartsch commented on patch set 14 01/29/26, 12:54

    Sidebar.php:55

    What is the benefit of this type cast?

    SidebarComponentContext.php:34

    I see no reason why we should pass this service here. Components, which need this service should fetch / instantiate it themselfs. It is even unused in this patch.

    SidebarComponentResult.php:31

    I would like to keep this. I need to know which components result I currently deal with.
  10. Benjamin Franzke commented on patch set 14 01/29/26, 13:17

    Sidebar.php:55 Reply

    It is an object instead of an array, no other benefits.

    SidebarComponentContext.php:34 Reply

    It's not a service, it is state, based on the user, that is context. (I've added usage in the workspace selector patch)

    SidebarComponentResult.php:31 Reply

    why? it was actually unused
  11. Benjamin Franzke uploaded patch set 15 V -1 01/29/26, 13:20

  12. core-ci voted on patch set 15 V +1 01/29/26, 13:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94571

  13. Oli Bartsch commented on patch set 15 01/29/26, 13:30

    ModuleMenuSidebarComponent.php:53

    ```suggestion return new SidebarComponentResult('', ''); ```

    SidebarComponentContext.php:34 Reply

    It's called *Service. ;) But seriously, when needed it can be retrieved from then already provided user. ``` languageServiceFactory->createFromUserPreferences($context-user); ``` I did not find a lot (actually just one) place where core does currently forwarded this in constructor.

    SidebarComponentResult.php:31 Reply

    Let me rephrase: I would prefer to know which component this is, though it is not implemented yet.
  14. Oli Bartsch rebased onto patch set 16 V +1 01/29/26, 21:08

  15. core-ci voted on patch set 16 V +1 01/29/26, 21:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94603

  16. Benjamin Franzke uploaded patch set 17 V +1 01/30/26, 10:15

  17. Benjamin Franzke commented on patch set 17 01/30/26, 10:15

    ModuleMenuSidebarComponent.php:53 Reply

    Done

    Sidebar.php:55 Reply

    I don't want to discuss here, so I've changed to array.

    SidebarComponentContext.php:34 Reply

    ack, that's something i want for the future – this was a first acceptance test. anyway, postponed.

    SidebarComponentResult.php:31 Reply

    well, I disagree, but benji wants the same, so I'll change it for you. ;)
  18. Benjamin Franzke voted on patch set 17 CR +1 V +1 01/30/26, 10:16

  19. Benjamin Franzke uploaded patch set 18 CR +1 V +1 01/30/26, 10:17

  20. Benjamin Franzke voted on patch set 18 CR +1 V +1 01/30/26, 10:17

  21. Georg Ringer voted on patch set 18 CR +1 V +1 01/30/26, 10:26

  22. core-ci voted on patch set 17 V -1 01/30/26, 10:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94636

  23. core-ci voted on patch set 18 V +1 01/30/26, 11:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94638

  24. Oli Bartsch voted on patch set 18 CR +2 V +2 01/30/26, 12:03

  25. Oli Bartsch merged patch set 19 01/30/26, 12:03