Review main Merged

92318[FEATURE] Centralize Bookmark Management

Benjamin Kott CR +2 V +2 Nightmare +6682 −1862 updated 02/02/26, 15:48

Commit message

This patch introduces a comprehensive overhaul of the TYPO3 backend
bookmark system, replacing the legacy "shortcut" implementation with
a modern, centralized approach.

The new backend architecture provides a BookmarkService as the central
service for all bookmark operations, a BookmarkRepository for data
access, and a BookmarkController with JSON API endpoints. Access control
is handled through dedicated BookmarkVoter and BookmarkGroupVoter
security classes.

Bookmarks can now be organized into three types of groups. System
groups are defined via UserTSconfig, global groups are visible to all
users but only writable by administrators, and user groups allow
personal organization through a new sys_be_shortcuts_group database
table. Default bookmark groups can be configured via UserTSconfig
options.bookmarkGroups.

The user interface features a new modal-based Bookmark Manager with
drag and drop reordering and bulk operations for moving and deleting
bookmarks. Modern Lit-based web components power the toolbar menu and
manager interface.

The Bookmarks dashboard widget has been updated to support the new
bookmark system with group filtering and configurable limits.

This change renames ShortcutToolbarItem to BookmarkToolbarItem,
ShortcutController to BookmarkController, and replaces
ShortcutRepository with the new BookmarkService and BookmarkRepository
classes.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 74

Show 54 more files

Review log 67101

Show 4976 earlier messages
  1. Benjamin Kott uploaded patch set 1 01/13/26, 18:31

  2. Benjamin Kott marked it work in progress 01/13/26, 18:31

  3. core-ci voted on patch set 1 V -1 01/13/26, 18:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93394

  4. Benjamin Kott uploaded patch set 2 V -1 01/13/26, 18:45

  5. Benjamin Kott uploaded patch set 3 01/13/26, 18:56

  6. core-ci voted on patch set 2 V -1 01/13/26, 19:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93396

  7. Benjamin Kott rebased onto patch set 4 01/13/26, 19:08

  8. core-ci voted on patch set 3 V -1 01/13/26, 19:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93398

  9. core-ci voted on patch set 4 V -1 01/13/26, 19:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93400

  10. Benjamin Kott uploaded patch set 5 V -1 01/20/26, 09:15

  11. core-ci voted on patch set 5 V -1 01/20/26, 09:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93851

  12. Benjamin Kott uploaded patch set 6 V -1 01/20/26, 16:00

  13. core-ci voted on patch set 6 V -1 01/20/26, 16:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93875

  14. Benjamin Kott uploaded patch set 7 V -1 01/24/26, 01:04

  15. core-ci voted on patch set 7 V -1 01/24/26, 01:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94219

  16. Benjamin Kott marked it ready for review 01/24/26, 18:11

  17. Simon Praetorius commented on patch set 7 01/25/26, 17:17

    FYI Fluid templates need to be renamed to .fluid.html here.
  18. Benjamin Kott commented on patch set 7 01/26/26, 07:44

    Reply

    👍
  19. Benjamin Kott uploaded patch set 8 V -1 01/26/26, 08:48

  20. core-ci voted on patch set 8 V -1 01/26/26, 09:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94347

  21. Benjamin Kott uploaded patch set 9 V -1 01/26/26, 09:07

  22. core-ci voted on patch set 9 V -1 01/26/26, 09:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94348

  23. Benjamin Kott uploaded patch set 10 V -1 01/26/26, 11:30

  24. core-ci voted on patch set 10 V -1 01/26/26, 11:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94354

  25. Benjamin Kott uploaded patch set 11 V -1 01/27/26, 14:48

  26. core-ci voted on patch set 11 V -1 01/27/26, 15:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94429

  27. Benjamin Kott uploaded patch set 12 V -1 01/27/26, 16:55

  28. core-ci voted on patch set 12 V -1 01/27/26, 17:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94441

  29. Benjamin Kott uploaded patch set 13 V -1 01/28/26, 07:50

  30. core-ci voted on patch set 13 V -1 01/28/26, 07:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94480

  31. Benjamin Kott uploaded patch set 14 V -1 01/28/26, 13:30

  32. core-ci voted on patch set 14 V -1 01/28/26, 13:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94500

  33. Benjamin Kott uploaded patch set 15 V -1 01/28/26, 15:26

  34. core-ci voted on patch set 15 V -1 01/28/26, 15:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94511

  35. Benjamin Kott uploaded patch set 16 V -1 01/28/26, 15:56

  36. core-ci voted on patch set 16 V -1 01/28/26, 16:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94513

  37. Benjamin Kott uploaded patch set 17 V -1 01/28/26, 16:19

  38. Benjamin Kott uploaded patch set 18 01/28/26, 16:21

  39. Benjamin Kott uploaded patch set 19 01/28/26, 16:24

  40. core-ci voted on patch set 17 V +1 01/28/26, 16:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94514

  41. core-ci voted on patch set 18 V +1 01/28/26, 16:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94515

  42. core-ci voted on patch set 19 V +1 01/28/26, 16:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94516

  43. Andreas Kienast commented on patch set 19 01/28/26, 16:51

    bookmark-store.ts:141

    This method is unused

    bookmark-store.ts:148

    Why do we return a plain array here?

    ext_tables.sql:76

    Why do we use UUIDs over `int` ids? If we really *have to* use UUIDs, we should consider using `CHAR(36)` instead.
  44. Benjamin Kott uploaded patch set 20 V +1 01/28/26, 16:55

  45. core-ci voted on patch set 20 V +1 01/28/26, 17:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94519

  46. Benjamin Kott uploaded patch set 21 V +1 01/28/26, 17:18

  47. Benjamin Kott commented on patch set 20 01/28/26, 17:18

    bookmark-store.ts:141 Reply

    Done
  48. Benjamin Kott commented on patch set 21 01/28/26, 17:20

    ext_tables.sql:76 Reply

    it was easier to differentiate between the numeric group id´s from tsconfig
  49. core-ci voted on patch set 21 V +1 01/28/26, 17:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94524

  50. Garvin Hicking commented on patch set 21 01/28/26, 19:40

    BookmarkGroupVoterTest.php:36

    (Also move to bottom)

    BookmarkVoterTest.php:44

    please move private helper methods to the bottom of the tests so the actual tests can be seen earlier

    BookmarkVoterTest.php:99

    why not use the createBqckendUser helper here too? Could react on the uid set to null maybe

    Feature-108796-CentralizeBookmarkManagement.rst:40

    ```suggestion .. code-block:: typoscript .. :caption: EXT:my_ext/Configuration/TSConfig/page.typoscript ``` something like that. I don't know where to locate this actually, mobile review only ^^

    Feature-108796-CentralizeBookmarkManagement.rst:43

    Should we use speaking group identifiers? That would probably prevent to rename/remove a wrong group accidentally. We could maybe even prefix core groups like "core_files", "core_records" etc, and establish that prefix ? (If that is due to "legacy" maybe now would be the time to introduce a new/different key and deprecate the old?)

    Feature-108796-CentralizeBookmarkManagement.rst:59

    ```suggestion :typoscript:`extension_key.domain:translation_key`, which resolves to the default ``` The domain or "messages" fallback is missing

    Feature-108796-CentralizeBookmarkManagement.rst:70

    ```suggestion A new modal-based :guilabel:`Bookmark Manager` provides a centralized interface for ```
  51. Garvin Hicking commented on patch set 21 01/28/26, 21:15

    BookmarkRepository.php:61

    Strict array check here ro avoid empty()

    BookmarkService.php:180

    Not a dto/vo here, no named arguments (also above)

    BookmarkService.php:198

    Maybe accessing the repository to instantiate a single result row is a bit more lightweight? (Then again, users will probably have hundreds of bookmarks...)

    BookmarkService.php:265

    No named arguments here

    BookmarkService.php:394

    No named arguments

    BookmarkService.php:488

    Do you intend this class to be extended? Otherwise we should do final + private here

    BookmarkService.php:520

    Avoid "empty" here and do strict checks

    BookmarkService.php:590

    could also be a factory / createFrom method withith the BookmarkGrouo vo

    BookmarkVoter.php:184

    I think this can be injected

    BookmarkVoter.php:217

    Use bookmark terminology here

    RouteParserTrait.php:26

    This feels like it should not be in the bookmark scope only? How about an injectable service class instead, and lart of the router scope instead of bookmark? (personally I'm not too fond of traits)

    BookmarkController.php:52

    I think to keep things leaner all the method comments can go, they're rather redundant given the method name and AJAX scope of the whole controller.

    BookmarkController.php:253

    Obvious comment is obvious

    ShortcutButton.php:193

    Adapt variables to "bookmark" terminology (Class can't be renamed, I know)

    DropDownGeneric.php:25

    This is more of a VeryGenericWebComponent() instead of limited to a Dropdown, maybe rename it?

    locallang_bookmarks.xlf:82

    ```suggestion <source>The bookmark could not be created</source> ```

    locallang_bookmarks.xlf:91

    ```suggestion <source>The bookmark could not be deleted.</source> ```

    BookmarksWidget.php:53

    Can we use the donainnsyntax here yet?

    locallang_widget_bookmarks.xlf:22

    ```suggestion <source>Defines how many bookmark items should be shown.</source> ```

    locallang_widget_bookmarks.xlf:25

    ```suggestion <source>Show all bookmarks</source> ```

    locallang_widget_bookmarks.xlf:28

    ```suggestion <source>Manage bookmarks</source> ```
  52. Benjamin Kott uploaded patch set 22 V +1 01/29/26, 10:02

  53. Benjamin Kott commented on patch set 22 01/29/26, 10:02

    bookmark-store.ts:148 Reply

    We are creating a shallow copy here, and do not pass a reference to avoid that the state of the store is changed.

    BookmarkRepository.php:61 Reply

    Done

    BookmarkService.php:180 Reply

    Done

    BookmarkService.php:198 Reply

    Done

    BookmarkService.php:265 Reply

    Done

    BookmarkService.php:394 Reply

    Done

    BookmarkService.php:488 Reply

    made them private

    BookmarkService.php:520 Reply

    Done

    BookmarkService.php:590 Reply

    we need access to the voter that also may need the router so we should not move it to the dto, i tried to keep it small here - no hard opinion here, we would need a factory then.

    BookmarkVoter.php:184 Reply

    Done

    BookmarkVoter.php:217 Reply

    Done

    RouteParserTrait.php:26 Reply

    needed this in multiple places, not a big fan, but a trait felt like the best option in that case

    BookmarkController.php:52 Reply

    Done

    ShortcutButton.php:193 Reply

    Done

    DropDownGeneric.php:25 Reply

    not sure, it's like really generic and only disables the hard label checks

    BookmarkGroupVoterTest.php:36 Reply

    Done

    BookmarkVoterTest.php:44 Reply

    Done

    Feature-108796-CentralizeBookmarkManagement.rst:40 Reply

    Done

    Feature-108796-CentralizeBookmarkManagement.rst:43 Reply

    i decided to document the current behavior here again to also add remarks about limitations, we would need more changes to achieve that, that also would include database changes and internal handling - i marked this out of scope for now as it would only provide a limited benefit.

    Feature-108796-CentralizeBookmarkManagement.rst:59 Reply

    Done

    Feature-108796-CentralizeBookmarkManagement.rst:70 Reply

    Done

    locallang_bookmarks.xlf:82 Reply

    Done

    locallang_bookmarks.xlf:91 Reply

    Done

    BookmarksWidget.php:53 Reply

    Done

    locallang_widget_bookmarks.xlf:22 Reply

    Done

    locallang_widget_bookmarks.xlf:25 Reply

    Done

    locallang_widget_bookmarks.xlf:28 Reply

    Done
  54. Benjamin Kott commented on patch set 22 01/29/26, 10:03

    BookmarkController.php:253 Reply

    Done
  55. Benjamin Kott uploaded patch set 23 01/29/26, 10:12

  56. Benjamin Kott commented on patch set 23 01/29/26, 10:12

    BookmarkVoterTest.php:99 Reply

    Done
  57. core-ci voted on patch set 22 V -1 01/29/26, 10:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94560

  58. core-ci voted on patch set 23 V -1 01/29/26, 10:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94562

  59. Benjamin Kott uploaded patch set 24 V -1 01/29/26, 11:05

  60. Benjamin Franzke commented on patch set 24 01/29/26, 11:14

    RouteParserTrait.php:26 Reply

    as this code is basically an extract of the previous shortcut handler, it is fine for me to be in this scope, especially since it is not 100% right: `record_edit` and `file_edit` are not module names, but are handled the same here for the sake of convenience, to make them "allowed" shortcut targets. I'd leave it in the Bookmark/ namespace for now.
  61. core-ci voted on patch set 24 V +1 01/29/26, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94563

  62. Garvin Hicking commented on patch set 24 01/29/26, 12:09

    DropDownGeneric.php:25 Reply

    How about "UnlabelledComponent" then?
  63. Garvin Hicking commented on patch set 24 01/29/26, 12:10

    BookmarkService.php:590 Reply

    I don't mind too much about this and can also be part of later cleanup, being private and internal for now.

    RouteParserTrait.php:26 Reply

    Acknowledged
  64. Georg Ringer commented on patch set 24 CR +1 V +1 01/29/26, 13:42

    only issue I found was that it seems that html is removed from group/bookmark titles, IMHO we shouldn't modify the data a user adds - outputting is done correctly, so no xss here
  65. Benjamin Kott uploaded patch set 25 CR +1 V +1 01/29/26, 14:19

  66. Benjamin Kott commented on patch set 25 01/29/26, 14:21

    @georg.ringer@gmail.com checked with @ben@bnf.dev - the strip tags were here before, but we only have safe renderings now so we can remove it.
  67. core-ci voted on patch set 25 V -1 01/29/26, 14:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94585

  68. Benjamin Kott uploaded patch set 26 V -1 01/29/26, 14:32

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

  70. Garvin Hicking commented on patch set 26 V +1 01/29/26, 17:58

    Did a lot of rounds on actually using the UI now and I couldn't break it, seems to work all quite well! Thanks!

    BookmarkService.php:146

    ```suggestion if ($groupId <= 0 || $groupId === 100 || $configLabel === null || $configLabel === '') { ```

    BookmarkService.php:265 Reply

    It's still there? Reference: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/PhpArchitecture/NamedArguments.html#typo3-core-development (I won't commit on the other instances where this is contained as well and needs to be changed to keep my comments manageable)

    BookmarkService.php:354

    ```suggestion if ($manageableIds !== []) { ```

    BookmarkService.php:389

    ```suggestion if ($manageableIds === []) { ```

    BookmarkService.php:520

    ```suggestion $groupId = ($row['group_uuid'] !== '' && $row['group_uid'] !== null) ? $row['group_uuid'] : (int)$row['sc_group']; ```

    BookmarkService.php:521

    ```suggestion $bookmarkData = $this->parseRecordEditData($routeIdentifier, $arguments); ```

    BookmarkService.php:522

    ```suggestion $iconData = $this->resolveBookmarkIcon($routeIdentifier, $moduleName, $bookmarkData); ```

    BookmarkService.php:543

    ```suggestion private function resolveBookmarkIcon(string $routeIdentifier, string $moduleName, array $bookmarkData): array ```

    BookmarkService.php:550

    ```suggestion $table = $bookmarkData['table'] ?? ''; ```

    BookmarkService.php:551

    ```suggestion $recordid = $bookmarkData['recordid'] ?? 0; ```

    BookmarkService.php:553

    ```suggestion $action = $bookmarkData['action'] ?? ''; ```

    BookmarkController.php:151

    ```suggestion if (!is_array($bookmarkIds) || $bookmarkIds === []) { ```

    BookmarkController.php:193

    ```suggestion if (!is_array($bookmarkIds) ||$bookmarkIds === []) { ```

    BookmarkController.php:293

    ```suggestion if (!is_array($uuids) || $uuids === []) { ```
  71. Anja Leichsenring commented on patch set 26 V +1 01/30/26, 06:07

    works nicely, could not manage to trigger any errors.
  72. Benjamin Kott uploaded patch set 27 V +1 01/30/26, 07:29

  73. Benjamin Kott commented on patch set 27 01/30/26, 07:29

    BookmarkService.php:146 Reply

    Done

    BookmarkService.php:265 Reply

    Done

    BookmarkService.php:354 Reply

    Done

    BookmarkService.php:389 Reply

    Done

    BookmarkService.php:520 Reply

    Done

    BookmarkService.php:521 Reply

    Done

    BookmarkService.php:522 Reply

    Done

    BookmarkService.php:543 Reply

    Done

    BookmarkService.php:550 Reply

    Done

    BookmarkService.php:551 Reply

    Done

    BookmarkService.php:553 Reply

    Done

    BookmarkService.php:590 Reply

    Done

    BookmarkController.php:151 Reply

    Done

    BookmarkController.php:193 Reply

    Done

    BookmarkController.php:293 Reply

    Done
  74. core-ci voted on patch set 27 V +1 01/30/26, 07:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94627

  75. Garvin Hicking commented on patch set 27 CR +1 V +1 01/30/26, 07:39

    (Code-Review vote based on PHP-side, can't judge the JS aspect)
  76. Andreas Kienast commented on patch set 27 01/30/26, 09:53

    bookmark-store.ts:148 Reply

    Acknowledged
  1. Benjamin Kott commented on patch set 27 01/30/26, 10:08

    DropDownGeneric.php:25 Reply

    let's keep it generic for now
  2. Benjamin Kott uploaded patch set 28 CR +1 V +1 01/30/26, 11:49

  3. Benjamin Kott commented on patch set 28 01/30/26, 11:50

    ext_tables.sql:76 Reply

    Done
  4. core-ci voted on patch set 28 V -1 01/30/26, 11:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94652

  5. Benjamin Kott uploaded patch set 29 V -1 01/30/26, 12:31

  6. Benjamin Franzke commented on patch set 28 01/30/26, 12:33

  7. core-ci voted on patch set 29 V -1 01/30/26, 13:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94658

  8. Benjamin Franzke uploaded patch set 30 V -1 01/30/26, 13:43

  9. core-ci voted on patch set 30 V +1 01/30/26, 13:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94670

  10. Garvin Hicking commented on patch set 30 CR +1 V +1 01/30/26, 14:19

    (I tested this with mysql 8.0.40 which uses char(36) as the type. I figure that uuid needs to work generally in the core, otherwise it would be a follow-up bugfix)
  11. Benjamin Kott uploaded patch set 31 01/30/26, 14:31

    Copied Votes: * Code-Review+1 (copy condition: "**changekind:NO_CHANGE** OR is:MIN") * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  12. Benjamin Franzke voted on patch set 31 CR -1 01/30/26, 14:38

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

  14. Benjamin Kott uploaded patch set 32 CR +1 V +1 01/30/26, 15:31

  15. core-ci voted on patch set 32 V +1 01/30/26, 15:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94685

  16. Garvin Hicking voted on patch set 32 CR +1 V +1 01/30/26, 16:43

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

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

  19. Nikita Hovratov commented on patch set 33 01/30/26, 19:51

    BookmarkVoter.php:46

    can this class be readonly?
  20. Benjamin Franzke uploaded patch set 34 CR +1 V +1 02/02/26, 07:51

  21. Benjamin Franzke commented on patch set 34 CR +1 V +1 02/02/26, 07:51

    BookmarkVoter.php:46 Reply

    Done
  22. core-ci voted on patch set 34 V +1 02/02/26, 08:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94797

  23. Garvin Hicking voted on patch set 34 CR +1 V +1 02/02/26, 13:21

  24. Benjamin Franzke commented on patch set 34 CR +2 V +2 02/02/26, 15:48

    It's a large patchset, but it's hard to split or anything, so I think we should merge now an and fix possible issues afterwards. It waited for a couple of days now.
  25. Benjamin Franzke merged patch set 35 02/02/26, 15:48