Re: [xwiki-users] XWiki/2.1 analogue for #message("message") macro

2013-09-17 Thread Vincent Massol

On Sep 10, 2013, at 9:23 PM, Valdis Vītoliņš  wrote:

> Vincent,
> actually I'm happy with both styles for boxes, because I regularly have
> several types of them in one page:
> 
> 1. code excerpts ({{code}} with sharp corners, difference from {{box}}
> and >quote is monospace font),

Makes sense to have sharp corners for the code macro.

> 2. informational messages (e.g. {{warning}}, {{info}} — rounded ones
> with regular font. I added {{message}} custom macro without icon for
> more generic cases).
> 
> I think different box styles make pages richer not only in appearance
> but also helps to grok meaning of content. Therefore I don't see need to
> make all boxes looking "nice and rounded".

Sure, the question that remains is whether the box macro should have sharp 
corners or if instead it should have round corners as the other info, error, 
warning, success macros.

Generally speaking I think that we should only 1 generic macro called {{box}} 
which would have:
* an optional title 
* an optional image/icon
* content
* style (default is round corners)

Then we should refactor the info, warning, success and error macros to be 
specializations of this box macro. Same for the code macro which should also be 
a specialization of this box macro.

See also http://jira.xwiki.org/browse/XWIKI-9432

WDYT?

Thanks
-Vincent

> Also, It would be good idea to add description of all different "Boxes"
> in Syntax guide (at least for these I know):
> 
> {{code}}
> {{box}}
> {{{block group}}}
>> quote
> {{info}}
> {{error}}
> {{success}}
> 
> Valdis
> 
>> Hi Valdis,
>> 
>> I've opened http://jira.xwiki.org/browse/XWIKI-9432
>> 
>> I reckon that the reason you didn't use the {{box/}} macro was just because 
>> it looks a little bit less nice that the other style (round corners, margin 
>> for the text), right?
>> 
>> Thanks
>> -Vincent
>> 
>> On Sep 10, 2013, at 11:26 AM, Valdis Vītoliņš  wrote:
>> 
>>> I decided, that the most elegant solution was to add custom XWiki macro
>>> called "message" whith body:
>>> {{velocity}}(% class="box plainmessage"%
>>> )((($xcontext.macro.content))){{/velocity}}
>>> 
>>> http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial
>>> 
>>> Valdis
 I'm migrating documents to XWiki/2.1 syntax and wonder, what would be
 the precise analogue for #message("message") macro, which produces
 following HTML:
 
 message
 
 I found only similar ones:
 
> quote
 
 which produces
 quote
 (IMHO works only for single paragraph even with {{{groups}}})
 
 and
 {{info}}info{{/info}}
 
 which produces
 info
 
 Can I extend XWiki somehow that I can use 
 {{message}}message{{/message}} with appropriate HTML output?
 
 Thanks!
 Valdis

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] XWiki/2.1 analogue for #message("message") macro

2013-09-10 Thread Valdis Vītoliņš
Vincent,
actually I'm happy with both styles for boxes, because I regularly have
several types of them in one page:

1. code excerpts ({{code}} with sharp corners, difference from {{box}}
and >quote is monospace font),

2. informational messages (e.g. {{warning}}, {{info}} — rounded ones
with regular font. I added {{message}} custom macro without icon for
more generic cases).

I think different box styles make pages richer not only in appearance
but also helps to grok meaning of content. Therefore I don't see need to
make all boxes looking "nice and rounded".

Also, It would be good idea to add description of all different "Boxes"
in Syntax guide (at least for these I know):

{{code}}
{{box}}
{{{block group}}}
>quote
{{info}}
{{error}}
{{success}}

Valdis

> Hi Valdis,
> 
> I've opened http://jira.xwiki.org/browse/XWIKI-9432
> 
> I reckon that the reason you didn't use the {{box/}} macro was just because 
> it looks a little bit less nice that the other style (round corners, margin 
> for the text), right?
> 
> Thanks
> -Vincent
> 
> On Sep 10, 2013, at 11:26 AM, Valdis Vītoliņš  wrote:
> 
> > I decided, that the most elegant solution was to add custom XWiki macro
> > called "message" whith body:
> > {{velocity}}(% class="box plainmessage"%
> > )((($xcontext.macro.content))){{/velocity}}
> > 
> > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial
> > 
> > Valdis
> >> I'm migrating documents to XWiki/2.1 syntax and wonder, what would be
> >> the precise analogue for #message("message") macro, which produces
> >> following HTML:
> >> 
> >> message
> >> 
> >> I found only similar ones:
> >> 
> >>> quote
> >> 
> >> which produces
> >> quote
> >> (IMHO works only for single paragraph even with {{{groups}}})
> >> 
> >> and
> >> {{info}}info{{/info}}
> >> 
> >> which produces
> >> info
> >> 
> >> Can I extend XWiki somehow that I can use 
> >> {{message}}message{{/message}} with appropriate HTML output?
> >> 
> >> Thanks!
> >> Valdis
> > 
> > 
> > ___
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> 


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] XWiki/2.1 analogue for #message("message") macro

2013-09-10 Thread Vincent Massol
Hi Valdis,

I've opened http://jira.xwiki.org/browse/XWIKI-9432

I reckon that the reason you didn't use the {{box/}} macro was just because it 
looks a little bit less nice that the other style (round corners, margin for 
the text), right?

Thanks
-Vincent

On Sep 10, 2013, at 11:26 AM, Valdis Vītoliņš  wrote:

> I decided, that the most elegant solution was to add custom XWiki macro
> called "message" whith body:
> {{velocity}}(% class="box plainmessage"%
> )((($xcontext.macro.content))){{/velocity}}
> 
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial
> 
> Valdis
>> I'm migrating documents to XWiki/2.1 syntax and wonder, what would be
>> the precise analogue for #message("message") macro, which produces
>> following HTML:
>> 
>> message
>> 
>> I found only similar ones:
>> 
>>> quote
>> 
>> which produces
>> quote
>> (IMHO works only for single paragraph even with {{{groups}}})
>> 
>> and
>> {{info}}info{{/info}}
>> 
>> which produces
>> info
>> 
>> Can I extend XWiki somehow that I can use 
>> {{message}}message{{/message}} with appropriate HTML output?
>> 
>> Thanks!
>> Valdis
> 
> 
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] XWiki/2.1 analogue for #message("message") macro

2013-09-10 Thread Valdis Vītoliņš
I decided, that the most elegant solution was to add custom XWiki macro
called "message" whith body:
{{velocity}}(% class="box plainmessage"%
)((($xcontext.macro.content))){{/velocity}}

http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial

Valdis
> I'm migrating documents to XWiki/2.1 syntax and wonder, what would be
> the precise analogue for #message("message") macro, which produces
> following HTML:
> 
> message
> 
> I found only similar ones:
> 
> >quote
> 
> which produces
> quote
> (IMHO works only for single paragraph even with {{{groups}}})
> 
> and
> {{info}}info{{/info}}
> 
> which produces
> info
> 
> Can I extend XWiki somehow that I can use 
> {{message}}message{{/message}} with appropriate HTML output?
> 
> Thanks!
> Valdis


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] XWiki/2.1 analogue for #message("message") macro

2013-09-03 Thread Vincent Massol
Hi,

On Sep 3, 2013, at 12:06 PM, Valdis Vītoliņš  wrote:

> I'm migrating documents to XWiki/2.1 syntax and wonder, what would be
> the precise analogue for #message("message") macro, which produces
> following HTML:
> 
> message
> 
> I found only similar ones:
> 
>> quote
> 
> which produces
> quote
> (IMHO works only for single paragraph even with {{{groups}}})
> 
> and
> {{info}}info{{/info}}
> 
> which produces
> info
> 
> Can I extend XWiki somehow that I can use 
> {{message}}message{{/message}} with appropriate HTML output?

You should use the Box macro:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Box+Macro

Or one of the macros:
* http://extensions.xwiki.org/xwiki/bin/view/Extension/Info+Macro
* http://extensions.xwiki.org/xwiki/bin/view/Extension/Error+Macro
* http://extensions.xwiki.org/xwiki/bin/view/Extension/Warning+Macro
* http://extensions.xwiki.org/xwiki/bin/view/Extension/Success+Macro

Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] XWiki/2.1 analogue for #message("message") macro

2013-09-03 Thread Valdis Vītoliņš
I'm migrating documents to XWiki/2.1 syntax and wonder, what would be
the precise analogue for #message("message") macro, which produces
following HTML:

message

I found only similar ones:

>quote

which produces
quote
(IMHO works only for single paragraph even with {{{groups}}})

and
{{info}}info{{/info}}

which produces
info

Can I extend XWiki somehow that I can use 
{{message}}message{{/message}} with appropriate HTML output?

Thanks!
Valdis

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users