Review main Merged

89635[FEATURE] Add User TSconfig to define default Live Search action

Dennis Purisevic CR +2 V +2 Hard +376 −71 updated 01/26/26, 15:58

Commit message

Introduces a new User TSconfig 'options.liveSearch.actions',
which allows to define the default behaviour of a search result
in the live search.

A default action can be defined for all tables and individually.

Available actions:

 - "edit": Opens FormEngine (Default for all tables except "pages")
 - "layout": Open the record in the layout module (Default for table "pages")
 - "list": Opens the storage page of the record in the "Records" module
 - "preview": Opens the record in the frontend

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Guido Schmechel +1
    • Dennis Purisevic +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Garvin Hicking +1
    • Guido Schmechel +1
    • Dennis Purisevic +1
    • core-ci +1 CI

Issues 1

Files 13

Review log 6077

Show 3952 earlier messages
  1. Dennis Purisevic uploaded patch set 1 06/04/25, 18:13

  2. Dennis Purisevic uploaded patch set 2 06/04/25, 18:17

  3. core-ci voted on patch set 2 V +1 06/04/25, 18:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79889

  4. core-ci voted on patch set 1 V -1 06/04/25, 18:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79887

  5. Garvin Hicking commented on patch set 2 06/04/25, 18:39

    Thanks for this helpful settinf, I think it would be useful for those utilizing the quicksearch often! For features we would need a "Feature"-ReST file in the core/Documentation/ directory, also documenting the exact setting, with some examples. Would you like to prepare that already? Also, features cannot be backported to v13. (it could be debated whether this is a task, but my personal feeling says feature=main-only)
  6. Garvin Hicking commented on patch set 2 V +1 06/05/25, 07:47

    Works well for me and I see benefit in this!
  7. Garvin Hicking updated the commit message in patch set 3 V +1 06/05/25, 07:50

  8. Mathias Brodala commented on patch set 3 06/05/25, 07:54

    item.ts:19

    This should be moved after "actions" to have a logical reading flow.

    DatabaseRecordProvider.php:294

    Here we must "break", iterating the remaining actions does not make sense. Also how about using array_find() instead?
  9. core-ci voted on patch set 3 V +1 06/05/25, 07:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79911

  10. Dennis Purisevic commented on patch set 3 06/05/25, 07:58

    Reply

    I was thinking about this and believe the feature could be split into two parts: - Task: Add the "edit record" action for pages and set it as the default action. - Feature: Introduce a user setting to choose the default action. We have quite a few customers and interns who uses the search and are frustrated with the current behavior. What’s your opinion on this approach? Yes i can create the documentation for this feature.

    DatabaseRecordProvider.php:294 Reply

    Good catch and array_find() was my first idea but is only available for PHP 8 >= 8.4.0
  11. Garvin Hicking commented on patch set 3 V +1 06/05/25, 08:32

    Reply

    My personal opinion: I would add the user setting alongside the TASK. It is something the initial implementation could've carried and is just "missing". This is not my decision to make, though (either Benni or UX team would need to chime ine).
  12. Oli Bartsch commented on patch set 3 V -1 06/05/25, 08:38

    Since this is marked as a feature, could you please add the corresponding RST documentation?
  13. Garvin Hicking commented on patch set 3 06/05/25, 12:13

    Reply

    please also see #cig-ux and prior comments, IMO we should discuss whether this could be a task, what do you think?
  14. Christian Kuhn commented on patch set 3 06/25/25, 14:20

    Reply

    my 2 cents on this since it feels as if we're recently masking various features patches as tasks in order to add new functionality to the stable marked v13 product: new ts config options are imho rather obviously features. they need communication and thus documentation and that is what a feature.rst is for. in the past, we only did stuff like that when we really really had to, for instance when a security patch forced new toggles, features or configuration. masking features as tasks and not documenting a new feature since tasks can't have feature .rst files looses the communication part. this is not a good situation for the product from various points of view.
  15. Christian Kuhn commented on patch set 3 06/25/25, 14:23

    Reply

    note i got the perception the patch should be a feature from the first commit message "This change introduces a User TSconfig setting". unsure if this is outdated meanwhile.
  16. Garvin Hicking commented on patch set 3 06/25/25, 14:24

    Reply

    Ack, thanks. I agree with this assessment. @dennispurisevic@gmail.com - Would you like to have a try at adding a feature RST? Hit me up if you need help with this. I think it's still a nice thing to have and to pursue further.
  17. Dennis Purisevic commented on patch set 3 06/26/25, 07:13

    Reply

    @lolli@schwarzbu.ch Yes, as it stands, this patch is indeed a feature. But I didn't have in mind that a feature can't be backported to v13 and the current functionality is not as direct as it should be. My idea is to split this into a task and a feature. Task: Set default action to edit for records; Set default action to view for pages; Add edit action for pages Feature: Add User TSconfig to define default Live Search action @garvin@hick.ing I will wait until the issue is resolved, then I will write a feature RST and send it to you.
  18. Dennis Purisevic uploaded patch set 4 V +1 07/01/25, 04:29

  19. Dennis Purisevic updated the commit message in patch set 5 07/01/25, 04:30

  20. Dennis Purisevic rebased onto patch set 6 07/01/25, 04:36

  21. core-ci voted on patch set 4 V +1 07/01/25, 04:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81157

  22. core-ci voted on patch set 5 V +1 07/01/25, 04:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81158

  23. Dennis Purisevic uploaded patch set 7 07/01/25, 04:41

  24. Dennis Purisevic commented on patch set 7 07/01/25, 04:42

    Reply

    Done

    Reply

    Done

    item.ts:19 Reply

    Done

    DatabaseRecordProvider.php:294 Reply

    Done
  25. core-ci voted on patch set 6 V +1 07/01/25, 04:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81160

  26. core-ci voted on patch set 7 V +1 07/01/25, 04:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81161

  27. Garvin Hicking commented on patch set 7 CR +1 V +1 07/01/25, 07:08

    Looking good. And sorry for causing delay with this task/feature debate I created.
  28. Oli Bartsch commented on patch set 7 07/04/25, 07:33

    DatabaseRecordProvider.php:272

    `open_record_details` might suite better here?

    PageRecordProvider.php:416

    Actually this is for pages specifically.

    PageRecordProvider.php:426

    Shouldn't this be the "uid"?

    PageRecordProvider.php:440

    I suggest web_layout for pages

    PageRecordProvider.php:440

    Shouldn't this be the "uid"?

    Feature-106828-AddUserTSconfigToDefineDefaultLiveSearchAction.rst:31

    Actually, since #77581 we could also add `preview_record`.
  29. Dennis Purisevic commented on patch set 7 07/07/25, 14:57

    DatabaseRecordProvider.php:272 Reply

    Done

    PageRecordProvider.php:416 Reply

    Done

    PageRecordProvider.php:426 Reply

    Yes

    PageRecordProvider.php:440 Reply

    Yes

    PageRecordProvider.php:440 Reply

    Yes, it's better.

    Feature-106828-AddUserTSconfigToDefineDefaultLiveSearchAction.rst:31 Reply

    Done
  30. Dennis Purisevic uploaded patch set 8 CR +1 V +1 07/07/25, 14:57

  31. core-ci voted on patch set 8 V +1 07/07/25, 15:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81431

  32. Georg Ringer commented on patch set 8 07/09/25, 06:26

    Feature-106828-AddUserTSconfigToDefineDefaultLiveSearchAction.rst:27

    why not using key words "details", "edit", "preview"? and what is chosen if the action is not supported? should be documented
  33. Dennis Purisevic commented on patch set 8 07/09/25, 06:37

    Feature-106828-AddUserTSconfigToDefineDefaultLiveSearchAction.rst:27 Reply

    I have kept the previous name, but will change it. I like your naming better. The default for pages andrecords is the first action (edit). I will include this in the documentation.
  34. Dennis Purisevic uploaded patch set 9 V +1 07/28/25, 08:23

  35. Dennis Purisevic uploaded patch set 10 07/28/25, 08:26

  36. Dennis Purisevic commented on patch set 9 07/28/25, 08:26

    Feature-106828-AddUserTSconfigToDefineDefaultLiveSearchAction.rst:27 Reply

    Done
  37. core-ci voted on patch set 9 V +1 07/28/25, 08:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82412

  38. core-ci voted on patch set 10 V +1 07/28/25, 08:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82413

  39. Garvin Hicking updated the commit message in patch set 11 V +1 07/28/25, 08:34

  40. Garvin Hicking commented on patch set 11 07/28/25, 08:35

    In the latest iteration it looks as if "preview" is also available for databaseRecord? (I adjusted the rest in the commit message to match the latest patchset, please check)
  41. Dennis Purisevic updated the commit message in patch set 12 07/28/25, 08:36

  42. Dennis Purisevic commented on patch set 12 07/28/25, 08:37

    Reply

    Done
  43. core-ci voted on patch set 11 V +1 07/28/25, 08:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82415

  44. core-ci voted on patch set 12 V +1 07/28/25, 08:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82416

  45. Garvin Hicking uploaded patch set 13 V +1 01/20/26, 18:46

  46. core-ci voted on patch set 13 V +1 01/20/26, 18:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93882

  47. Matthias Buchegger voted on patch set 13 CR +1 01/20/26, 20:11

  48. Christian Rath-Ulrich voted on patch set 13 CR +1 V +1 01/22/26, 11:37

  49. Garvin Hicking commented on patch set 13 01/22/26, 12:41

    Oli gave me some feedback to rework the patch so that not only tt_content recods can be previewed on the frontend, but any record configured with the PreviewUriBuilder (https://review.typo3.org/c/Packages/TYPO3.CMS/+/89843) @dennispurisevic@gmail.com Sorry for this being benched due to some stress, would you like to check that out, or should I? (I'd be happy, if could do it :-P )
  50. Dennis Purisevic commented on patch set 13 01/22/26, 12:44

    Reply

    Yea no problem. I will have a look at it.
  51. Benni Mack commented on patch set 13 01/22/26, 13:32

  52. Garvin Hicking commented on patch set 13 01/22/26, 14:33

    Reply Unresolved

    Yeah I also connected that issue with here. I'd argue this version here is more flexible and has more appeal for UserTS customization.
  1. Dennis Purisevic uploaded patch set 14 CR +1 V +1 01/22/26, 16:16

  2. Dennis Purisevic updated the commit message in patch set 15 01/22/26, 16:17

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

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

  5. Dennis Purisevic uploaded patch set 16 V -1 01/22/26, 17:04

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

  7. Dennis Purisevic commented on patch set 16 01/23/26, 08:48

    Reply

    Did some refactoring. I unified the actions for records and pages and extended the options to configure all tables. Any table can now be edited, display its layout (in the layout module), show the record, and provide a frontend preview (if the record is configured with PreviewUriBuilder)
  8. Garvin Hicking commented on patch set 16 CR +1 V +1 01/23/26, 17:47

    This works for me, and also drive-by fixes a current bug in main which does not link to the proper editing form for a translated page (it loses the language parameter).
  9. Guido Schmechel commented on patch set 16 01/25/26, 08:55

    DatabaseRecordProvider.php:578

    Here, the same code is used twice for the condition. In the third variant, only one parameter changes. Does it make sense to resolve the duplicate code?
  10. Dennis Purisevic commented on patch set 16 01/25/26, 14:02

    DatabaseRecordProvider.php:578 Reply

    Yes, the duplication can be resolved, but I don't think it would have much impact (but you can convince me otherwise). However, if you look at the bigger picture, DatabaseRecordProvider and PageRecordProvider also have very similar codebases, so this duplication could be refactored out. That said, I think this would be too much for this patch.
  11. Guido Schmechel commented on patch set 16 CR +1 V +1 01/25/26, 16:58

    DatabaseRecordProvider.php:578 Reply

    Thanks for your assessment. That doesn't have to block the patch, I just wanted to hear some opinions on it. Everything is already functional.
  12. Oli Bartsch commented on patch set 16 V -1 01/26/26, 11:17

    DatabaseRecordProvider.php:588

    This will not work in most cases because such records (e.g. news) are usually stored in storage pids (folders), which are not previewable. This check btw. is not necessary. `createForRecordPreview()` checks the actually configured page.

    Feature-106828-AddUserTSconfigToDefineDefaultLiveSearchAction.rst:22

    except pages
  13. Oli Bartsch commented on patch set 16 01/26/26, 11:42

    On it

    DatabaseRecordProvider.php:304

    Could be simplified using keys

    DatabaseRecordProvider.php:592

    ```suggestion (int)($row['pid'] ?? 0) ```

    PageRecordProvider.php:516

    This also makes no sense, to check for the pages pid.

    PageRecordProvider.php:517

    We should just use `create()` here.
  14. Oli Bartsch uploaded patch set 17 CR +1 V +1 01/26/26, 11:57

  15. Oli Bartsch commented on patch set 17 01/26/26, 11:57

    Reply

    Done

    DatabaseRecordProvider.php:304 Reply

    Done

    DatabaseRecordProvider.php:588 Reply

    Done

    DatabaseRecordProvider.php:592 Reply

    Done

    PageRecordProvider.php:516 Reply

    Done

    PageRecordProvider.php:517 Reply

    Done

    Feature-106828-AddUserTSconfigToDefineDefaultLiveSearchAction.rst:22 Reply

    Done
  16. core-ci voted on patch set 17 V +1 01/26/26, 12:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94356

  17. Oli Bartsch voted on patch set 17 CR +1 V +1 01/26/26, 12:11

  18. Guido Schmechel commented on patch set 17 01/26/26, 12:57

    I have currently set the following: options.liveSearch.actions.pages.default = preview With the admin user, I am still redirected to the edit view. With the editor account, the preview is loaded. I logged in again, cleared all caches, etc. Do you have any ideas? In the AJAX call, I also see that the ‘preview’ setting is set as the default action. Perhaps you could test this in your backend?
  19. Dennis Purisevic commented on patch set 17 01/26/26, 13:30

    Reply

    I’ve tested it and it works. I tried it with both as admin and editor, using a global default of list and for pages preview, and it works in both cases. Do you have any additional information about this?
  20. Oli Bartsch commented on patch set 17 01/26/26, 14:34

    Reply

    Could be that fe setup or similar is not working. In this case the preview action is not created and it falls back to the "edit" default.
  21. Garvin Hicking commented on patch set 17 CR +1 V +1 01/26/26, 14:36

    <3
  22. Guido Schmechel commented on patch set 17 CR +1 V +1 01/26/26, 15:47

    I was able to solve my problem. It was simply the browser cache of the JS files after branch switch. Thanks for your support, everything is working now :-)
  23. Dennis Purisevic voted on patch set 17 CR +1 V +1 01/26/26, 15:48

  24. Oli Bartsch voted on patch set 17 CR +2 V +2 01/26/26, 15:58

  25. Oli Bartsch merged patch set 18 01/26/26, 15:58