Review main Merged

55464[TASK] Show language mode in Page module

Mathias Schreiber CR +2 V +2 Easy +42 −2 updated 01/28/18, 14:42

Commit message

Editors can now immediately see whether a page is in Free, Connected or
Mixed mode in a certain language.

Review

  • Code review CR +2
    • Alexander Opitz +2
    • Stefan Neufeind +1
    • Andreas Wolf +1
  • Verified V +2
    • Alexander Opitz +2
    • Stefan Neufeind +1
    • Andreas Wolf +1
    • TYPO3com +1 CI

Issues 1

Files 4

Review log 2431

Show 46 earlier messages
  1. Mathias Schreiber uploaded patch set 1 01/26/18, 18:43

  2. TYPO3com voted on patch set 1 V -1 01/26/18, 18:43 Completed build in 09s on Fri, 26 Jan, 07:43 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18635

  3. Mathias Schreiber uploaded patch set 2 01/26/18, 19:08

  4. TYPO3com voted on patch set 2 V +1 01/26/18, 19:16 Completed build in 08m 18s on Fri, 26 Jan, 08:16 PM Test Summary: 30301 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18636

  5. Oliver Klee commented on patch set 2 01/26/18, 21:03

    PageLayoutView.php:1288

    Should this empty line (with trailing whitespace) be here?
  6. Mathias Schreiber uploaded patch set 3 01/27/18, 08:05

  1. TYPO3com voted on patch set 3 V +1 01/27/18, 08:13 Completed build in 08m 12s on Sat, 27 Jan, 09:13 AM Test Summary: 30301 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18642

  2. Andreas Wolf voted on patch set 3 V +1 CR +1 01/27/18, 11:27

  3. Oliver Klee commented on patch set 3 01/27/18, 11:36

    PageLayoutView.php:1280

    As good practice, all switch statements should have a default branch (even if it does nothing). However, semantically this should be an if/elseif chain instead.

    PageLayoutView.php:1287

    strict comparison, please: != -> !==

    locallang_layout.xlf:319

    Why this unusual capitalization for all three labels ("Free Mode" instead of "Free mode")?
  4. Alexander Opitz commented on patch set 3 CR -1 01/27/18, 11:44

    PageLayoutView.php:1269

    Missing check if not empty (see inside newLanguageButton function) And for me it is more misusing of the switch command. ;)
  5. Andreas Wolf commented on patch set 3 01/27/18, 11:45

    locallang_layout.xlf:319 Reply

    We defined these names, so I'd call them "Eigennamen". Thus, full capitalization.
  6. Mathias Schreiber uploaded patch set 4 01/27/18, 12:45

  7. TYPO3com voted on patch set 4 V +1 01/27/18, 12:54 Completed build in 09m 00s on Sat, 27 Jan, 01:54 PM Test Summary: 30301 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18654

  8. Andreas Wolf voted on patch set 4 V +1 CR +1 01/27/18, 13:02

  9. Alexander Opitz commented on patch set 4 CR -1 01/27/18, 13:03

    The array check is still missing, also the switch(true) schould be IMHO an if/else chain
  10. Mathias Schreiber commented on patch set 4 01/27/18, 13:10

    The check is irrelevant and makes the block harder to read. If the array keys should ever not be set half of the module would break in the first place. We can agree to disagree on switch vs if/else as in practice it's completely irrelevant. If you compare https://gist.github.com/wmdbMattes/4baaf7d209fe895bc2d936593e7333ab I think you will get the point about readability. Your -1 boils down to a matter of your personal preference over mine which is impossible to solve.
  11. Oliver Klee commented on patch set 4 CR -1 01/27/18, 13:25

    -1 for having the if/elseif structure. The code should reflect the intent as clearly as possible. In the gist, the two codes snippets are semantically different (the if/elseif chain has different conditions). Everybody, please keep in mind that the point of a review is to get the code in the best shape it could be. So please be as open as possible to other persons' ideas about things that can be improved.
  12. Alexander Opitz commented on patch set 4 01/27/18, 13:28

    The check is relevant to prevent PHP notice messages. If it is wrong somewhere else (namely in the checkIfTranslationsExistInLanguage function) we should fix it there and not ignoring the fact. To the if/else, it seams it isn't only my personal preference, as Oliver Klee also commented this.
  13. Mathias Schreiber uploaded patch set 5 01/27/18, 14:48

  14. TYPO3com voted on patch set 5 V +1 01/27/18, 14:56 Completed build in 07m 47s on Sat, 27 Jan, 03:56 PM Test Summary: 30358 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18661

  15. Mathias Schreiber uploaded patch set 6 01/27/18, 15:31

  16. TYPO3com voted on patch set 6 V +1 01/27/18, 15:36 Completed build in 05m 31s on Sat, 27 Jan, 04:36 PM Test Summary: 30358 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18663

  17. Andreas Wolf updated the commit message in patch set 7 01/27/18, 18:20

  18. Andreas Wolf voted on patch set 7 V +1 CR +1 01/27/18, 18:22

  19. TYPO3com voted on patch set 7 V +1 01/27/18, 18:26 Completed build in 05m 39s on Sat, 27 Jan, 07:26 PM Test Summary: 30358 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18664

  20. Alexander Opitz commented on patch set 7 V +1 CR +1 01/27/18, 23:31

    Fine with me, will wait for Oliver. The only point, for later, the function checkIfTranslationsExistInLanguage doesn't only do what the name intends todo. Also checking if 'hasStandAloneContent' and 'hasTranslations' could be fully replaced by the new 'mode'.
  21. Oliver Klee commented on patch set 7 01/28/18, 00:08

    The switch construct now looks good to.
  22. Mathias Schreiber commented on patch set 7 01/28/18, 08:29

    > Also checking if 'hasStandAloneContent' and 'hasTranslations' could be fully replaced by the new 'mode'. I tried that but I still needed the member var. Without using it (aka setting in local var in checkIfLanguageExists()) the result of the loop differs. Arguably the usage outside of the method could be adjusted but it makes no difference if the goal is to remove the hasTranslations key in the member var. If you wanna dive into that, be my guest.
  23. Stefan Neufeind commented on patch set 7 V +1 CR +1 01/28/18, 12:52

    I assume this was discussed as being fine to backport to 8.7 even though it is a slight change in behaviour for 8.7 LTS? Imho it's worth to have this as it can prevent headaches for the editors.
  24. Alexander Opitz commented on patch set 7 V +2 CR +2 01/28/18, 14:42

    Taking Oliver Klees comment as accepted
  25. Alexander Opitz merged patch set 8 01/28/18, 14:42