Template talk:Expand section

Add topic
Active discussions

How do I remove the left margin?Edit

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

I want to remove the left margin in the Porutugese Wikipedia version of this template. In the source code, what makes the template touch the left border of the page? Thanks. --Bageense(disc.) 19:12, 5 August 2021 (UTC)

User:Bageense: How do you want it? The same as it looks now, but in the middle of the page? Or larger like most other amboxes? If neither, please let me know exactly how you want it to look, and I'll try to write the required changes for you. In the below example, "style = margin: auto;" is what controls the horizontal alignment of the box.
In middle of page; same appearance otherwise

Code

{{SAFESUBST:<noinclude />#invoke:Unsubst||date=__DATE__ |$B=
<!--{{Expand section}} begin-->{{Ambox
| name  = Expand section
| type  = content
| small = {{{small|left}}}
| style = margin: null;
| image = [[File:Wiki letter w cropped.svg|{{#ifeq:{{{small|}}}|no|44px|20px}}|alt=[icon]]]
| issue = This section '''needs expansion'''{{#if:{{{with|{{{for|{{{1|}}}}}}}}}
 |  with: {{{with|{{{for|{{{1}}}}}}}}}}}{{#ifeq:{{{punctuation|{{{period|}}}}}}|no||.}} You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit&section={{{section|}}}}} adding to it].{{#if: {{{find|}}} | {{br}}{{find sources mainspace|{{{find|{{ARTICLENAME}} }}} | {{{find2|}}} }}|}}
| talk  = {{{talk|{{{discuss|{{{talksection|}}}}}}}}}
| all   = All articles to be expanded
| cat   = Articles to be expanded
| date  = {{{date|}}}
}}<!--{{Expand section}} end-->
}}<noinclude>
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

Appearance

Same appearance as other amboxes

(This only requires adding the template to a page and passing the parameter |small=no. However, because there is so little text, it looks strange.)

Code

{{Expand section|small=no}}

Appearance

Also, if you want the box to be centred but small, I would recommend making the width of the box fit the text – doing so is an idea that I have had for all small left-aligned amboxes, and I am currently trying to get consensus for that change. Regards, DesertPipeline (talk) 16:15, 18 October 2021 (UTC)
@DesertPipeline: Hello! What I want is neither of those options. I want to keep the small size, but remove the left margin altogether.

style = margin: auto is responsible for the margin? How do we make it null? I tried "0" and "null" instead of auto and it didn't work. --Bageense(disc.) 04:34, 19 October 2021 (UTC)
margin:none and margin:null are not valid declarations. For the margin property, valid values are a length; a percentage; or certain keywords - auto or inherit. none and null are not among them. Some browsers may interpret margin:none as equivalent to margin:0 but it should not be relied upon. --Redrose64 🌹 (talk) 08:21, 19 October 2021 (UTC)
User:Bageense: I'm not sure what you mean exactly; sorry. "Remov[ing] the left margin altogether", if I'm understanding correctly, isn't possible because with this type of code "margin" means "how far away from the edge a page element is". So with margin-left: 0; the element touches the left side of the page (usually – I'm simplifying here, because there are other pieces of code that might affect how this works). If you can explain what you mean by margin in this context, hopefully I'll be able to help. Sorry again for my confusion. Regards, DesertPipeline (talk) 15:23, 19 October 2021 (UTC)
@DesertPipeline: So with margin-left: 0; the element touches the left side of the page. Yes! That's precisely what I want. See the template again: it is touching the left side. In the corresponding template I created in the Portuguese wikipedia (link), it has that default space every normal-sized template has. Perhaps a percentage would work, like Redrose64 said. --Bageense(disc.) 17:01, 19 October 2021 (UTC)
User:Bageense: I understand what you mean now. Add | small = {{{small|left}}} to the template in the same way this one has it – or whatever the Portuguese equivalent of that is. Regards, DesertPipeline (talk) 18:30, 19 October 2021 (UTC)
User:Bageense: Is the problem resolved now? DesertPipeline (talk) 16:13, 25 October 2021 (UTC)

@DesertPipeline: Oh, hi! Before starting this discussion, I think I already tried adding the small parameter in the pt.wiki template. I didn't work, but anyway, the cause of the problem is there, not here. To be honest, I don't remember why I decided to start the discussion here and not there. Because it seems clear that the problem is actually there... --Bageense(disc.) 16:28, 25 October 2021 (UTC)

User:Bageense: I see. I hope that you can get the problem resolved. One possible cause could be that they don't have the CSS code on that Wikipedia for small left-aligned message boxes; if it's not that, then I'm not sure what it could be. Regards, DesertPipeline (talk) 16:32, 25 October 2021 (UTC)
@DesertPipeline: they do. I've been fiddling with this on pt-wiki in my common.css, to see if I could help, and independently noticed mbox-small-left as well. Defaults for these classes are:
  • .mbox-small{clear:right;float:right;margin:4px 0 4px 1em;box-sizing:border-box;width:238px;font-size:88%;line-height:1.25em}
  • .mbox-small-left{margin:4px 1em 4px 0;box-sizing:border-box;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}
Tried tweaking it before I saw your comment (as well as trying some other approaches afterward) and then again just now after you mentioned it, but so far no joy. The rendered table containing the Expand section box has classes "plainlinks metadata ambox mbox-small-left ambox-content" (see prettified excerpt in my pt sandbox) and I've been fiddling with those in my pt-wiki common.css. I can style the text inside by modifying the table cell containing the text, by adjusting the td class mbox-text-span in my css, but that doesn't touch the container. Fiddling with the table classes hasn't worked so far, and I've gone as far as I can afford at this point. This ought to be resolvable in common.css—we just haven't hit the right class or selector combo yet. Maybe you can figure something out from here. The Expand template is here: pt:Predefinição:Expandir seção. Cheers, Mathglot (talk) 19:52, 25 October 2021 (UTC)
Actually, this entire discussion doesn't belong here, and should be moved to pt-wiki; @Bageense:, if you have no objection, I'll move it and leave a pointer to it. Mathglot (talk) 20:01, 25 October 2021 (UTC)
I have no objection. Honestly, I don't remember what I was thinking when I started the discussion here. I must have had a reason. By the way, thanks for your effort in helping me, Desert. --Bageense(disc.) 23:13, 25 October 2021 (UTC)
@DesertPipeline, one other thing: I did add the |small = {{{small|left}}} to the pt template. I seem to remember, though, that I had an issue with 'small' in some other template (here at en-wiki) before, and tracked down the surprising result that |small=no had precisely the same effect as |small=yes (or any other param value); in fact, it was only checking whether the param was present and had a value, but I think that happened somewhere up the line. Not sure if that's equally true in this case. You can see the module defaults around l. 41-43 of the module config, and it's tested in Module:Message_box at l. 168-172; the small box class is added at l. 187. Not quite sure how it all interacts with the |small= setting, but it's in there somewhere. Mathglot (talk) 22:26, 25 October 2021 (UTC)
 – Mathglot (talk) 00:16, 26 October 2021 (UTC)
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Idea, or not?Edit

I think an expand article tag can be nice, but is there one already? CR-1-AB (talk) 21:27, 9 February 2022 (UTC)

For translated articles, there is; see {{Expand French}}, and all the related templates for other languages. Otherwise, we have the series of WP:Stub templates (there are hundreds of them) which indicate that an article is in a beginning state, and should be expanded. Mathglot (talk) 11:59, 10 February 2022 (UTC)

WordingEdit

Would it be best to re-word this to say (something along the lines of) "This section needs expansion; you can help by adding missing content." as per the prior reasoning given over similar wording on Template talk:Incomplete list ("you can help by adding to it" seems very similar to "you can help by expanding it", even if the latter is the one that has entered meme culture)? --QueenofBithynia (talk) 08:31, 29 June 2022 (UTC)

A reasonable complaint about the current wording, given the other discussion you link to. What about opting for brevity and simply dropping the last part? Then it would look like this: (Note: live example for section § Media at the article Ottoman Empire):
Alternatively, using the word improve avoids the problem outlined at the linked discussion, i.e.: Please help improve it; or even just, Edit this section. Mathglot (talk) 18:37, 29 June 2022 (UTC)
@Mathglot: Thanks, I'd definitely support this change! (Sorry I didn't see your reply until now!) QueenofBithynia (talk) 21:45, 5 August 2022 (UTC)
@QueenofBithynia:, great; now we just need to get a few more responses to establish a consensus. You could call for feedback at a WikiProject like WikiProject Templates, or some other centralized venue. Mathglot (talk) 22:06, 5 August 2022 (UTC)
Thank you; I have placed a call for feedback at that Wikiproject as well as notifying editors who took part in the previous discussion. QueenofBithynia (talk) 22:13, 5 August 2022 (UTC)
I think either the "improve" or "edit" ideas are a step forward. I like that "improve" subtly emphasizes helpful edits (can we say that enough?) and for users with edit-section links already active "improve" is less spammy and redundant. For people unfamiliar with WP however (and hence, without edit-section links) "edit" might be a clearer expression of what clicking the link would do. --N8wilson 🔔 12:47, 6 August 2022 (UTC)