Review main Merged Breaking

65503[!!!][TASK] Refactor create bookmark handling

Christian Kuhn CR +2 V +2 Hard +503 −238 updated 09/05/20, 09:28

Commit message

The backend shortcut / bookmark handlig API was designed to
hand over relevant get/post arguments as key only (eg. 'id').
The underlying code then pulled values from GET/POST or from
SOBE->MOD_SETTINGS. This is ugly, there shouldn't be such
magic: Only controllers know relevant keys and values, so
it should hand them over directly to the shortcut API.

The patch changes this:
* Old and unused ViewHelper f:be.buttons.shortcut is deprecated.
* ViewHelper be:moduleLayout.button.shortcutButton deprecates
  argument 'getVars' and adds new argument 'arguments'.
* Class ShortcutButton has a new setter 'setArguments' that
  accepts all relevant argument key/value pairs to create a
  shortcut. Existing get/set related methods are deprecated.
* Helper methods 'makeShortcutIcon' and 'makeShortcutUrl' of
  class ModuleTemplate are deprecated and implemented in class
  ShortcutButton directly.
* All core usages are adapted to new API.
* Shortcut handling was the last core usage of SOBE, so last
  $GLOBALS['SOBE'] = $this assignments can be finally removed.

Impact:
* Shortcuts to modules not directly reachable via main menu
  do not work due to limits of the module registration API. An
  example is the 'create multiple pages' controller. This issue
  exists before the patch, affected controllers no longer render
  a shortcut button for now.
* The old code usually added the 'route' argument twice for shortcuts.
  This has been resolved. As a side effect, the comparison if a
  shortcuts exists (yellow shortcut icon) fails currently for existing
  shortcuts when the patch is applied: The comparison relies on
  direct string equality since shortcuts always store the final url in
  the database. This storage strategy should be changed with another
  patch that will solve the 'no yellow icon' issue at the same time.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Andreas Kienast +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Andreas Kienast +1
    • TYPO3com +1 CI

Issues 1

Files 39

Show 19 more files

Review log 2742

Show 1017 earlier messages
  1. Christian Kuhn uploaded patch set 1 08/29/20, 15:43

  2. TYPO3com voted on patch set 1 V -1 08/29/20, 15:44 Completed build in 26s on Sat, 29 Aug, 03:44 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5043

  3. Christian Kuhn uploaded patch set 2 08/29/20, 15:46

  4. TYPO3com voted on patch set 2 V +1 08/29/20, 15:57 Completed build in 10m 53s on Sat, 29 Aug, 03:57 PM Test Summary: 73092 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5044

  5. Christian Kuhn uploaded patch set 3 08/29/20, 17:26

  6. TYPO3com voted on patch set 3 V +1 08/29/20, 17:37 Completed build in 10m 46s on Sat, 29 Aug, 05:37 PM Test Summary: 73092 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5045

  7. Christian Kuhn uploaded patch set 4 08/29/20, 18:33

  8. TYPO3com voted on patch set 4 V +1 08/29/20, 18:44 Completed build in 10m 53s on Sat, 29 Aug, 06:44 PM Test Summary: 73092 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5046

  9. Christian Kuhn uploaded patch set 5 08/30/20, 12:01

  10. TYPO3com voted on patch set 5 V +1 08/30/20, 12:12 Completed build in 11m 26s on Sun, 30 Aug, 12:12 PM Test Summary: 73092 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5052

  11. Christian Kuhn uploaded patch set 6 08/30/20, 12:39

  12. TYPO3com voted on patch set 6 V +1 08/30/20, 12:51 Completed build in 12m 00s on Sun, 30 Aug, 12:51 PM Test Summary: 73092 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5053

  13. Christian Kuhn uploaded patch set 7 08/30/20, 14:01

  14. TYPO3com voted on patch set 7 V +1 08/30/20, 14:12 Completed build in 11m 20s on Sun, 30 Aug, 02:12 PM Test Summary: 73098 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5054

  15. Christian Kuhn commented on patch set 7 CR -1 08/30/20, 14:46

    will rename 'variables' to 'arguments' in the API.
  16. Christian Kuhn uploaded patch set 8 08/30/20, 15:59

  17. Christian Kuhn voted on patch set 8 CR -1 08/30/20, 15:59

  1. TYPO3com voted on patch set 8 V +1 08/30/20, 16:10 Completed build in 11m 29s on Sun, 30 Aug, 04:10 PM Test Summary: 73146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5063

  2. Christian Kuhn rebased onto patch set 9 08/31/20, 06:35

  3. TYPO3com voted on patch set 9 V +1 08/31/20, 06:47 Completed build in 11m 42s on Mon, 31 Aug, 06:47 AM Test Summary: 73146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5067

  4. Christian Kuhn uploaded patch set 10 08/31/20, 06:50

  5. Christian Kuhn uploaded patch set 11 08/31/20, 06:54

  6. TYPO3com voted on patch set 10 V +1 08/31/20, 07:04 Completed build in 13m 20s on Mon, 31 Aug, 07:04 AM Test Summary: 73146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5068

  7. TYPO3com voted on patch set 11 V +1 08/31/20, 07:10 Completed build in 15m 38s on Mon, 31 Aug, 07:10 AM Test Summary: 73146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5069

  8. Christian Kuhn uploaded patch set 12 08/31/20, 12:33

  9. TYPO3com voted on patch set 12 V +1 08/31/20, 12:47 Completed build in 13m 17s on Mon, 31 Aug, 12:47 PM Test Summary: 73146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5088

  10. Christian Kuhn uploaded patch set 13 09/01/20, 07:00

  11. TYPO3com voted on patch set 13 V +1 09/01/20, 07:12 Completed build in 11m 46s on Tue, 1 Sep, 07:12 AM Test Summary: 73164 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5093

  12. Christian Kuhn uploaded patch set 14 09/02/20, 09:31

  13. TYPO3com voted on patch set 14 V +1 09/02/20, 09:41 Completed build in 10m 42s on Wed, 2 Sep, 09:41 AM Test Summary: 73164 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5126

  14. Anja Leichsenring commented on patch set 14 09/02/20, 19:57

    I tested around and found some issues with the label creation for the bookmarks menu. Please find the corresponding screenshots attached to the forge issue. The same issues were there before the patch, I think this is the perfect opportunity to fix that while you are on it.
  15. Benni Mack commented on patch set 14 09/04/20, 09:46

  16. Christian Kuhn commented on patch set 14 09/04/20, 09:48

    > Patch Set 14: > > I tested around and found some issues with the label creation for the bookmarks menu. Please find the corresponding screenshots attached to the forge issue. > The same issues were there before the patch, I think this is the perfect opportunity to fix that while you are on it. Yeah. The descriptions are quite stupid sometimes. There is more magic that should be made explicit instead. This should be another patch.
  17. Christian Kuhn commented on patch set 14 09/04/20, 09:49

    > Patch Set 14: > > please also see https://forge.typo3.org/issues/42109 Yeah. Problem is we probably shouldn't just add the workspace param everywhere. Unsure how to resolve the issue and clearly a different patch.
  18. Alexander Schnitzler commented on patch set 14 09/04/20, 10:19

    I tried reviewing this patch but I feel like there are too much things being changed at the same time. Is it possible to break down the patch into at least two pieces?

    HelpController.php:173

    What happened to this check?
  19. Christian Kuhn commented on patch set 14 09/04/20, 16:02

    Hmm, I thought the patch in itself is quite cohesive and only changes what is connected: The api change with usage adaptions and the sobe stuff as (quite obvious) drive-by. I could hack it into more pieces but don't see a huge benefit with it. Do you see a significant improvement that is really required if we split this somehow?

    HelpController.php:173 Reply Unresolved

    The shortcut button object does that internally, too, so the check is not needed.
  20. Andreas Kienast commented on patch set 14 V -1 CR -1 09/05/20, 08:37

    on it

    BackendUserGroupController.php:99

    Since backend user comparison works with states only, I'd question whether bookmarking this module makes sense at all.

    Breaking-92132-LastRemainsOfGlobalsSOBERemoved.rst:4 Unresolved

    Commit subject must have [!!!] prefix then

    SchedulerModuleController.php:1376 Unresolved

    I can set a bookmark in a scheduler task edit view, but the bookmark will always lead me to the main module.
  21. Andreas Kienast uploaded patch set 15 09/05/20, 08:39

  22. Andreas Kienast commented on patch set 15 V +1 CR +1 09/05/20, 08:40

    BackendUserGroupController.php:99 Reply Unresolved

    meh, that's not that easy possible without adding more hacks in the template.
  23. TYPO3com voted on patch set 15 V +1 09/05/20, 08:53 Completed build in 13m 15s on Sat, 5 Sep, 08:53 AM Test Summary: 73206 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5258

  24. Anja Leichsenring voted on patch set 15 V +2 CR +2 09/05/20, 09:28

  25. Anja Leichsenring merged patch set 16 09/05/20, 09:28