62168[BUGFIX] Introduce new icon rendering style "svg-inline-only"
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 2
Files 2
Review log 2430
Show 35 earlier messages
-
Xavier Perseguers uploaded patch set 1 10/31/19, 11:08
-
TYPO3com voted on patch set 1 V -1 10/31/19, 11:19 Completed build in 11m 21s on Thu, 31 Oct, 11:19 AM Test Summary: 2 of 48438 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37895
-
TYPO3com voted on patch set 1 V +1 01/14/20, 11:16 Completed build in 46m 47s on Tue, 14 Jan, 11:16 AM Test Summary: 69566 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39889
-
Jörg Bösche voted on patch set 1 V +1 CR +1 01/14/20, 12:10
-
Benjamin Kott voted on patch set 1 CR +1 01/16/20, 14:46
-
Benni Mack voted on patch set 1 V +2 CR +2 01/16/20, 14:47
-
Benni Mack commented on patch set 1 V 0 CR 0 01/16/20, 14:49
aaah, see frank's comment here... https://review.typo3.org/c/Packages/TYPO3.CMS/+/61421 -
Frank Nägler commented on patch set 1 CR -2 01/17/20, 14:30
sorry, but I have to block this patch. This change will break the SVG page tree. The inline markup is required for the bitmap icons in the tree. If this patch gets merged, all bitmap icons in the page tree will disappear. -
Frank Nägler voted on patch set 1 CR -1 01/17/20, 14:31
-
Markus Klein uploaded patch set 2 04/27/20, 11:47
-
Markus Klein commented on patch set 2 CR -1 04/27/20, 11:51
breaks the rendering for module sections again, because they relay on CSS being applied, which is not possible when not inlined. -
Markus Klein voted on patch set 2 V -1 04/27/20, 11:51
-
Markus Klein uploaded patch set 3 04/27/20, 12:24
-
Markus Klein updated the commit message in patch set 4 04/27/20, 12:27
-
TYPO3com voted on patch set 3 V -1 04/27/20, 12:39 Completed build in 14m 02s on Mon, 27 Apr, 12:39 PM Test Summary: 1 of 74141 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3048
-
TYPO3com voted on patch set 4 V -1 04/27/20, 12:43 Completed build in 15m 12s on Mon, 27 Apr, 12:43 PM Test Summary: 72697 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3049
-
Markus Klein commented on patch set 5 04/27/20, 12:55
Published edit on patch set 4. -
Markus Klein voted on patch set 5 V -1 CR -1 04/27/20, 12:56
-
Markus Klein uploaded patch set 6 04/27/20, 12:56
-
TYPO3com voted on patch set 5 V -1 04/27/20, 13:00 Completed build in 04m 23s on Mon, 27 Apr, 01:00 PM Test Summary: 10511 of 73818 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3051
-
TYPO3com voted on patch set 6 V +1 04/27/20, 13:10 Completed build in 12m 24s on Mon, 27 Apr, 01:10 PM Test Summary: 73655 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3052
-
Markus Klein voted on patch set 6 V +1 CR +1 04/27/20, 13:31
-
Benjamin Franzke commented on patch set 6 CR -1 04/27/20, 15:14
BackendModuleRepository.php:371UnresolvedI think we should rather fix the 'inline' definition of the BitmapIconProvider instead of creating a new mode (that is actually hard to understand). Does anyway know where 'inline' with BitmapIconProvider is actually used/working currently? I guess in the pagetree? I mean, it generates a HTML Tag (<img>) in generateMarkup(), but an <image> in generateInlineMarkup(). That means one method is suited for HTML the other for SVG only. The SVG Inline Provider is different, it *always* generates a <svg> as root tag, which is both compatible with HTML and SVG context(s). The BitmapIconProvider could do so as well by wrapping the <image> tag in a svg in generateInlineMarkup. That would always work as SVGs can be savely be nested and would fix this bug. So, something like this would work as well: ./typo3/sysext/core/Classes/Imaging/IconProvider/BitmapIconProvider.php return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="' . $icon->getDimension()->getWidth() . '" height="' . $icon->getDimension()->getHeight() . '">' . '<image width="' . $icon->getDimension()->getWidth() . '" height="' . $icon->getDimension()->getHeight() . '" xlink:href="' . PathUtility::getAbsoluteWebPath($source) . '"/>' . '</svg>'; -
Markus Klein commented on patch set 6 04/27/20, 18:25
The whole concept is "an evolved construct". A proper API for icon rendering per target format would be needed. But IMO we need a fast fix for now. That is either publishing a new breaking change rst that only SVGs are allowed for modules or we get that code "straight". I don't know if nesting the images in another SVG has any benefit besides touching less PHP code. I only see downsides: - No CSS applicable - Another SVG context for every icon - Useless DOM nodes - Performance is worse for sure So I don't care whether the "svg-inline-only" bla foo is any bad to read, the whole thing is hard to understand already. -
Benjamin Franzke commented on patch set 6 CR 0 04/27/20, 19:17
> The whole concept is "an evolved construct". A proper API for icon rendering per target format would be needed. I agree. It's actually misleading that generateInlineMarkup actually just creates a non-inlined <image> tag instead of adding a data-url using base64 encoding or so… That's what behaviour of inlining svg would match. > But IMO we need a fast fix for now. I see, but adding new API means we actually need to maintain that. > I don't know if nesting the images in another SVG has any benefit besides touching less PHP code. I only see downsides: > - No CSS applicable I don't unterstand. CSS can still be applied. > - Another SVG context for every icon SVG icons use svg context anyway. <img> vs <svg><image/></div> for some rare pngs dosn't matter (I think). Note: SVGs in trees are converted to <g> and so would <svg><image/></svg>. > - Useless DOM nodes Ok, yes, for some PNGs, but it fixes (legacy) png icons. > - Performance is worse for sure Not where a lot of svgs are used anyway (like in page/category trees), the <svg> is replaced by a <g> and then used via <use> anyway, see: https://github.com/TYPO3/TYPO3.CMS/blob/v10.4.0/typo3/sysext/backend/Resources/Public/JavaScript/SvgTree.js#L880-L881 I will not block this patch, but I'll propose a different one. Please give it a chance: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64325 I avoided to overwrite this patch to give reviewers a chance to decide what the better approach is. -
Markus Klein commented on patch set 6 04/27/20, 21:55
> > I will not block this patch, but I'll propose a different one. > Please give it a chance: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64325 > > I avoided to overwrite this patch to give reviewers a chance to decide what the better approach is. Fair enough. Thanks. I also don't care too much on how this is fixed, just get it fixed. Regarding your tiny words "legacy png": I disagree on that. PNGs are still not superseded by SVGs (luckily). So png is still a very valid format for a rather dumb icon and authors of modules must not be mobbed when using such. -
Markus Klein commented on patch set 6 V 0 CR 0 04/27/20, 22:00
cast my vote to https://review.typo3.org/c/Packages/TYPO3.CMS/+/64325 -
Benjamin Franzke commented on patch set 6 04/27/20, 23:06
You are right, PNG definitely have their usecases for Icons, especially when talking about size-dependent-detail-levels. "legacy" was the wrong (buzz)word, which I probably used to stress my argument. A term like "some 3rd party png's" would have been better ;) Thanks for reviewing the alternative patch. -
Frank Nägler commented on patch set 6 CR -1 04/28/20, 07:01
Thanks for the patch, but I would prefer the solution of Benjamin Franzke: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64325 I think another markup identifier is not the best solution, becuase it makes it more complex. -
Benjamin Franzke abandoned the change 04/28/20, 07:34
The alternative patch – https://review.typo3.org/c/Packages/TYPO3.CMS/+/64325 – has been merged. This is not needed anymore.