[TYPO3-core] RFC#15079 Feature: TYPO3 misses an SpriteGenerator

Steffen Ritter info at rs-websystems.de
Sat Aug 7 16:28:09 CEST 2010


Am 07.08.2010 16:08, schrieb Xavier Perseguers:
> Hi,
Hi,
thanks for your very Deep review and testing.

I'll try to comment on all this as deep as reviewed it, but will ommit 
the cgl nitpickings, as they do not need to becommented :) All I do not 
comment just will be "full ack".

 > set). This works great as long as the directory you give contains 1
 > level of subdirectories with categorized icons, just as info for others.

It should work without folders too, but only with setting 
->setOmmitSpriteNameInIconName(FALSE)

 > - When you have a filename with spaces in it, you get an invalid CSS 
class:
that's true, but i think we better just du not support "spaces" in 
sprite-icons.

 > - nitpicking: there is an empty line in generated CSS when you have all
 > your generated classes with background position. This is due to the
 > removal of the "most common width/height combination".

I know, but since the css always will be compressed for backend, Steffen 
G. Compressor takes care of removing superfloues whitespaces and lines.

 > - CSS could be even more optimized when all icons of a group do not have
 > the most common size. In such case, let's take a few 128x128 icons, the
 > base class that gives the image to use says 16x16 as size but then
 > override in single sprite the height/width to use 128x128. This could be
 > optimized to say 128x128 in the base definition and not override this
 > after that.

if you have an idea how to implement it easy without having a big 
refactoring

 > - first icon of last row of icons in the generated sprite does not have
 > a transparent background, this is not related to your patch but should
 > be fixed anyway.
the icon in core never was transparent :) this is the case ever :P we or 
at least I know about it ^^

 > - Could you generate some notice when files could not be written? I had
 > no write access at beginning but did not get any error.
I use functionality from t3lib_div... I think it would be the part of 
t3lib div functionality to logg if something fails.

 > Question: as I did not keep track of all discussions regarding sprites,
 > what is your spritegenerator in regards to interface
 > t3lib_spritemanager_SpriteIconGenerator and the already existing
 > "fall-back" for spritemanager which is in Core (other class from you).
the sprite-generator is an standalone class.
Has nothing to do with the rest. Two further classes which implement the 
interface wll be presented in another rfc as soon as the "API" of the 
generator ist accepted and committed, they will use this one.

 > Question 2: does the native t3lib_iconworks (or something like that)
 > work with the generated patch? I guess so but documentation will be
 > welcomed. Will you consider getting in touch with Tolleiv to enhance his
 > already great article who describes the sprite system to enhance it with
 > this generator?
All what Tolliev wrote is completely fine... The API is already there, 
the generation is transparently handled in background :)

Thanks again for your review ...

regards

Steffen


More information about the TYPO3-team-core mailing list