Review main Merged

74550[TASK] Refactor ext:tstemplate controllers

Christian Kuhn CR +2 V +2 Nightmare +1830 −2046 updated 05/10/22, 13:02

Commit message

With the refactoring of the '3rd level' backend module
API, we can finally clean up the Template related
backend controllers.

Notable UI changes:
* There was a rather hidden functionality in the template
  module: The "Template record overview" that lists all
  pages that have sys_template records, is only rendered
  when the root page "Page zero" is selected. This can be
  hard to find and is contrary to all other backend modules
  where sub-functionality is selected using the drop down
  in the doc header. The patch changes this: The template
  record overview is now always shown as 5th element in the
  drop down. It currently renders the same output on all
  pages, but could be made page-aware later.
* The TypoScript Object Browser has a detail view to edit
  single properties, which then write to a sys_template
  record. This view also allows to add the edited path to
  an "Object List" if it has sub properties. This is
  remembered for the given user. The user can then select
  this path in the object browser tree view to limit the
  view to this section of the tree. All in all, this is a
  rather hidden and pretty much unknown detail functionality
  of limited use. This functionality has been removed.

Patch overview:
* Implement the "Template record overview" as new
  controller.
* Resolve "controller extends controller" inheritance and
  introduce an abstract controller with common methods of
  client classes. Methods don't add class state.
* Heavily reduce class state to a minimum.
* Improve separation of controller and view concerns.
* Split some templates to partials.
* Leverage dependency incjection correctly: Abstract uses
  inject* methods, client classes use constructor DI.
* Remove user access checks since the entire Template
  module is 'admin only', which is checked by middlewares.
* Various general clean ups, variable renamings, better
  structured methods.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Jochen Roth +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Jochen Roth +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 35

Show 15 more files

Review log 2337

Show 612 earlier messages
  1. Christian Kuhn uploaded patch set 1 05/08/22, 08:28

  2. core-ci voted on patch set 1 V -1 05/08/22, 08:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26988

  3. Christian Kuhn uploaded patch set 2 05/08/22, 21:09

  4. core-ci voted on patch set 2 V -1 05/08/22, 21:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27008

  5. Christian Kuhn uploaded patch set 3 05/08/22, 21:57

  6. core-ci voted on patch set 3 V -1 05/08/22, 22:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27010

  7. Christian Kuhn uploaded patch set 4 05/09/22, 09:31

  8. core-ci voted on patch set 4 V -1 05/09/22, 09:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27020

  9. Christian Kuhn uploaded patch set 5 05/09/22, 12:41

  10. core-ci voted on patch set 5 V -1 05/09/22, 12:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27025

  11. Christian Kuhn uploaded patch set 6 05/09/22, 12:51

  12. core-ci voted on patch set 6 V -1 05/09/22, 13:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27026

  1. Christian Kuhn uploaded patch set 7 05/09/22, 14:08

  2. core-ci voted on patch set 7 V +1 05/09/22, 14:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27034

  3. Christian Kuhn updated the commit message in patch set 8 05/09/22, 14:26

  4. core-ci voted on patch set 8 V -1 05/09/22, 14:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27035

  5. core-ci voted on patch set 8 V +1 05/09/22, 14:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27035

  6. Oliver Klee commented on patch set 8 05/09/22, 14:44

    Would it be possible to split this up to make this easier to review, e.g., have the class rename in a separate changeset first?
    Nitpick: Levearge -> Leverage
  7. Jochen Roth voted on patch set 8 V +1 CR +1 05/09/22, 14:57

  8. Oli Bartsch commented on patch set 8 CR -1 05/09/22, 15:03

    Will review soon.
  9. Oli Bartsch commented on patch set 8 05/09/22, 16:57

    Being on page zero (or on no page - visually speaking) now also renders the action menu. However, selecting any other action than "Template Records Overview" ends in a redirect to the overview action. This IMO feels odd UX wise, since it is not clear to the user why selecting one of the displayed actions does not work.
    I'm not quite sure about this. I would actually expect that a list of templates on or below this page is displayed. What is the benefit of having the exactly same list on each an every page? IMO it's more likely that this will confuse admins. What do you think about just extending the "NoTemplate" View with a link to the "Template Records Overview" on pid=0 for now (making this already more visible to unexperienced users) and implement the "page-aware" variant in a separate patch?
    Why do you think that this feature is unknown and of limited use? I use it quite often and I'm sure others too. Actually, I remember there were some forge issues created, directly after we did changes to this functionality in v11. In case there is no technical background for dropping this, I would prefer to keep it for now and maybe make a patch to discuss this separately.

    AbstractTemplateModuleController.php:43

    Why do we declare this as an abstract class? Since it does not define any abstract method, this can just be a "base class".

    DummyController.php:26

    always

    locallang.xlf:37

    Why do we remove this - correct - information?

    locallang_info.xlf:67

    While I don't fully understand this change. The id does no longer match the content which might make it hard for the translation team to adapt.
  10. Oliver Klee commented on patch set 8 05/09/22, 17:05

    AbstractTemplateModuleController.php:43 Reply

    Making the class abstract communicates to the reader that the class is not intended to be instantiated without subclassing, and technically prohibits it.
  11. Christian Kuhn uploaded patch set 9 05/09/22, 17:19

  12. Christian Kuhn commented on patch set 8 05/09/22, 17:19

    Reply

    skipping the menu on pid 0 now.

    Reply

    i'd actually like to keep that view in the drop down and change it to be page-id sensitive, later. what i really don't like is that it's so 'hidden' on page 0. we have no single other place is the backend that behaves this way and hides a useful on page 0. we really should align this.

    Reply

    it's codewise a total mess. and it's a very hidden feature. i asked in the cms channel about it and nobody said 'i use it'. usuability wise, it's also *very* confusing that the tree is suddently limited. i'm pretty sure nobody will *really* miss it. also, it also works only if you have a sys_template record on that page, otherwise you can't add something to the object list. i think a 'bookmark' feature like - if we *really* think we need one here - should be usability wise integrated into the tree display directly. all in all i think we should rather improve the tree by making it quicker and more accessible, for instance with ajax expanding / collapsing. to implement this, the existing feature is a real hindrance.

    Reply

    Done

    AbstractTemplateModuleController.php:43 Reply

    to declare that this is nothing that can be instantiated directly. an abstract is the correct way to go here.

    DummyController.php:26 Reply

    Done

    locallang.xlf:37 Reply

    useless: you can't only click the title, but other columns things, too. additionally, many things in the backend are clickable and there is usually little information about that. i see no point in having that information and it's also an admin module after all.

    locallang_info.xlf:67 Reply

    there is an edit icon exactly in front of that row. that should be more than enough than the ugly parenthesis with the useless 'edit' information. the 'how many lines are in there' is the main information we want to give here.
  13. core-ci voted on patch set 9 V -1 05/09/22, 17:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27041

  14. core-ci commented on patch set 9 05/09/22, 18:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27041

  15. core-ci voted on patch set 9 V +1 05/09/22, 18:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27041

  16. Christian Kuhn uploaded patch set 10 05/09/22, 20:33

  17. core-ci voted on patch set 10 V -1 05/09/22, 20:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27055

  18. Christian Kuhn uploaded patch set 11 05/09/22, 20:46

  19. core-ci voted on patch set 11 V +1 05/09/22, 20:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27056

  20. Stefan Bürk commented on patch set 11 V +1 CR +1 05/09/22, 21:14

    Reply

    Generally, from a "admin" site having the "same" information independent from the selected page (in a first step) is good. Had quite often the "why I do not thet this view -> ah have to selelect page 0 for it" round trip moments. Having thas available as a first move, and doing the additional filtering based on select page in a follow up is a improvement for admins.
  21. Jochen Roth voted on patch set 11 V +1 CR +1 05/10/22, 11:08

  22. Christian Kuhn voted on patch set 11 V +2 CR +2 05/10/22, 11:09

  23. Christian Kuhn merged patch set 12 05/10/22, 11:09

  24. Benni Mack commented on patch set 12 05/10/22, 12:53

    On a personal level, I still use the functionality "The TypoScript Object Browser has a detail view to edit single properties, which then write to a sys_template record." in customer projects, so sad to see it gone (at least a bit).
  25. Stefan Bürk commented on patch set 12 05/10/22, 13:02

    Reply

    That's not correct. This is still possible. If you open a view for a parent key, which has children, there was a button to add that to the "object browsler object list" which was a kind of "path / bookmark" and "filtered" the object tree to this parent key with children only. this os gone, not the detail/edit for properties.