Code review comment for lp:~adeuring/launchpad/bug-513382

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Hi Abel,

Sorry if I'm stepping into the code-review, but here are a few thoughts for implementation.

Just in case you haven't seen it, you can find out more details about sprites at: https://dev.launchpad.net/UI/CssSprites . As Edwin mentioned, you should be able to use something like:

<span class="sprite person" title="whatever"></span> (generating it from TAL of course),

but given that this will be used in multiple places, I think it would be worthwhile creating your own formatter, similar to the icon formatter that you've already got for bugs (in c/l/webapp/tales.py), so you could do something like:

<span tal:replace="structure bug/fmt:heat"></span>

That would allow you to generate the title too. We could even give the span textual content (ie. 'Heat level 4' or something more appropriate) for accessibility and hide it via the CSS, if you're keen.

What do you think?

@Edwin, are there instructions somewhere for using the sprite_image make target? (other than reading through bin/sprite-util ;) ). Can you please update the above sprite wiki page with a link to some instructions? Thanks!

« Back to merge proposal