Review main Merged

19398[BUGFIX] CSS concatenation needs to care about media types

Georg Ringer CR +2 V +2 Normal +151 −18 updated 07/19/15, 13:56

Commit message

Previously only files with media="all" have been concatenated but there
is no reason why not the others should be concatenated too.
The forceOnTop option now works for each media type.

Review

  • Code review CR +2
    • Jigal van Hemert +2
  • Verified V +2
    • Jigal van Hemert +2

Files 2

Review log 53

Show 28 earlier messages
  1. Georg Ringer uploaded patch set 2 05/27/13, 17:19

  2. Philipp Gampe commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve
  3. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

  4. Mr. Jenkins commented on patch set 2 05/27/13, 17:19

  5. Jost Baron commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve
  6. Wouter Wolters uploaded patch set 3 05/28/13, 20:15

  7. Wouter Wolters commented on patch set 3 05/28/13, 20:16

    Looks like a same review is pending: https://review.typo3.org/#/c/14256/
  8. Mr. Jenkins commented on patch set 3 05/28/13, 20:16

  9. Stefan Neufeind commented on patch set 3 11/24/13, 22:27

    As Wouter mentioned there is an almost identical review over at https://review.typo3.org/14256 - please arrange with that author which of your two patches to move further and work on.
  10. Stefan Neufeind commented on patch set 3 11/24/13, 22:27

    Maybe handling no media and "all" equal?
  11. Stefan Neufeind commented on patch set 3 02/24/14, 22:58

    in case this one is merged, please abandon https://review.typo3.org/14256
  12. Georg Ringer uploaded patch set 4 11/09/14, 20:39

  13. Stefan Neufeind commented on patch set 4 11/23/14, 23:08

    ResourceCompressor.php:180

    I guess "media" might also be not set/empty? Then tread as "all". And maybe lowercase it.
  14. Markus Klein commented on patch set 4 11/23/14, 23:59

    ResourceCompressor.php:202

    why merging the cssFiles twice?
  15. Georg Ringer uploaded patch set 5 11/24/14, 08:33

  16. Markus Klein commented on patch set 5 11/24/14, 08:51

    ResourceCompressor.php:198

    why removing this comment and switching the order at all?
  17. Stefan Neufeind uploaded patch set 6 11/26/14, 14:27

  18. Stefan Neufeind commented on patch set 6 CR +1 11/26/14, 14:28

    @Markus: talked to Georg; array_merge-order is back to current state again now
  19. Markus Klein commented on patch set 6 CR +1 11/26/14, 17:58

    Looks good, but no way for me to test this.
  20. Georg Ringer commented on patch set 6 11/26/14, 20:08

    test example is in forge
  21. Stefan Neufeind commented on patch set 6 V -1 11/30/14, 22:21

    Files are defined starting with "all" first. But since the array_merge inside the loop now does (and also did before!) put additional files "on top", this results in media="print" being added first and media="all" added below that. @Markus: Either we should do an array_reverse on the list - or change the array_merge as it was in the previous changeset to append new files instead of putting them on top. Feel free to contact me to discuss this in more detail, if needed.
  22. Markus Klein commented on patch set 6 CR 0 11/30/14, 22:57

    Don't know exactly what the problem is, but this now shouts for unit tests
  23. Georg Ringer commented on patch set 4 12/07/14, 18:33

    I would change that back to $cssFiles = array_merge($cssFiles, array($targetFileRelative => $concatenatedOptions), $cssFiles); @markus:opinions?
  24. Stefan Neufeind commented on patch set 6 12/07/14, 19:30

    @Georg: I agree we should swap that array_merge back. That worked for me when testing.
  25. Markus Klein commented on patch set 6 12/07/14, 22:08

    swap it, if it works. but still some unit tests please
  26. Mathias Schreiber wrote 12/14/14, 16:01

    Topic changed from 33137 to Frontend
  27. Markus Klein commented on patch set 6 CR -1 02/01/15, 23:24

    Unit tests please.
  28. Benni Mack commented on patch set 6 03/28/15, 19:03

    Georg, are you going to work on that again? Would be nice!
  1. Loek Hilgersom uploaded patch set 7 07/16/15, 22:26

  2. Andreas Wolf uploaded patch set 8 07/17/15, 09:41

  3. Andreas Wolf uploaded patch set 9 07/17/15, 09:45

  4. Andreas Wolf commented on patch set 9 CR +1 V +1 07/17/15, 09:46

    Added unit test, fixed some minor issues in the original patch.
  5. Wouter Wolters commented on patch set 9 07/17/15, 09:48

    Wait with merge here until Loek had a look at it please! He was working on it heavily yesterday evening.
  6. Daniel Goerz commented on patch set 9 07/17/15, 10:01

    ResourceCompressor.php:194

    Wasn't this changed to !empty() recently?
  7. Andreas Wolf uploaded patch set 10 07/17/15, 10:06

  8. Daniel Goerz voted on patch set 10 CR +1 07/17/15, 10:08

  9. Andreas Wolf commented on patch set 10 V -1 07/17/15, 13:33

    Blocking merge as requested by Wouter until Loek has had a look again.
  10. Loek Hilgersom uploaded patch set 11 07/17/15, 23:20

  11. Andreas Wolf voted on patch set 11 CR +1 V +1 07/17/15, 23:44

  12. Stefan Neufeind commented on patch set 11 07/18/15, 01:43

    ResourceCompressorTest.php:156

    Separated yes - but you work with only one file each. Is that okay for the scope of this test? Or should we maybe use a mix list of at least two files each and see they are correctly sorted into two parts?
  13. Andreas Wolf commented on patch set 11 CR 0 07/18/15, 07:24

    Found two minor issues in the tests that could be fixed.

    ResourceCompressorTest.php:156 Reply

    Good point. Could be good to add this for type "screen". For "all" this should be covered by the other tests.

    ResourceCompressorTest.php:259

    Thinking about it again… this could probably be inlined. Loek, would you take care of that?
  14. Andreas Wolf uploaded patch set 12 07/18/15, 08:18

  15. Andreas Wolf voted on patch set 12 CR +1 V +1 07/18/15, 09:58

  16. Loek Hilgersom commented on patch set 12 07/18/15, 10:02

    I'm playing around with the tests, please don't merge yet
  17. Anja Leichsenring commented on patch set 12 CR +1 V +1 07/18/15, 10:03

    verified by unit tests, one more real verified would be nice.
  18. Andreas Wolf commented on patch set 12 CR -1 07/18/15, 10:05

    Blocking merge as Loek is working on some more tests currently.
  19. Loek Hilgersom commented on patch set 12 07/18/15, 13:11

    I tried adding a dataprovider for additional tests but it was getting too hairy, so let's stick with this. Your votes please :-)
  20. Andreas Wolf commented on patch set 12 CR 0 07/19/15, 10:34

    Will look at the code again later on.
  21. Jigal van Hemert voted on patch set 12 CR +1 07/19/15, 10:45

  22. Jigal van Hemert commented on patch set 12 07/19/15, 10:51

    I'm not quite sure it should be backported to 6.2; previously the css without media="all" would not be concatenated and things might break after merging those files (remember the limit of 4095 selectors in single file for IE9 and lower?)
  23. Andreas Wolf updated the commit message in patch set 13 07/19/15, 11:33

  24. Jigal van Hemert commented on patch set 13 CR +2 V +2 07/19/15, 13:56

    Andreas, Anja and me agreed to drop 6.2. All votes can be kept.
  25. Jigal van Hemert merged patch set 13 07/19/15, 13:56