[xwiki-devs] [Proposal]Adding ability to display an optional image and a optional title in the Box macro
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) 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 ...................................................................................
On Dec 24, 2008, at 6:31 PM, Dan Miron wrote:
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)
This should be optional. Thanks -Vincent
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Vincent Massol wrote:
............................................................
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?
See http://code.xwiki.org/xwiki/bin/view/Macros/RssMacro. I'm willing to preserve the behavior of the old RssMacro as much as possible, except for the new syntax, of course. So, given the feed's URL, we check if it has an image or not. Then, we invoke the boxMacro, in which we pass as parameters the following: the title is the feed's title (i don't know whether there can be RSS feeds without a title, but in the assumption that there is no title, we don't place anything in this field), the image is the one we just picked before (if there is one, of course; if there isn't, we just don't put anything there). As for the body, for each article from our feed, we invoke again the boxMacro for building the "small boxes" in a similar manner, just like I described in the previous message. For more details we can talk tomorrow when I get at the office.
title (which can be a static text or a link to a web location containing the full news article)
This should be optional.
Thanks -Vincent
As for the time needed for doing this job, I estimate that this will take about 2 days for implementing it (and another 2-3 days writing some tests for it) from the moment I get consent to start working, in the event that no other issues occur. See you soon, Dan
On Dec 28, 2008, at 11:45 PM, Dan Miron wrote:
Vincent Massol wrote:
............................................................
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?
Dan I was actually talking about the Box macro. My question was: what's your design for providing an image to display or not. More specifically where can the image come from? If the answer is: from a document then I think it's too restrictive since we can have some images located in the skin on the filesystem for ex. Image the info, error and warning macros. I don't think their images should come from a document. Thanks -Vincent
I'm willing to preserve the behavior of the old RssMacro as much as possible, except for the new syntax, of course. So, given the feed's URL, we check if it has an image or not. Then, we invoke the boxMacro, in which we pass as parameters the following: the title is the feed's title (i don't know whether there can be RSS feeds without a title, but in the assumption that there is no title, we don't place anything in this field), the image is the one we just picked before (if there is one, of course; if there isn't, we just don't put anything there). As for the body, for each article from our feed, we invoke again the boxMacro for building the "small boxes" in a similar manner, just like I described in the previous message.
For more details we can talk tomorrow when I get at the office.
title (which can be a static text or a link to a web location containing the full news article)
This should be optional.
Thanks -Vincent
As for the time needed for doing this job, I estimate that this will take about 2 days for implementing it (and another 2-3 days writing some tests for it) from the moment I get consent to start working, in the event that no other issues occur.
See you soon, Dan
Vincent Massol wrote:
On Dec 28, 2008, at 11:45 PM, Dan Miron wrote:
Vincent Massol wrote:
............................................................
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?
Dan I was actually talking about the Box macro.
My question was: what's your design for providing an image to display or not. More specifically where can the image come from? If the answer is: from a document then I think it's too restrictive since we can have some images located in the skin on the filesystem for ex. Image the info, error and warning macros. I don't think their images should come from a document.
Thanks -Vincent
Well, I've just found out that for rendering the error and the warning macros we actually don't need to explicitly specify an image to be displayed, the icon which they show up is specified in their CSS sheets. Therefore, I'm thinking of letting the image come from an external URL only, in the Box Macro, in order to use it for the RssMacro. I've been suggested to allow wiki syntax for specifying the image, so if anyone still finds this useful, take these matters into account, please let me know. Thanks, Dan
I'm willing to preserve the behavior of the old RssMacro as much as possible, except for the new syntax, of course. So, given the feed's URL, we check if it has an image or not. Then, we invoke the boxMacro, in which we pass as parameters the following: the title is the feed's title (i don't know whether there can be RSS feeds without a title, but in the assumption that there is no title, we don't place anything in this field), the image is the one we just picked before (if there is one, of course; if there isn't, we just don't put anything there). As for the body, for each article from our feed, we invoke again the boxMacro for building the "small boxes" in a similar manner, just like I described in the previous message.
For more details we can talk tomorrow when I get at the office.
title (which can be a static text or a link to a web location containing the full news article)
This should be optional.
Thanks -Vincent
Hi! I've been suggested the following: "............................................................. I'm thinking of a modification on box macro [Sat Jan 3 2009 17:02:10] … currently when you extends it you can define the class: "code" in place of "box" for exemple [Sat Jan 3 2009 17:03:34] … the problem is that it means having two different css classes: box and code when the second one is basically a copy part of the first with some more things like monospace [Sat Jan 3 2009 17:04:27] … so I propose to change the box macro to add the cutom class in place of replace box class with it: class="box code" [Sat Jan 3 2009 17:04:37] … that way you will have in css: [Sat Jan 3 2009 17:05:00] … #xwikimaincontainerinner .box { margin: 1em 0; padding: 0 1px; overflow: auto; background-color: #F1F7FF; border: 1px dotted #555555; } #xwikimaincontainerinner .code { font-family: courier, courier new, monospace; white-space: pre; } [Sat Jan 3 2009 17:05:10] … same for other macro extending box [Sat Jan 3 2009 17:05:41] … this is way cleaner and easier to change the graphical box for all box macros [Sat Jan 3 2009 17:05:44] … WDYT ? ..................................................... " Personally, I'm +1 for that, so if anyone has a different opinion, please let me know. Dan Miron wrote:
Vincent Massol wrote:
On Dec 28, 2008, at 11:45 PM, Dan Miron wrote:
Vincent Massol wrote:
............................................................
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?
Dan I was actually talking about the Box macro.
My question was: what's your design for providing an image to display or not. More specifically where can the image come from? If the answer is: from a document then I think it's too restrictive since we can have some images located in the skin on the filesystem for ex. Image the info, error and warning macros. I don't think their images should come from a document.
Thanks -Vincent
Well, I've just found out that for rendering the error and the warning macros we actually don't need to explicitly specify an image to be displayed, the icon which they show up is specified in their CSS sheets. Therefore, I'm thinking of letting the image come from an external URL only, in the Box Macro, in order to use it for the RssMacro. I've been suggested to allow wiki syntax for specifying the image, so if anyone still finds this useful, take these matters into account, please let me know.
Thanks, Dan
I'm willing to preserve the behavior of the old RssMacro as much as possible, except for the new syntax, of course. So, given the feed's URL, we check if it has an image or not. Then, we invoke the boxMacro, in which we pass as parameters the following: the title is the feed's title (i don't know whether there can be RSS feeds without a title, but in the assumption that there is no title, we don't place anything in this field), the image is the one we just picked before (if there is one, of course; if there isn't, we just don't put anything there). As for the body, for each article from our feed, we invoke again the boxMacro for building the "small boxes" in a similar manner, just like I described in the previous message.
For more details we can talk tomorrow when I get at the office.
title (which can be a static text or a link to a web location containing the full news article)
This should be optional.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Since i suggested it I'm +1 too :) I did not sent the mail because i'm not a css expert and I wanted to have more input on that idea, and Dan is working on Box macro so it's his baby now ;) On Mon, Jan 5, 2009 at 10:50 AM, Dan Miron <[email protected]> wrote:
Hi! I've been suggested the following:
"............................................................. I'm thinking of a modification on box macro [Sat Jan 3 2009 17:02:10] … currently when you extends it you can define the class: "code" in place of "box" for exemple [Sat Jan 3 2009 17:03:34] … the problem is that it means having two different css classes: box and code when the second one is basically a copy part of the first with some more things like monospace [Sat Jan 3 2009 17:04:27] … so I propose to change the box macro to add the cutom class in place of replace box class with it: class="box code" [Sat Jan 3 2009 17:04:37] … that way you will have in css: [Sat Jan 3 2009 17:05:00] … #xwikimaincontainerinner .box { margin: 1em 0; padding: 0 1px; overflow: auto; background-color: #F1F7FF; border: 1px dotted #555555; }
#xwikimaincontainerinner .code { font-family: courier, courier new, monospace; white-space: pre; } [Sat Jan 3 2009 17:05:10] … same for other macro extending box [Sat Jan 3 2009 17:05:41] … this is way cleaner and easier to change the graphical box for all box macros [Sat Jan 3 2009 17:05:44] … WDYT ? ..................................................... " Personally, I'm +1 for that, so if anyone has a different opinion, please let me know.
Dan Miron wrote:
Vincent Massol wrote:
On Dec 28, 2008, at 11:45 PM, Dan Miron wrote:
Vincent Massol wrote:
............................................................
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?
Dan I was actually talking about the Box macro.
My question was: what's your design for providing an image to display or not. More specifically where can the image come from? If the answer is: from a document then I think it's too restrictive since we can have some images located in the skin on the filesystem for ex. Image the info, error and warning macros. I don't think their images should come from a document.
Thanks -Vincent
Well, I've just found out that for rendering the error and the warning macros we actually don't need to explicitly specify an image to be displayed, the icon which they show up is specified in their CSS sheets. Therefore, I'm thinking of letting the image come from an external URL only, in the Box Macro, in order to use it for the RssMacro. I've been suggested to allow wiki syntax for specifying the image, so if anyone still finds this useful, take these matters into account, please let me know.
Thanks, Dan
I'm willing to preserve the behavior of the old RssMacro as much as possible, except for the new syntax, of course. So, given the feed's URL, we check if it has an image or not. Then, we invoke the boxMacro, in which we pass as parameters the following: the title is the feed's title (i don't know whether there can be RSS feeds without a title, but in the assumption that there is no title, we don't place anything in this field), the image is the one we just picked before (if there is one, of course; if there isn't, we just don't put anything there). As for the body, for each article from our feed, we invoke again the boxMacro for building the "small boxes" in a similar manner, just like I described in the previous message.
For more details we can talk tomorrow when I get at the office.
title (which can be a static text or a link to a web location containing the full news article)
This should be optional.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1 Thomas Mortagne wrote:
Since i suggested it I'm +1 too :)
I did not sent the mail because i'm not a css expert and I wanted to have more input on that idea, and Dan is working on Box macro so it's his baby now ;)
On Mon, Jan 5, 2009 at 10:50 AM, Dan Miron <[email protected]> wrote:
Hi! I've been suggested the following:
"............................................................. I'm thinking of a modification on box macro [Sat Jan 3 2009 17:02:10] … currently when you extends it you can define the class: "code" in place of "box" for exemple [Sat Jan 3 2009 17:03:34] … the problem is that it means having two different css classes: box and code when the second one is basically a copy part of the first with some more things like monospace [Sat Jan 3 2009 17:04:27] … so I propose to change the box macro to add the cutom class in place of replace box class with it: class="box code" [Sat Jan 3 2009 17:04:37] … that way you will have in css: [Sat Jan 3 2009 17:05:00] … #xwikimaincontainerinner .box { margin: 1em 0; padding: 0 1px; overflow: auto; background-color: #F1F7FF; border: 1px dotted #555555; }
#xwikimaincontainerinner .code { font-family: courier, courier new, monospace; white-space: pre; } [Sat Jan 3 2009 17:05:10] … same for other macro extending box [Sat Jan 3 2009 17:05:41] … this is way cleaner and easier to change the graphical box for all box macros [Sat Jan 3 2009 17:05:44] … WDYT ? ..................................................... " Personally, I'm +1 for that, so if anyone has a different opinion, please let me know.
Dan Miron wrote:
Vincent Massol wrote:
On Dec 28, 2008, at 11:45 PM, Dan Miron wrote:
Vincent Massol wrote:
............................................................
> 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?
Dan I was actually talking about the Box macro.
My question was: what's your design for providing an image to display or not. More specifically where can the image come from? If the answer is: from a document then I think it's too restrictive since we can have some images located in the skin on the filesystem for ex. Image the info, error and warning macros. I don't think their images should come from a document.
Thanks -Vincent
Well, I've just found out that for rendering the error and the warning macros we actually don't need to explicitly specify an image to be displayed, the icon which they show up is specified in their CSS sheets. Therefore, I'm thinking of letting the image come from an external URL only, in the Box Macro, in order to use it for the RssMacro. I've been suggested to allow wiki syntax for specifying the image, so if anyone still finds this useful, take these matters into account, please let me know.
Thanks, Dan
I'm willing to preserve the behavior of the old RssMacro as much as possible, except for the new syntax, of course. So, given the feed's URL, we check if it has an image or not. Then, we invoke the boxMacro, in which we pass as parameters the following: the title is the feed's title (i don't know whether there can be RSS feeds without a title, but in the assumption that there is no title, we don't place anything in this field), the image is the one we just picked before (if there is one, of course; if there isn't, we just don't put anything there). As for the body, for each article from our feed, we invoke again the boxMacro for building the "small boxes" in a similar manner, just like I described in the previous message.
For more details we can talk tomorrow when I get at the office.
> title (which can be a static text or a link to a web location > containing > the full news article) > > This should be optional.
Thanks -Vincent
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Dan Miron wrote:
Hi! I've been suggested the following:
"............................................................. I'm thinking of a modification on box macro [Sat Jan 3 2009 17:02:10] … currently when you extends it you can define the class: "code" in place of "box" for exemple [Sat Jan 3 2009 17:03:34] … the problem is that it means having two different css classes: box and code when the second one is basically a copy part of the first with some more things like monospace [Sat Jan 3 2009 17:04:27] … so I propose to change the box macro to add the cutom class in place of replace box class with it: class="box code" [Sat Jan 3 2009 17:04:37] … that way you will have in css: [Sat Jan 3 2009 17:05:00] … #xwikimaincontainerinner .box { margin: 1em 0; padding: 0 1px; overflow: auto; background-color: #F1F7FF; border: 1px dotted #555555; }
#xwikimaincontainerinner .code { font-family: courier, courier new, monospace; white-space: pre; } [Sat Jan 3 2009 17:05:10] … same for other macro extending box [Sat Jan 3 2009 17:05:41] … this is way cleaner and easier to change the graphical box for all box macros [Sat Jan 3 2009 17:05:44] … WDYT ? ..................................................... " Personally, I'm +1 for that, so if anyone has a different opinion, please let me know.
+1 -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (5)
-
Dan Miron -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol