Review main Merged

74196[TASK] Render notification when saving a record succeeded

Andreas Kienast CR +2 V +2 Normal +58 −3 updated 07/04/22, 20:13

Commit message

To improve both, UX and acceptance tests (incl. automated screenshots
for docs), a notification is now dispatched when records were saved via
EditDocumentController.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Björn Jacob +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Björn Jacob +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 4052

Show 2127 earlier messages
  1. Andreas Kienast uploaded patch set 1 04/06/22, 09:37

  2. core-ci voted on patch set 1 V -1 04/06/22, 09:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25605

  3. Andreas Kienast uploaded patch set 2 04/06/22, 09:54

  4. core-ci voted on patch set 2 V +1 04/06/22, 10:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25609

  5. Oli Bartsch voted on patch set 2 V +1 CR +1 04/06/22, 10:20

  6. Oli Bartsch voted on patch set 2 V 0 CR 0 04/06/22, 10:20

  7. Oli Bartsch commented on patch set 2 V -1 04/06/22, 11:00

    We should also handle "edge cases", such as multiple record edit.
  8. Björn Jacob commented on patch set 2 V -1 04/06/22, 11:26

    Saving an empty content element of type "Text" returns some markup in the flash message. Will add a screenshot to the issue.
  9. Oliver Klee commented on patch set 2 04/06/22, 13:35

    typo: savong -> saving
    has succeeded
  10. Andreas Kienast uploaded patch set 3 04/06/22, 13:57

  11. Andreas Kienast commented on patch set 3 CR -1 04/06/22, 13:58

    Still needs more thoughts regarding mass edit
  12. core-ci voted on patch set 3 V -1 04/06/22, 14:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25649

  13. Oliver Klee wrote 04/06/22, 14:10

    Removed cc Oliver Klee.
  14. Andreas Kienast uploaded patch set 4 04/06/22, 14:41

  15. core-ci voted on patch set 4 V +1 04/06/22, 14:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25655

  16. Oli Bartsch commented on patch set 4 V +1 04/06/22, 15:40

    Works

    EditDocumentController.php:403

    I personally would prefer to encapsulate this into an own method. Keeps the mainAction clean, which IMO is important to quickly grasp the flow of this monster.

    EditDocumentController.php:716

    Is this a left over comment?

    EditDocumentController.php:733

    Any reason for not using "implode(LF, $messages)"?

    locallang_alt_doc.xlf:154

    Since this message might be used several times, I suggest to end it with a full stop.

    DataHandler.php:9205

    This reads like this list might differ from the log error messages. Suggest to add a "the": a list of the erroneous records

    DataHandler.php:9230

    Do we really need this? This would be the only place in core with such early return. In case no rows are in the result the "while" will be skipped anyways and the empty $affectedRecords array is returned right away.
  17. Oli Bartsch commented on patch set 4 V 0 04/06/22, 16:09

    Reply

    Checked in more detail and this now might lead to false notifications, e.g. when duplicating a record while selecting the "No, just duplicate the original" action. Also the added flash messages are not properly resolved in case the return target is not "record_edit". For example edit a record, click on "Close" > "Save & Close". The flash message will then be added to the redirect target module and not displayed as notification.
  18. Andreas Kienast uploaded patch set 5 04/29/22, 10:10

  19. Andreas Kienast commented on patch set 5 04/29/22, 10:12

    Reply

    I have no idea how to solve the "Save & Close" case properly without introducing "global" notifications :/.
  20. core-ci voted on patch set 5 V -1 04/29/22, 10:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26652

  21. Oliver Klee commented on patch set 5 04/29/22, 12:33

    EditDocumentController.php:2367

    Please let's have a PHP type annotation for the parameter (also for isDuplicateAction). Probably something along the lines of array<string, string> or array<string, int> or array<string, string|int>.

    EditDocumentController.php:2376

    We can have an array type declaration here.

    DataHandler.php:9208

    Please let's have a PHPDoc type annotation for the return type with more details: array<int, non-empty-string>
  22. Andreas Kienast commented on patch set 5 CR -2 05/09/22, 17:35

    -2 for now, I came up with another idea how to solve the notification vs. flash message thing
  23. Andreas Kienast uploaded patch set 6 05/09/22, 19:18

  24. Andreas Kienast commented on patch set 6 CR -2 05/09/22, 19:18

  25. core-ci voted on patch set 6 V -1 05/09/22, 19:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27050

  26. Andreas Kienast rebased onto patch set 7 06/21/22, 10:55

  27. Andreas Kienast voted on patch set 7 CR 0 06/21/22, 10:55

  1. core-ci voted on patch set 7 V +1 06/21/22, 11:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28297

  2. Oliver Klee commented on patch set 7 06/21/22, 13:04

    Reply

    Done

    Reply

    Done
  3. Andreas Kienast commented on patch set 7 06/22/22, 06:55

    Reply

    Done

    EditDocumentController.php:403 Reply

    Done

    EditDocumentController.php:716 Reply

    Done

    EditDocumentController.php:733 Reply

    Done

    EditDocumentController.php:2367 Reply

    Done

    EditDocumentController.php:2376 Reply

    Done

    locallang_alt_doc.xlf:154 Reply

    Done

    DataHandler.php:9205 Reply

    Done

    DataHandler.php:9208 Reply

    Done

    DataHandler.php:9230 Reply

    Done
  4. Nikita Hovratov uploaded patch set 8 06/23/22, 19:33

  5. Nikita Hovratov commented on patch set 8 06/23/22, 19:37

    I like this change! I wonder why we didn't add it long time ago. Would be cool to have this for Site Configuration, too!
  6. core-ci voted on patch set 8 V +1 06/23/22, 19:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28367

  7. Oli Bartsch commented on patch set 8 V -1 06/24/22, 12:41

    Some problems I encountered: * Inline relations are added to the notification as well but their record title seems to be not resolves properly * Editing a record, clicking on "+ new" and selecting "no, just add" triggers the notification, while the record is actually not saved
  8. Andreas Kienast uploaded patch set 9 06/24/22, 13:23

  9. Andreas Kienast uploaded patch set 10 06/24/22, 13:25

  10. core-ci voted on patch set 9 V +1 06/24/22, 13:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28388

  11. core-ci voted on patch set 10 V +1 06/24/22, 13:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28389

  12. Oliver Klee wrote 06/24/22, 13:59

    Removed cc Oliver Klee.
  13. Anne Feldten voted on patch set 10 V +1 06/24/22, 15:14

  14. Felix P. commented on patch set 10 V +1 06/24/22, 15:29

    Should a notification be triggered when you copy & paste a record? like a content element.
  15. Andreas Kienast commented on patch set 10 06/24/22, 15:36

    Reply

    We can do that in a separate patch, if that's ok for you. I don't want to clutter this one more.
  16. Oli Bartsch commented on patch set 10 V -1 06/24/22, 22:38

    Works great already! Just found one other edge case: Edit an existing record => Click "Duplicate" => Click "Yes, save and duplicate this record" => Instead of the record title, "[No Title]" is displayed in the notification.
  17. Andreas Kienast commented on patch set 10 07/01/22, 13:50

    Reply

    Nice, I get an exception instead _sad_
  18. Andreas Kienast uploaded patch set 11 07/01/22, 13:57

  19. core-ci voted on patch set 11 V +1 07/01/22, 14:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28577

  20. Andreas Kienast uploaded patch set 12 07/01/22, 15:15

  21. Oli Bartsch commented on patch set 12 V +1 CR +1 07/01/22, 15:18

    🥳
  22. core-ci voted on patch set 12 V +1 07/01/22, 15:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28589

  23. Björn Jacob commented on patch set 12 V +1 CR +1 07/04/22, 19:52

    Awesome. Works fine.
  24. Oli Bartsch voted on patch set 12 V +2 CR +2 07/04/22, 20:12

  25. Oli Bartsch merged patch set 13 07/04/22, 20:13