Template talk:Box-header: Difference between revisions
ClueBot III (talk | contribs) m Archiving 1 discussion to Template talk:Box-header/Archive 1. (BOT) |
m Maintain {{WPBS}}: 1 WikiProject template. Create {{WPBS}}. Tag: |
||
(14 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{Talk header|archive=yes}} |
{{Talk header|archive=yes}} |
||
{{WikiProject banner shell| |
|||
{{WikiProject Portals}} |
{{WikiProject Portals}} |
||
}} |
|||
{{Autoarchive |bot=ClueBot III |age=90 |units=days}} |
|||
{{User:ClueBot III/ArchiveThis |
{{User:ClueBot III/ArchiveThis |
||
|archiveprefix=Template talk:Box-header/Archive |
|archiveprefix=Template talk:Box-header/Archive |
||
Line 12: | Line 13: | ||
:''You may have been redirected to this page from another template page. This is normal. All related template talk pages should redirect here.'' |
:''You may have been redirected to this page from another template page. This is normal. All related template talk pages should redirect here.'' |
||
Note: This page contains NOEDITSECTION and NOTOC, and is therefore in general not suitable for use in ''articles''. (See [[#Fixes]] |
Note: This page contains NOEDITSECTION and NOTOC, and is therefore in general not suitable for use in ''articles''. (See [[Template talk:Box-header/Archive 1#Fixes]] for an explanation on how to circumnavigate this and other problems.) |
||
For an explanation on how to use this template, please see [[Wikipedia:Portal]]. |
For an explanation on how to use this template, please see [[Wikipedia:Portal]]. |
||
Line 19: | Line 20: | ||
<pre>#REDIRECT [[Template talk:Box-header]] </pre> |
<pre>#REDIRECT [[Template talk:Box-header]] </pre> |
||
to the talk pages of both newly created templates. |
to the talk pages of both newly created templates. |
||
== H2 on Mobile View == |
|||
The <nowiki><H2></nowiki> tag is causing problems with mobile view. Change the <nowiki><H2></nowiki> tag to a <nowiki><div></nowiki> tag to correct. See [https://en.wikiversity.org/w/index.php?title=Template%3ABox-header&type=revision&diff=1499301&oldid=1494557 Wikiversity:Template:Box-header] for comparison. -- [[User:Dave Braunschweig|Dave Braunschweig]] ([[User talk:Dave Braunschweig|talk]]) 20:07, 9 January 2016 (UTC) |
|||
== Template-protected edit request on 4 June 2018 == |
== Template-protected edit request on 4 June 2018 == |
||
Line 32: | Line 29: | ||
:{{ping|Dreamy Jazz}} This should already be possible by using {{para|titleborder}} for the title border colour, and {{para|border}} for other borders' colour, or all borders if {{para|titleborder}} isn't specified. (Though the documentation here could do with some improvement, I had to look at the source code to find that out) <u>'''[[User:Evad37|Evad]]''37'''''</u> <span style="font-size:95%;">[[[d:w:User talk:Evad37|talk]]]</span> 01:14, 5 June 2018 (UTC) |
:{{ping|Dreamy Jazz}} This should already be possible by using {{para|titleborder}} for the title border colour, and {{para|border}} for other borders' colour, or all borders if {{para|titleborder}} isn't specified. (Though the documentation here could do with some improvement, I had to look at the source code to find that out) <u>'''[[User:Evad37|Evad]]''37'''''</u> <span style="font-size:95%;">[[[d:w:User talk:Evad37|talk]]]</span> 01:14, 5 June 2018 (UTC) |
||
:Here are some examples of the effects that can be achieved with these parameters - <u>'''[[User:Evad37|Evad]]''37'''''</u> <span style="font-size:95%;">[[[d:w:User talk:Evad37|talk]]]</span> 01:32, 5 June 2018 (UTC) |
:Here are some examples of the effects that can be achieved with these parameters - <u>'''[[User:Evad37|Evad]]''37'''''</u> <span style="font-size:95%;">[[[d:w:User talk:Evad37|talk]]]</span> 01:32, 5 June 2018 (UTC) |
||
< |
<syntaxhighlight lang=moin> |
||
{{Box-header |
{{Box-header |
||
| title=Foo |
| title=Foo |
||
Line 41: | Line 38: | ||
Bar |
Bar |
||
{{Box-footer}} |
{{Box-footer}} |
||
</syntaxhighlight> |
|||
</source> |
|||
{{Box-header |
{{Box-header |
||
| EDIT=yes |
| EDIT=yes |
||
Line 54: | Line 51: | ||
{{Box-footer}} |
{{Box-footer}} |
||
< |
<syntaxhighlight lang=moin> |
||
{{Box-header |
{{Box-header |
||
| title=Foo |
| title=Foo |
||
Line 63: | Line 60: | ||
Bar |
Bar |
||
{{Box-footer}} |
{{Box-footer}} |
||
</syntaxhighlight> |
|||
</source> |
|||
{{Box-header |
{{Box-header |
||
| EDIT=yes |
| EDIT=yes |
||
Line 76: | Line 73: | ||
{{Box-footer}} |
{{Box-footer}} |
||
< |
<syntaxhighlight lang=moin> |
||
{{Box-header |
{{Box-header |
||
| title=Foo |
| title=Foo |
||
Line 85: | Line 82: | ||
Bar |
Bar |
||
{{Box-footer}} |
{{Box-footer}} |
||
</syntaxhighlight> |
|||
</source> |
|||
{{Box-header |
{{Box-header |
||
| EDIT=yes |
| EDIT=yes |
||
Line 104: | Line 101: | ||
The line: |
The line: |
||
< |
<syntaxhighlight lang=moin>padding-top: {{{padding-top|.3em;}}}</syntaxhighlight> |
||
needs to be changed to: |
needs to be changed to: |
||
< |
<syntaxhighlight lang=moin>padding-top: {{{padding-top|.3em}}};</syntaxhighlight> |
||
this ensures the semi-colon is always included. At the moment it not being included will cause errors when a custom padding-top is provided. |
this ensures the semi-colon is always included. At the moment it not being included will cause errors when a custom padding-top is provided. |
||
Line 122: | Line 119: | ||
{{Box-footer}} |
{{Box-footer}} |
||
< |
<syntaxhighlight lang=moin>{{Box-header |
||
| padding-top=1em |
| padding-top=1em |
||
}} |
}} |
||
{{Box-footer}} |
{{Box-footer}} |
||
</syntaxhighlight> |
|||
</source> |
|||
produces in the source: |
produces in the source: |
||
< |
<syntaxhighlight lang=css> |
||
... padding-top: 1em-moz-border-radius: 0; ... |
... padding-top: 1em-moz-border-radius: 0; ... |
||
</syntaxhighlight> |
|||
</source> |
|||
Thanks, |
Thanks, |
||
Line 151: | Line 148: | ||
Should this template be switched to use [[Module:Box-header]] (i.e. the code currently at [[Template:Box-header/lua]])? It would take the same parameters and produce the same output, but would have the advantage of checking colour combinations for accessibility, per [[MOS:COLOUR]], and reporting uses of inaccessible colours in [[:Category:Box-header with insufficient title contrast]] and [[:Category:Box-header with insufficient body contrast]]. It would also mean that this template and {{tl|Box-header colour}} would be using the same code, reducing redundancy and allowing any future improvements to be made to both templates. - <u>'''[[User:Evad37|Evad]]''37'''''</u> <span style="font-size:95%;">[[[d:w:User talk:Evad37|talk]]]</span> 07:19, 13 August 2018 (UTC) |
Should this template be switched to use [[Module:Box-header]] (i.e. the code currently at [[Template:Box-header/lua]])? It would take the same parameters and produce the same output, but would have the advantage of checking colour combinations for accessibility, per [[MOS:COLOUR]], and reporting uses of inaccessible colours in [[:Category:Box-header with insufficient title contrast]] and [[:Category:Box-header with insufficient body contrast]]. It would also mean that this template and {{tl|Box-header colour}} would be using the same code, reducing redundancy and allowing any future improvements to be made to both templates. - <u>'''[[User:Evad37|Evad]]''37'''''</u> <span style="font-size:95%;">[[[d:w:User talk:Evad37|talk]]]</span> 07:19, 13 August 2018 (UTC) |
||
:{{Done}} - <u>'''[[User:Evad37|Evad]]''37'''''</u> <span style="font-size:95%;">[[[d:w:User talk:Evad37|talk]]]</span> 04:34, 17 August 2018 (UTC) |
|||
== Remove production of NOTOC and NOEDITSECTION == |
|||
I suggest that the magic words NOTOC and NOEDITSECTION are removed from output of this module to allow usage of the template on the pages, where table of contents and edit links are needed. For example: subpages of portals, like [[Portal:United Kingdom/Featured picture]], and [[Special:Diff/994294979|talk pages of portals]]. The overwhelming majority of usages of {{tl|Box-header}} are in portals, and to that end the magic words [[Special:Diff/888483028/993379860|were added]] to template {{tl|Portal styles}}, which is transcluded to all portal pages via {{tl|Portal maintenance status}}. Ping {{u|wbm1058}}, who [[Special:Diff/993541462|objected to this change]]. —[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 12:57, 27 February 2021 (UTC) |
|||
:See {{section link|Template:Box-header#Behaviour options}} and the guidance just above the TOC at the top of this page. – [[User:Wbm1058|wbm1058]] ([[User talk:Wbm1058|talk]]) 14:28, 27 February 2021 (UTC) |
|||
::{{u|Wbm1058}}, I suggest that these parameters are not needed at all and this functionality should be removed from the template. Presence of {{tl|Box-header}}, which produces a part of a page layout, should not affect the layout of the page as a whole. —[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 15:47, 27 February 2021 (UTC) |
|||
:::Digging into the edit history, I found this discussion: |
|||
{{collapse top|Template talk:Box-header/Archive 1 §Accessibility Issue}} |
|||
{{#section-h:Template talk:Box-header/Archive 1|Accessibility Issue}} |
|||
{{collapse bottom}} |
|||
:::I don't know whether these concerns from 2006 are still valid, and if they are, whether there is a better work-around. Please make your proposed changes in [[Module:Box-header/sandbox]] so that they may be reviewed (which you didn't do in December, when these changes surprised me). I think it's likely other editors will be surprised too as this is longstanding behavior in a widely-used template, which you are proposing to change. – [[User:Wbm1058|wbm1058]] ([[User talk:Wbm1058|talk]]) 16:37, 27 February 2021 (UTC) |
|||
::::{{tl|Box-header}} is a decorative template for wrapping some content. It is usually used on portals to wrap a section of the page, like selected article, selected picture, etc. My argument is: because it is ''a part of the page'', it should not affect the ''page-wide'' formatting. All portals already transclude the template {{tl|Portal styles}}, which adds <code><nowiki>__NOTOC____NOEDITSECTION__</nowiki></code> to them. |
|||
::::Template {{tl|Box-header}} is also used on talk pages of portals in discussions of portal layouts. Affecting the layout of these pages is undesirable. But even without these usages on pages, that are not main portal pages, I claim that production of NOTOC and NOEDITSECTION is illogical for {{tl|Box-header}}. |
|||
::::The proposed change in the sandbox: [[Special:Diff/997693614/1046377628]]. The template is also fairly widely used for formatting of WikiProject pages – if the suggested change is applied, I'll check the formatting of WikiProject pages to make sure that WikiProjects that use {{tl|Box-header}} have the appropriate formatting of table of contents. —[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 10:59, 25 September 2021 (UTC) |
|||
:::::I'm not really a portal user; I noticed this change at [[Wikipedia:WikiProject Merge]]. Testing [[special:permalink/1046385858|your sandbox version]] on that project page I saw a TOC where it was suppressed previously, and the "section 1" in the TOC has no heading – what is "section 1" and why is it there? OK I added '''NOTOC''' to that page, which is apparently redundant now but is needed if your sandbox goes live. Section editing isn't disabled on that page. [[User:Wbm1058|wbm1058]] ([[User talk:Wbm1058|talk]]) 15:25, 25 September 2021 (UTC) |
|||
::::::{{re|wbm1058}} {{tq|the "section 1" in the TOC has no heading – what is "section 1" and why is it there?}} – this is because on page [[Wikipedia:WikiProject Merge]], the first usage of {{tl|Box-header}} has {{para|title|<nowiki>[[File:PMG logo.svg|85px|WikiProject Merge]]</nowiki>}}, and images are stripped away when generating a table of contents. —[[User:Andrybak|andrybak]] ([[User talk:Andrybak|talk]]) 14:19, 27 September 2021 (UTC) |
Latest revision as of 14:45, 20 August 2024
This is the talk page for discussing improvements to the Box-header template. |
|
Archives: Index, 1Auto-archiving period: 3 months |
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
- You may have been redirected to this page from another template page. This is normal. All related template talk pages should redirect here.
Note: This page contains NOEDITSECTION and NOTOC, and is therefore in general not suitable for use in articles. (See Template talk:Box-header/Archive 1#Fixes for an explanation on how to circumnavigate this and other problems.)
For an explanation on how to use this template, please see Wikipedia:Portal.
Please add a
#REDIRECT [[Template talk:Box-header]]
to the talk pages of both newly created templates.
Template-protected edit request on 4 June 2018
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change: Add the ability to customise colours for each border around the box.
Description: This is seen (by use of editing a copy of this template) on this page Portal:Canada/Wikiprojects/box-header/2 and uses a different coloured border for under the title. Also see Portal:Daddy Yankee/box-header/2 for another box-header that cannot be created from this template for the same reasons. I tried to accomplish this using this template, but from my testing, it is not at the moment possible. Dreamy Jazz (talk) 15:04, 4 June 2018 (UTC)
- @Dreamy Jazz: This should already be possible by using
|titleborder=
for the title border colour, and|border=
for other borders' colour, or all borders if|titleborder=
isn't specified. (Though the documentation here could do with some improvement, I had to look at the source code to find that out) Evad37 [talk] 01:14, 5 June 2018 (UTC) - Here are some examples of the effects that can be achieved with these parameters - Evad37 [talk] 01:32, 5 June 2018 (UTC)
{{Box-header
| title=Foo
| noedit=yes
| titleborder=#ff0000
| border=#0000ff
}}
Bar
{{Box-footer}}
Bar
{{Box-header
| title=Foo
| noedit=yes
| titleborder=#ff0000
| border=#0000ff; border-top: 1px solid #ff0000
}}
Bar
{{Box-footer}}
Bar
{{Box-header
| title=Foo
| noedit=yes
| titleborder=#0000ff
| border=#0000ff; border-top: 1px solid #ff0000
}}
Bar
{{Box-footer}}
Bar
- Thanks for the explanation. Dreamy Jazz (talk) 07:23, 5 June 2018 (UTC)
Template-protected edit request on 5 June 2018
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The line:
padding-top: {{{padding-top|.3em;}}}
needs to be changed to:
padding-top: {{{padding-top|.3em}}};
this ensures the semi-colon is always included. At the moment it not being included will cause errors when a custom padding-top is provided.
See example:
{{Box-header
| padding-top=1em
}}
{{Box-footer}}
produces in the source:
... padding-top: 1em-moz-border-radius: 0; ...
Thanks, Dreamy Jazz (talk) 21:15, 5 June 2018 (UTC)
- Done Cabayi (talk) 07:04, 6 June 2018 (UTC)
Template and edit link not working properly
[edit]In this version of the Earth sciences portal, a couple of things aren't working. The edit link at the top of the box reads [{{fullurl:{{{2}}}|action=edit}} edit], and in the first news item there is the string {{convert|adj=on|2|-|5|m}}. RockMagnetist(talk) 15:18, 6 June 2018 (UTC)
- @RockMagnetist: One of the problems is fixed (the In the News section did not have an edit link). The other problem is best asked at the talk page for {{Transclude selected current events}}, as this is the template that included the news onto the portal. Thanks Dreamy Jazz talk | contribs 20:44, 6 June 2018 (UTC)
- The broken edit link is something to do with these edits by Evad37 (talk · contribs). --Redrose64 🌹 (talk) 21:12, 6 June 2018 (UTC)
- Nah, nothing to do with those edits, which were only to the numbered subpages of Template:Box-header (which in turn call Template:Box-header with specific style values). Portal:Earth sciences uses Portal:Earth sciences/box-header, which calls Box-header directly, not a numbered subpage. The problem came from this edit which added a {{/box header}} (which expands to {{Portal:Earth sciences/box-header}}) without a second parameter – so the
{{{2}}}
in Portal:Earth sciences/box-header became the literal text {{{2}}} which was then passed into Template:Box-header's|editpage=
parameter. These 2 edits [1][2] fixed it by allowing|noedit=yes
to be passed on to Template:Box-header for portal components not using subpages - Evad37 [talk] 00:12, 7 June 2018 (UTC)
- Nah, nothing to do with those edits, which were only to the numbered subpages of Template:Box-header (which in turn call Template:Box-header with specific style values). Portal:Earth sciences uses Portal:Earth sciences/box-header, which calls Box-header directly, not a numbered subpage. The problem came from this edit which added a {{/box header}} (which expands to {{Portal:Earth sciences/box-header}}) without a second parameter – so the
- @RockMagnetist: Fixed the
{{Transclude selected current events}}
template, or rather its module, which now properly expands any templates found in the items it transcludes - Evad37 [talk] 02:40, 7 June 2018 (UTC)- @Evad37: Thanks for fixing the problems! RockMagnetist(talk) 04:19, 7 June 2018 (UTC)
- The broken edit link is something to do with these edits by Evad37 (talk · contribs). --Redrose64 🌹 (talk) 21:12, 6 June 2018 (UTC)
Switch to Module:Box-header?
[edit]Should this template be switched to use Module:Box-header (i.e. the code currently at Template:Box-header/lua)? It would take the same parameters and produce the same output, but would have the advantage of checking colour combinations for accessibility, per MOS:COLOUR, and reporting uses of inaccessible colours in Category:Box-header with insufficient title contrast and Category:Box-header with insufficient body contrast. It would also mean that this template and {{Box-header colour}} would be using the same code, reducing redundancy and allowing any future improvements to be made to both templates. - Evad37 [talk] 07:19, 13 August 2018 (UTC)
- Done - Evad37 [talk] 04:34, 17 August 2018 (UTC)
Remove production of NOTOC and NOEDITSECTION
[edit]I suggest that the magic words NOTOC and NOEDITSECTION are removed from output of this module to allow usage of the template on the pages, where table of contents and edit links are needed. For example: subpages of portals, like Portal:United Kingdom/Featured picture, and talk pages of portals. The overwhelming majority of usages of {{Box-header}} are in portals, and to that end the magic words were added to template {{Portal styles}}, which is transcluded to all portal pages via {{Portal maintenance status}}. Ping wbm1058, who objected to this change. —andrybak (talk) 12:57, 27 February 2021 (UTC)
- See Template:Box-header § Behaviour options and the guidance just above the TOC at the top of this page. – wbm1058 (talk) 14:28, 27 February 2021 (UTC)
- Wbm1058, I suggest that these parameters are not needed at all and this functionality should be removed from the template. Presence of {{Box-header}}, which produces a part of a page layout, should not affect the layout of the page as a whole. —andrybak (talk) 15:47, 27 February 2021 (UTC)
- Digging into the edit history, I found this discussion:
- Wbm1058, I suggest that these parameters are not needed at all and this functionality should be removed from the template. Presence of {{Box-header}}, which produces a part of a page layout, should not affect the layout of the page as a whole. —andrybak (talk) 15:47, 27 February 2021 (UTC)
Template talk:Box-header/Archive 1 §Accessibility Issue
|
---|
I recently made a change which AzaToth then reverted. I'd like to discuss options for how it might be possible to incorporate this as I think it is important. Basically, I added <h2> - </h2> tags around the {{{title}}} parameter. These create a 'level 2 header', such as is automatically created by '==' in wikimarkup. The reason for including such is that these headers are used by screen-reader software for the blind to navigate around to different sections. Without them blind users essentially have to listen to the entire portal page rather than just the particular section they are interested in at the moment. The problem is that Wikipedia also uses these headers to determine where to place automatic 'edit' links for users who have that option selected in their preferences. I assumed that most portals use __NOEDITSECTION__, the way I do at Portal:Featured content, to suppress the automatic 'edit' links, but apparently that is not the case. If we add __NOEDITSECTION__ to this template would that suppress them for just this or all pages the template appears on? Do people actually use automatic edit links on existing portals? Could we just remove the manually inserted edit link in this template and use the automatic one instead (which would have the benefit of not showing them for users who have requested that option)? Et cetera. I have already addressed this issue by adjusting things on the portals I maintain, but I think it would be a good feature to incorporate on all of them if there is some way to work out this 'edit link' issue. --CBDunkerson 19:00, 20 March 2006 (UTC)
Sorry I didn't notice those issues (it figures the three portals I looked at would have 'NOTOC', 'NOEDITSECTION', and black fonts) and thanks for all your efforts in cleaning them up. --CBDunkerson 21:05, 20 March 2006 (UTC)
|
- I don't know whether these concerns from 2006 are still valid, and if they are, whether there is a better work-around. Please make your proposed changes in Module:Box-header/sandbox so that they may be reviewed (which you didn't do in December, when these changes surprised me). I think it's likely other editors will be surprised too as this is longstanding behavior in a widely-used template, which you are proposing to change. – wbm1058 (talk) 16:37, 27 February 2021 (UTC)
- {{Box-header}} is a decorative template for wrapping some content. It is usually used on portals to wrap a section of the page, like selected article, selected picture, etc. My argument is: because it is a part of the page, it should not affect the page-wide formatting. All portals already transclude the template {{Portal styles}}, which adds
__NOTOC____NOEDITSECTION__
to them. - Template {{Box-header}} is also used on talk pages of portals in discussions of portal layouts. Affecting the layout of these pages is undesirable. But even without these usages on pages, that are not main portal pages, I claim that production of NOTOC and NOEDITSECTION is illogical for {{Box-header}}.
- The proposed change in the sandbox: Special:Diff/997693614/1046377628. The template is also fairly widely used for formatting of WikiProject pages – if the suggested change is applied, I'll check the formatting of WikiProject pages to make sure that WikiProjects that use {{Box-header}} have the appropriate formatting of table of contents. —andrybak (talk) 10:59, 25 September 2021 (UTC)
- I'm not really a portal user; I noticed this change at Wikipedia:WikiProject Merge. Testing your sandbox version on that project page I saw a TOC where it was suppressed previously, and the "section 1" in the TOC has no heading – what is "section 1" and why is it there? OK I added NOTOC to that page, which is apparently redundant now but is needed if your sandbox goes live. Section editing isn't disabled on that page. wbm1058 (talk) 15:25, 25 September 2021 (UTC)
- @Wbm1058:
the "section 1" in the TOC has no heading – what is "section 1" and why is it there?
– this is because on page Wikipedia:WikiProject Merge, the first usage of {{Box-header}} has|title=[[File:PMG logo.svg|85px|WikiProject Merge]]
, and images are stripped away when generating a table of contents. —andrybak (talk) 14:19, 27 September 2021 (UTC)
- @Wbm1058:
- I'm not really a portal user; I noticed this change at Wikipedia:WikiProject Merge. Testing your sandbox version on that project page I saw a TOC where it was suppressed previously, and the "section 1" in the TOC has no heading – what is "section 1" and why is it there? OK I added NOTOC to that page, which is apparently redundant now but is needed if your sandbox goes live. Section editing isn't disabled on that page. wbm1058 (talk) 15:25, 25 September 2021 (UTC)
- {{Box-header}} is a decorative template for wrapping some content. It is usually used on portals to wrap a section of the page, like selected article, selected picture, etc. My argument is: because it is a part of the page, it should not affect the page-wide formatting. All portals already transclude the template {{Portal styles}}, which adds
- I don't know whether these concerns from 2006 are still valid, and if they are, whether there is a better work-around. Please make your proposed changes in Module:Box-header/sandbox so that they may be reviewed (which you didn't do in December, when these changes surprised me). I think it's likely other editors will be surprised too as this is longstanding behavior in a widely-used template, which you are proposing to change. – wbm1058 (talk) 16:37, 27 February 2021 (UTC)