Dan Miron wrote:
> Vincent Massol wrote:
>> On Feb 18, 2009, at 5:20 PM, Dan Miron wrote:
>>
>>
>>> Hi,
>>> Regarding the http://jira.xwiki.org/jira/browse/XWIKI-2964 issue, this
>>> is how I see it:
>>> - Grabbing the icons from the silk iconset
>>> - Creating a macro called 'icon' with the following parameters:
>>> - fileName (required) the name of the file which holds the
>>>
>> I don't like that parameter name. I prefer the more anonymous "name"
>>
>>
>>> icon; here I see two possible approaches:
>>> - with (optional)
>>> - height (optional)
>>>
>> I don't think we should specify width and height since we're using
>> bitmaps. Would be nice to use SVG for sure but 1) the silk icon set is
>> not SVG and 2) I don't think ie6 supports SVG out of the box.
>>
>>
>>> An example of usage would be the following:
>>> {{icon fileName="arrow_out.gif" with="20" height="20" /}}
>>>
>> I'd prefer:
>>
>> {{icon name="arrow_out"//}}
>>
>> Now for easy emoticons usage I think (I'm not sure) that we could use
>> a Rendering Transformation instead that would recognize special
>> characters (such as :) ) and internally transform them into icon macros.
>> However there's a use case I haven't thought about which is that the
>> xwiki syntax renderer should probably not use transformed XDOM to
>> generate wiki syntax since otherwise that makes Transformations
>> persistent. Then there's the question of the WYSIWYG editor... Need to
>> think some more about this...
>>
>> At least you could start implementing the icon macro before we agree
>> on the emoticon part.
>>
>
> I could go on with {{icon name="arrow_out"//}} but this means that the
> extension will be assumed as ".gif" but it offers the advantage that
> it's quite intuitive.
Not necessarily. You can search for all files with the base name equal
to the one given as an argument, and any (or a set of possible) extension.
> On the other hand, this is what Anca says:
>
> -------------------------
> Would it be any difference between this macro and the image markup
> ([[image:reference]] or image:reference), besides the way the image file
> resolution (image: looks it up as an attachment whereas the {{icon}} macro
> would
> getit from the silk icon set) ?
>
> Any way we could make these icons accessible as image: references instead of
> building a whole new macro for it, for syntax simplicity?
>
>
> -------------------------
>
> So what do you think? Should I go ahead with what I proposed above? I'd
> say yes, because it's more intuitive than using image:reference.
I'd go with a new macro. They have different meanings and usage
scenarios, since the image macro is supposed to display user
attachments, while the icon is supposed to display platform images. The
way I see it, {{icon}} should not always use silk icons, but:
- we should establish a set of core icons (names) that should always be
available, an abstract icon set that XWiki supports
- we should provide a default "implementation" for it, using the silk icons
- we should (in the future) allow to plug in and choose different icon
sets (for each skin, for each user, for each space, etc.)
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs