Jump to content

Template talk:Ombox

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Ombox/sandbox)

Pages that list message boxes that use the {{ombox}}:

Why this template?

[edit]

The discussion that led to the creation of this template is at Template talk:Imbox#Other spaces message boxes.

There are several reasons this template is needed:

  • Using an ambox/imbox compatible meta-template is easier for those making message boxes than hand-coding the boxes using a table and the ".messagebox" CSS class.
  • The ambox and its sister templates have code that handles box flow better than the hand-coded boxes. That is, in several browsers the hand-coded boxes get box overlap when there are other boxes aligned right or left of them.
  • The namespace detecting {{mbox}} needs a message box to call for the "other pages". Thus mbox can now work for all types of pages.

--David Göthberg (talk) 03:58, 30 May 2008 (UTC)[reply]

This template

[edit]

Note that this template is currently just a beta version. It should not be deployed yet and needs more discussion.

I just updated this template to use a colour scale just like the other mboxes. I derived the code from the imbox since the imbox code is much closer to the needs of the ombox than the ambox is. Here is a detailed description and motivation:

  • The ombox needs variable width left side image cells since templates like {{guideline}} use thin but high images (30px wide) which would look too thin using the fixed width ambox left image cell.
  • The ombox needs variable width right side image cells since many boxes on "Wikipedia:" project pages feed a {{shortcut}} box as the right side item and the shortcut box is larger than the fixed ambox right side image cell.
  • I used 1px border for most of the types since that is the current standard for most "other pages" message boxes. But I used 2px border for the protection type since that is the current standard for protection boxes and I think it needs the thicker border to be more visible. I also used 2px border for the speedy and delete types to make them more visible.
  • I used the current standardised grey background (#f9f9f9) used for this kind of message boxes. (That is, boxes that go on "other pages".) That is slightly darker than the very light grey background (#fbfbfb) used for ambox and imbox. The darker background matches the table of content and to me it looks more "official" so perhaps is good for policy pages etc. But the lighter ambox background looks happier. So I don't have a preference on this.
  • For the notice type I used the current standardised 1px grey border (#aaa) used for other pages message boxes. (Instead of the ambox/imbox blue.) That is also the same as for the non-coloured sides of the ambox.
  • For all the other types I used the ambox/imbox border colours. This means the protection type now gets "grey-gold" (#bba) border instead of its old "other pages" grey-blue (#99B). I think we should have the same protection colour for all mboxes, and the old grey-blue "other pages" protection colour is a bit too close to the imbox license colour. (Although the imbox license boxes and the other pages protection boxes should never be used on the same page.)

So, what do you people think?

--David Göthberg (talk) 00:19, 30 May 2008 (UTC)[reply]

Good work, Mr Göthberg. Nice boxes, and solid logic in their formatting. I have no objections to the roster. As far as the background colour is concerned, I do not have any scruples with using a not-so-happy light colour; I believe that consistency with the practices followed so far, as well as a slight differentiation from the other, more visible boxes, should be preferred. Another factor we have not yet considered is the colour of the pages themselves; they have different tinctures in different namespaces. I have yet to see any list of these tinctures, and am very interested in knowing exactly what these differences are, but I am fairly sure that the "other pages" are darker and should thus have darker message boxes. Waltham, The Duke of 16:49, 30 May 2008 (UTC)[reply]
All namespaces other than the mainspace have a pale blue background (I can't remember the exact shade, it's in MediaWiki:Monobook.css somewhere); so the 'palette' we're working with here is the same as for the image or category namespaces. Happymelon 21:08, 30 May 2008 (UTC)[reply]
I was under the impression that there were variations. Anyway, thanks.
PS: The shade seems to be this one: #F8FCFF;.Waltham, The Duke of 09:58, 1 June 2008 (UTC)[reply]

More comments before deploying?

[edit]

The {{ombox}} are going to be used on a lot of pages, among other most "Wikipedia:" pages, so I am hesitating to deploy it until we get comments from more people. I have announced it on the Village pump and at some other places. I am thinking of doing a {{watchlist-notice}} when the current watchlist messages are done.

--David Göthberg (talk) 23:06, 5 June 2008 (UTC)[reply]

I think it looks great. There's nothing serious to take care of before deployment and if any small problems do arise then I doubt they'll be a major hassle. Besides, it's already being used on many pages so you might as well officially "cut the ribbon", so to speak. --.:Alex:. 15:13, 9 June 2008 (UTC)[reply]
If my word means anything, I like this template and have already begun deploying it on new templates I create. MBisanz talk 21:37, 17 June 2008 (UTC)[reply]
Thanks .:Alex:. and MBisanz. Counting Waltham and Happy‑melon from the previous section and myself, then it seems we are five users for the current design suggestion, and none against. So it seems the design is uncontroversial. And .:Alex:. is correct, even if people later want some style changes then that can easily be done even if this meta-template is already in use. And this has been announced for 2.5 weeks in several places. So yes, we can probably start to deploy the {{ombox}} if we like.
(A side note: For the {{tmbox}} the situation is worse, there we have very differing views on what styles to use.)
--David Göthberg (talk) 22:58, 17 June 2008 (UTC)[reply]

We are deploying!

[edit]

So no one thinks anything else: We started deploying {{ombox}} some time ago. Feel free to convert any message boxes used on "other pages" to use this meta-template. If you find any tricky cases then list them on this talk page and you'll get help.

Ombox currently uses the imbox versions of the default images. This means they have a slightly too light grey background when viewed with old web browsers that doesn't understand transparent PNGs. (If we use the SVG versions then MediaWiki renders them as PNGs with full white "transparent" background which looks bad in those browsers.) However, the imbox images are only slightly too light so it is only barely visible in the old browsers. Thus I think we don't need to make special ombox versions of the images.

Today I added the ombox CSS classes in MediaWiki:Common.css. Due to the 30 days CSS caching this means we can change {{ombox}} to use the CSS classes on 4 August. I didn't get around to this until now since I have been way to busy elsewhere.

--David Göthberg (talk) 01:59, 4 July 2008 (UTC)[reply]

I have now updated {{ombox}} to use the CSS classes in MediaWiki:Common.css, since the 30 days CSS caching has now passed. This means ombox is now fully skinnable.
--David Göthberg (talk) 15:14, 5 August 2008 (UTC)[reply]

It prints

[edit]

It shouldn't print. - LA (T) 23:23, 5 August 2008 (UTC)[reply]

Why not? Only in the article namespace do we need to be concerned about hiding metadata where sensible - if someone wants to print out a Wikipedia: or Help: page, they're going to want the whole text, not with certain bits missing. Happymelon 13:03, 6 August 2008 (UTC)[reply]
IMO, none of these boxes should print. I was looking at the print preview of a WikiProject, and the message that was in the box generated with this was so general that it applies to hordes of WikiProjects. So, any messages in boxes created by this should all be general enough that there would be no loss when printed. - LA (T) 09:17, 7 August 2008 (UTC)[reply]
Perhaps that box shouldn't print, but the thing is that we have hundreds of templates based on this box design, and it's impossible to make sweeping statements from up here about the printability of all those templates 'down there'. I know of a number of ombox templates out there that most definitely should be printed, but even if I didn't, I would still say that, since we don't know for certain that all omboxes should be noprint, we err on the side of caution and print them all. It's not like it's particularly colourful and is going to waste a horde of ink. Happymelon 09:37, 7 August 2008 (UTC)[reply]
Happy-melon is correct. Only message boxes on article pages should not print. Message boxes on all other kinds of pages should print. When you print a talk page or a help page or a "Wikipedia:" page and so on then pretty much everything on that page should print. It is only for articles that we want to hide some metadata like message boxes and navboxes before we print the page.
--David Göthberg (talk) 16:56, 7 August 2008 (UTC)[reply]
Happy-melon or Davidgothberg, could you please show me one Ombox that should be printed? I have yet to see any in the entire suite of these boxes that have information in them that should be printed with the rest of the page. I have two Tmboxes on my talk page that really don't need to be printed since they don't contain any really vital information that I would want hard copied. - LA (T) 09:45, 8 August 2008 (UTC)[reply]
Er, {{policy}} :P Happymelon 10:04, 8 August 2008 (UTC)[reply]
A good lead with "X is a policy." in it would replace the policy box and nutshell box. That's what leads are for, you know? - LA (T) 10:33, 8 August 2008 (UTC)[reply]
In articles, yes. Wikipedia: pages are not articles, so do not have 'leads' per se. Many of them happen to be structured similarly to articles, purely because it's a format we're all used to using. We don't have any style rules outside the mainspace. We do whatever is the most efficient and effective. Often, this involves encapsulating the most important information in boxes like ombox... which you say we should hide in printouts! The net effect is likely to be to hide the most important information, not the least, because other namespace pages do not require the content of boxes to be duplicated in the text. Happymelon 12:06, 8 August 2008 (UTC)[reply]
Lady Aleena (LA): I don't expect this to convince you, but the {{nutshell}} boxes are often used instead of good leads. See for instance how we use it at Wikipedia:Line break handling#Preventing and controlling word wraps. But basically, we think that printing what you see (WYSIWYG) is the path of least surprise and the least problems. If we do hide the omboxes then there is no good way a user can make them print in his personal settings, but if we don't hide them then you can hide them in your personal settings. Tell us if you want us to add code to your personal monobook.css page that will make the omboxes invisible when you print pages. By the way, here is the code:
/* Do not print other pages message boxes */
@media print { 
    .ombox { display: none; } 
}
--David Göthberg (talk) 11:35, 8 August 2008 (UTC)[reply]
[edit]

I have now built the {{fmbox}} "header & footer message box template".

Some time ago I noticed that we could have good use for a message box similar to the {{ombox}} but with 100% width and only one colour style. It can be used to build message boxes for system messages such as MediaWiki:Sharedupload and MediaWiki:Sp-contributions-footer-anon. It can also be used for header and footer boxes on user pages.

I would appreciate if those that are interested would check it out and comment on its talk page.

At the same time I would like to draw the attention to a closely related message box standardisation discussion: Should editnotices be transparent or have the "table of content colours"? See Wikipedia talk:Editnotice#Colours for editnotices.

--David Göthberg (talk) 13:44, 9 September 2008 (UTC)[reply]

Small right-floating omboxes

[edit]

I am planning to add the "small=yes" option to the {{ombox}}, just like we have for the {{tmbox}}. User:Ms2ger convinced me of the need for it in a discussion over at the talk page of mbox. (Since for instance the {{archive box}} and {{autoarchivingnotice}} are sometimes used on "Wikipedia:" pages and thus need to be able to use the small style there too. Since some "Wikipedia:" pages are used as discussion pages...)

--David Göthberg (talk) 19:04, 15 September 2008 (UTC)[reply]

 Done - Ombox now has small functionality just like the tmbox. It can be used immediately since it uses hard-coded small styles. See the documentation at {{ombox}}, and the discussion at the mbox talk page.
--David Göthberg (talk) 21:45, 15 September 2008 (UTC)[reply]

Template message box

[edit]

I would prefer a specific templatespace message box that was made to appear similar to the {{documentation}} template. While this would be easy to build and I can readily do it, I just wanted to make sure: (1) there would be some interest and (2) I wouldn't be stepping on the {{ombox}}'s feet.

It would look a bit like this:

{{{1}}}
        {{{2}}}
{{{3}}}

The parameters would be {{{image|Template-info.svg}}}, {{{1}}} for the header, {{{2}}} would be an optional summary message #if: {{{3}}} exists else it would reformat as {{{3}}}, and {{{3}}} would be the complete message.

The main reason I'd want to do this is that the {{ombox}} irks me on templatespace, since it's formatting can easily be mistaken as part of the template if used outside of the documentation (as {{WPBannerMeta}} uses it).

Thoughts and opinions? hornoir (talk) 19:28, 7 January 2009 (UTC)[reply]

I don't see how this would be useful other than for template documentation, for which we already have the {{documentation}} template. Using these styles for, say, the omboxes that appear underneath WPBM, would just give the appearance of the documentation being fragmented, which would look IMO extremely bad. Remember that you can apply custom styles to the ombox templates in your own monobook.css if you want to change them, including styling them only in the Template: namespace. Any styles that you added to a declaration like:
.ns_10 table.ombox {
    //Declarations
}
Would be applied only in template space. So you can easily customise the ombox to make it more easily distinguishable to you. Happymelon 10:46, 8 January 2009 (UTC)[reply]
Thank you for the speedy and polite reply, Happymelon. While the {{ombox}} doesn't confuse me personally, I believe on certain template pages it may confuse some users. For instance, let's look at an average WikiProject and/or task force template (I'll use Template:WikiProject Saw since it was the first to pop into my head, probably because I'm currently trying to convince them to become a task force). Due to the sizing and format of the {{ombox}} used, it appears as if it is part of the template's output and/or that something's wrong with the template's design. If, on the other hand, the {{WPBannerMeta}} message box looked like this...
WPBannerMeta
        This message is included due to usage of the {{WPBannerMeta}}.
This WikiProject banner uses {{WPBannerMeta}}, a meta-template for easily creating and maintaining banners and talk-page notices. [So on and so forth.]
...it would appear separated from the template output. Does this example clarify my reasoning? hornoir (talk) 14:14, 8 January 2009 (UTC)[reply]
I do understand your point, but I don't agree that it would be a useful distinction. The WPBM example template on the template page already behaves substantially differently to how it reacts 'in the wild', displaying all optional parameters and taskforces, but not adding into any categories. As such, editors are as likely (if not more likely) to consider this behavior to be indicative that "something's wrong with the template's design" than the appearance of the information boxes. What appears on a template's page can't be instinctively regarded as "the template output", because in many instances templates behave oddly on their own pages, either deliberately or accidentally. Happymelon 15:41, 8 January 2009 (UTC)[reply]
Thanks again for the speedy reply. I understand the points you outline above; perhaps no one else is bothered for the reasons you aptly suggest, in which case my suggestion bears no merit. Thank you again. hornoir (talk) 16:13, 8 January 2009 (UTC)[reply]

Split to /testcases

[edit]

Edokter: Today you split the test cases on the /sandbox page of this template to a new /testcases page. After I reverted you you reverted me and you used this edit comment:

"Sandbox should have code only, otherwise there is the risk of transcluson loop. Pages should *never* self-transclude. That is why /testcases exist. Other xmbox templates use this scheme as well."

So let me explain why I will revert you again:

1: There is no policy that regulates exactly how we use the /sandbox and /testcases subpages. There only is the how-to guide Wikipedia:Template test cases, which is only advisory.

2: You have so far not used this /sandbox page at all. So why should you be concerned with how we use it?

3: We who edit the mbox family of meta-templates often have to compare code on many pages at once, meaning we often have to have say 15 pages open at the same time. If you force us to also use /testcases subpages that means I would have to have say 25 pages open when doing this work. That is more pages than my current browser can handle on my current operating system. And even if my browser could handle it that would make it very hard for me to know which tab is which.

4: No, there is no risk for template loops if we use the <noinclude> tags properly. And template loops are no problem, since if we happen to do that mistake then MediaWiki detects it and instead shows an error message.

5: We have used this more compact /sandbox scheme for some years now on many templates without problems.

--David Göthberg (talk) 16:48, 4 March 2009 (UTC)[reply]

1: The fact there is no policy, does not exempt us from following good practice. Self-transcluding templates are simply very bad practice.
2: If you haven't used it, what is the problem?
3: Your configuration may need updating, but why should that force others to use your methods instead? Al other xmbox template have a /testcases subpage, and no one has complained about that.
4: I know it detects template loops. That does not mean we should allow it to happen. The self-transclusing scheme is too vulnerable for mistakes. It also makes testing harder, as you always have to purge the page after saving, before you can see the effects of your edits. Combining the code and the tests is also confusing.
5: How does that exempt others from using a better practice? Again, if multiple editors are working on a template, you should always allow best practice to be followed, and not force your personal preferences on others. That might push other editors away who could otherwise offer very valuable contributions.
In short, please allow other editors to use better practice. Your sole objection appears to be a bit ownish. EdokterTalk 17:41, 4 March 2009 (UTC)[reply]
1: And I say using this more compact form of /sandbox in some cases is the best practise. It is not up to you to decide what is the best way for others to work. Besides, you didn't even follow the how-to guide when you created the /testcases page, I had to clean up the /testcases page after you. [1]
2: What do you mean? I have used this sandbox a lot, you have never used it. (As far as I can see you have never done any edits to any part of this template. And you have never before commented on this talk page.) That you try to enforce your ways of working on others is wrong. This is about a /sandbox, not a main space article. What next? Are you going to enforce your way of working on the sandboxes we use in our own user spaces?
3: No, that's not true. Many of the other mboxes also use this compact /sandbox scheme.
4: Again, template loops is only a problem in your mind. And your way means you have to reload and sometimes even purge the /testcases subpage, so not much difference from having to purge the /sandbox page in this compact scheme. And for some of us having to open twice as many tabs makes testing much harder, since we can't even open that many tabs. So your way is much harder for us. But I guess you couldn't care less about us who can't afford to buy new computers, right?
5: If you don't like this /sandbox, then by all means create some new subpages where you can work the way you want. (If you are going to do some work here...) But don't enforce your ways of working on the people who have created and managed these templates and used this /sandbox so far.
--David Göthberg (talk) 18:49, 4 March 2009 (UTC)[reply]
Every other mbox type uses /testcases; I checked them all yesterday. But rest ashured, I will not be working here. Or as they say in Dutch: Stank voor dank. EdokterTalk 20:52, 4 March 2009 (UTC)[reply]
Then you didn't look very closely. {{tmbox/sandbox}} and {{imbox/sandbox}} use the compact approach. Although they also have /testcases pages where we have done additional testing. And {{mbox}} only had a /sandbox until you modified it today and created its /testcases page, although that is kind of a special case since {{mbox/sandbox}} didn't have any template code on it yet.
--David Göthberg (talk) 01:06, 5 March 2009 (UTC)[reply]
[edit]

I just noticed that ViperSnake151 added "link=" to the default icons in the /sandbox version of this template. That makes it so the message box icons no longer are clickable and don't have links to their image description pages. From a technical point of view that works well. And it kind of is user-friendly since having "unnecessary" links in the boxes probably is confusing to new Wikipedia users.

But since I guess ViperSnake151 will soon suggest that we deploy that in the main template itself, let me preemtively explain why I think we can not do that:

I am sure it breaks the licenses of those images, since it makes it too hard to find the image description and thus too hard to find the image attribution and license information. See my longer explanation in a very similar case over at Wikipedia talk:Wikimedia sister projects#Image link in the sister boxes.

Sorry ViperSnake151. It was a nifty idea, but copyright law is a bitch. :((

--David Göthberg (talk) 03:48, 15 March 2009 (UTC)[reply]

Category proposal

[edit]

Please see Wikipedia:Village pump (proposals)#Message box categories. Thanks. Dragons flight (talk) 07:00, 3 June 2009 (UTC)[reply]

Is there any reason for using tables instead of divs for presentational purposes in Template:Ombox [2]? Helder (talk) 20:55, 22 May 2010 (UTC)[reply]

Yes, it was one of the main efforts during the *mbox design, to find a good non-table based design, but issues with floating and clearing of floating elements proved to be too inconsistent to use it at the top of so many pages. —TheDJ (talkcontribs) 21:14, 22 May 2010 (UTC)[reply]
Essentially, it boils down to the fact that tables work, and divs don't. Semantics and idealism are all well and good, but at the end of the day, as TheDJ says, divs still have significant floating and clearing issues which tables avoid very effectively. So until someone can demonstrate a div-based layout which works consistently in all browsers, the table-based layout is all we're left with. Happymelon 22:09, 22 May 2010 (UTC)[reply]

Add Welsh

[edit]

cy:Nodyn:Ombox/core. -- Xxglennxx talkcontributions 18:40, 4 July 2010 (UTC)[reply]

RfC notice

[edit]

A RfC has been started to discuss the color coding used here and in other message boxes. Template talk:Expand#Type. Tijfo098 (talk) 16:58, 14 November 2010 (UTC)[reply]

Classes

[edit]

Please see centralised discussion at Wikipedia talk:Manual of Style/Article message boxes#Classes. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 10:22, 29 November 2011 (UTC)[reply]

Switch of mbox templates and category handler to Lua

[edit]

I've made a request over at Template talk:Mbox about switching all of the {{mbox}} family templates, plus the {{category handler}} template, to use Lua modules. These templates have millions of transclusions, so I would appreciate comments and some more eyes on the code. Please let me know what you think over at the request page. — Mr. Stradivarius ♪ talk ♪ 15:10, 15 October 2013 (UTC)[reply]

The proposed changes are now up live - this template has been switched to use Module:Message box. — Mr. Stradivarius ♪ talk ♪ 12:57, 20 October 2013 (UTC)[reply]

Very minor, but...

[edit]

...why does the documentation not use level 2 headings? George8211 // Give a trout a home! 20:54, 18 December 2013 (UTC)[reply]

substitute impossible

[edit]

for some reason I cant subst an ombox, if I try it becomes blank.

My1 22:21, 31 October 2016 (UTC)[reply]

Text is not wrapping correctly in ombox on cell phones in portrait view

[edit]

Longstanding {{ombox}} problem. In cell phones in portrait view: Long narrow text column with much whitespace on both sides. See examples and possible solutions in threads linked below. Bottom line is need for a separate simpler template for when a shortcut box needs to float on the right side of the message box, and have text wrap around it.

--Timeshifter (talk) 19:06, 8 July 2024 (UTC)[reply]

The basic display problem here appears to be that the content of {{Ombox}} renders in three "columns". The icon is in the left column, the text is in the right column, and the shortcut box is in the right column. The icon and the shortcut box don't shrink horizontally, so the content/text column has to shrink horizontally. On a narrow screen, that makes the center column too tall and narrow to look reasonable. I wonder if we can display things differently on mobile, possibly by using templatestyles. – Jonesey95 (talk) 21:04, 8 July 2024 (UTC)[reply]
This is an information page. It is not one of Wikipedia's policies or guidelines; rather, its purpose is to explain certain aspects of Wikipedia's norms, customs, technicalities, or practices. It may reflect differing levels of consensus and vetting.

Here above is how it should work. If not in an {{ombox}} template, then in another simpler template. Narrow your browser window, or look at it in side-by-side preview, to see text wrap around image and shortcuts box. The above could be made into a template, and with just one parameter (for the shortcuts box), could suffice for all pages needing the {{information page}} box. --Timeshifter (talk) 23:06, 8 July 2024 (UTC)[reply]

Discussion on the Commons:
c:Commons:Village pump/Proposals#Needs to be a better box for Current and Recent templates
--Timeshifter (talk) 01:47, 19 August 2024 (UTC)[reply]

Please add "Draft" to list

[edit]

Please add the "Draft" namespace to the description as follows:

It is used to build message box templates for pages of the types User, Wikipedia, MediaWiki, Template, Help, Portal and any new future namespaces;
+
It is used to build message box templates for pages of the types User, Draft, Wikipedia, MediaWiki, Template, Help, Portal and any new future namespaces;

Thanks, Mathglot (talk) 18:07, 14 August 2024 (UTC)[reply]

 Not done: According to the page's protection level you should be able to edit the page yourself. If you seem to be unable to, please reopen the request with further details. Documentation pages are almost never protected. – Jonesey95 (talk) 18:11, 14 August 2024 (UTC)[reply]
Sorry; yes, you're right of course; fixed. Mathglot (talk) 18:16, 14 August 2024 (UTC)[reply]
No apology necessary. It's confusing around here. My note above was intended to remind/encourage/empower you, not make you feel bad. – Jonesey95 (talk) 18:46, 14 August 2024 (UTC)[reply]