Hi.
Regarding the
http://jira.xwiki.org/jira/browse/XWIKI-2967 issue and
the
http://jira.xwiki.org/jira/browse/XWIKI-2882 one, this is the
proposal:
Proposal:
The title to support wiki syntax and the image to support absolute
URLs
as well as local stored images.
Reason:
The goal is to reuse the boxMacro in for implementing RssMacro,
Warning
and Error macros. The most complex of them being the RssMacro. So, a
RSS
feed should be rendered as follows:
---------------------------------------
optional image (provided as an URL to an image stored outside the
wiki,
anywhere in the web)
How do you implement this? If it's optional what happens if it's not
specified?
Could you show us an example of using the macro?
title (which can be a static text or a link to a web
location
containing
the full news article)
body - which consists of several news articles, each
article being
structured as follows:
.................................................
title (link or static text, the same situation as above)
optional body (plain text)
.................................................
-----------------------------------------
Basically, the Wiki 2.0 RssMacro should behave like the old Radeox
RssMacro.
Now, for the RssMacro I was planning to use a "big" box (rendendered
using the improved BoxMacro) which would take care of the title and
the
image of the RSS feed and which would contain nested "small" boxes for
each news article.
Also, i was planning of offering the same CSS-related features as the
old Radeox RssMacro. (see
http://code.xwiki.org/xwiki/bin/view/Macros/RssMacro for details) for
which adding an optional cssClass parameter to the BoxMacroParameters
is required.
So I look forward to knowing what you think about this.
Tnx.
PS: all I posted here was suggested in a skype discussion with Vincent
and Thomas:
...................................................................................
[15:34:31] Dan Miron: well, the title is not an ordinary text it's an
anchor to a web location
[15:34:31] Vincent Massol: but on the general principle, do you agree
about a single box macro?
[15:34:48] Dan Miron: +1 for me
[15:34:50] Vincent Massol: I don't understand the use case
[15:34:52] … can you give one?
[15:35:04] … I've never seen a title be a url
[15:35:24] Dan Miron: well, when displaying the contents of a Rss feed
[15:35:43] … each title is a link to the site which contains that
specific article
[15:36:15] Vincent Massol: you want one box per post?
[15:36:24] … currentl all posts are in a single box
[15:36:34] Thomas Mortagne: dan it's not the title of the box you
want ?
[15:36:56] … I did not understood that
[15:37:23] Vincent Massol: IMO it's one box
[15:37:31] Thomas Mortagne: yes
[15:37:32] Vincent Massol: and iside the box macro you can put
whatever
wiki syntax you want
[15:37:40] … including links
[15:37:39] Thomas Mortagne: the macro is an entire feed
[15:37:55] Dan Miron: well, i need a big box for the hole rss content
which holds several other "small" boxes for each article
[15:38:16] Vincent Massol: oh you want to nest box macros
[15:38:19] Thomas Mortagne: theses small bowex are not macros
[15:38:27] Vincent Massol: it could be thomas
[15:38:36] Thomas Mortagne: well
[15:38:57] Dan Miron: i was planing to use for both the big and the
small boxes the same messageboxMacro i was going to create
[15:38:59] Thomas Mortagne: I don't like very much that a macro
generate
other macro if it's not really needed
[15:39:25] Vincent Massol: but if he wants to have a style for the
boxes
inside he'll need that I think
[15:39:26] Thomas Mortagne: but meybe it make sense here
[15:39:43] Vincent Massol: or he'll have to reinvent the box macro
[15:40:10] Thomas Mortagne: this means the boxmacro need to support to
be in a boxmacro
[15:40:26] Vincent Massol: that's supported by the rendering engine
[15:40:35] Thomas Mortagne: currently it's not the case as the big and
small box will have the same color for example
[15:40:44] … it needs some css
[15:40:45] Vincent Massol: but the box macro will need to support this
[15:40:49] … yes
[15:40:55] Thomas Mortagne: but on pure rendering side yes it's
supported
[15:41:59] … so yes use nested macro boxes is a good idea here Dan ;)
[15:42:26] Vincent Massol: now re the links I'm not sure yet
[15:42:37] … there are different ways of doing that I guess
[15:43:29] … one idea (brainstorming): we could allow inline wiki
syntax
to be used the title parameter maybe
[15:44:14] Dan Miron: yes, it could be a way
[15:44:17] Thomas Mortagne: I like that yes
[15:46:45] Vincent Massol: hmm I wonder if this is something we'd want
for all macros
[15:47:09] … not sure
[15:47:17] Thomas Mortagne: at wors we can add a isTitleWiki
[15:47:19] Vincent Massol: even for this use case I'm stil not fully
sure
[15:47:51] … it sounds good but I wonder if we'd get side effects
[15:48:09] … actually we wan't do that in a generic way for all macros
[15:48:20] … since it's not going to generate text
[15:48:25] … but Blocks
[15:48:32] … so the macro needs to handle that
[15:48:50] … s/Wan't/can't/
[15:49:33] … ok I think I'm +1 for making the image and title params
allow inline wiki syntax here for this macro
[15:49:45] … (it's a good experiment, we'll see how it goes)
[15:49:49] … wdyt?
[15:49:53] Thomas Mortagne: +1
[15:50:03] Jean-Vincent Drean: +1
[15:50:45] Thomas Mortagne: by the way Dan, Vincent already created
http://jira.xwiki.org/jira/browse/XWIKI-2967 (on which you are
assigned)
[15:51:01] Vincent Massol: since our wiki syntax is clean there's
little
chance a normal title will not be rendered as the user thinks
[15:52:11] Dan Miron: +1
[15:53:03] Vincent Massol: dan: I think you can close
http://jira.xwiki.org/jira/browse/XWIKI-3025 as duplicate
[15:54:16] Dan Miron: so we drop the idea of creating a new
messaboxMacro and we focus on using the existing boxMacro?
[15:55:09] Vincent Massol: yep
[15:55:32] … and at the same time if you could implement
info/message/error macros that would be great
[15:55:41] … (there are already jira issues assigned to you for
those I
believe)
[15:56:54] Dan Miron: in this case, could we enhance the boxmacro a
little bit?
[15:56:58] … for example
[15:57:08] … the ability to specify custom css sheets
[15:57:18] Vincent Massol: it's already supported
[15:57:32] … using the (% %) notation
[15:57:36] … isn't it?
[15:58:54] … (% class="whatever" %){{box...}}
[15:59:09] Thomas Mortagne: boxmacro alreadu support custom for the
box
it sould be enought
[15:59:39] Dan Miron: the only way i knew for specifying a css class
is
inheriting the AbstractBoxMacro and overriding the
getClassProperty() method
[15:59:44] Thomas Mortagne: then you can use
.rssbox a {
}
isn't it ?
[16:00:42] … (for the link of rss box)
[16:00:50] … an same for other content
[16:01:13] … (it's maybe not the better way i'm not a css expert)
[16:01:36] Vincent Massol: thomas: that's not good enough
[16:01:43] … since there can be other a inside other boxes
[16:02:01] … but using a FormatBlock can be used to create a new class
as I mentioned above
[16:02:07] Thomas Mortagne: then bow can define specific class for
title
and such
[16:02:31] … and then you use
.rssbox .box_titlea {
}
[16:02:57] … bow = box macro
[16:04:14] Vincent Massol: not sure we support params for block macros
[16:04:16] … checking...
[16:04:19] … but we should
[16:04:40] Thomas Mortagne: we support in Block but maybe XHTMLRender
does not
[16:04:49] Vincent Massol: wikimodel
[16:05:56] Thomas Mortagne: ok I was speaking about parameters
blocks in
the macro
[16:06:17] Vincent Massol: inside the macro is ok since it's inline
[16:06:17] Thomas Mortagne: I don't think the Xiki parser support (%%)
parameters for macro
[16:06:22] Vincent Massol: and we support inline params
[16:06:25] … for everything
[16:06:47] … note that they'll be applied to a span surrounding the
element
[16:07:02] Thomas Mortagne: boxmacro content is not inline
[16:07:10] … you could have table intable etc.
[16:08:24] Vincent Massol: ok I've checked and I don't think it's
implemented
[16:08:33] … we have it for all other block elements
[16:08:41] … but it doesn't seem to be there for macros
[16:09:02] Thomas Mortagne: as macro as parameter I guess we did not
thing of supporting generic parameters
[16:09:29] Vincent Massol: it could be added easily though
[16:09:37] Dan Miron: if you mean specifying a css class via block
parameters, it's not working, i tried that, but it gets overriden
[16:11:06] Vincent Massol: actually it should even maybe fail
[16:11:17] … I don't have the time to work on this right now
unfortunately
[16:11:56] … maybe for now you could have an optional "cssClass"
parameter?
[16:12:24] … and when thomas or me implement params for block macros
we
could refactor it
[16:13:09] Dan Miron: yes, that's what i was thinking about from the
beggining
[16:13:37] Vincent Massol: it would be only temporary
...................................................................................
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs