Sandbox: Difference between revisions

From Alpine Linux
m (Template:Delete proposal...)
m (added test case for potentially bad behavior in the pkg template.)
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{Template}}
This is a test of an upgraded version of the [[Template:pkg]]. It should preserve all old behavior *EXCEPT* it will print an error if positional parameter 1 is unset or empty.<br>
This template proposes a page or section for deletion.


=== Usage ===
The following 2 should produce the exact same URL:<br>
Only administrators can delete pages. Other users should instead use this template to propose a page for deletion. It can also be used to propose one section of a larger page for deletion.
Old template parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
New template parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
<br>
The following should produce the exact same URLs:<br>
Positional parameter 1 + repo parameter: {{Template:Sandbox|apk-tools|repo=main}}<br>
Many parameters set: {{Template:Sandbox|apk-tools|repo=main|branch=edge|arch=x86_64}}<br><br>


You should cite a brief reason in the first argument, and can expand in the article's discussion page. Don't clear the page's content except where it's obviously spam.
Nonsense handling:<br>
No arguments passed whatsoever (new template should handle gracefully)<br>
Old template: {{pkg}} New template: {{Template:Sandbox}}<br><br>


<pre>{{Delete|Reason.}}</pre>
Empty positional argument passed:<br>
Old template: {{pkg|}} New template: {{Template:Sandbox|}}<br><br>


Users are welcome to argue against deletion. You can override the default discussion page with a second argument to the template:
Extra positional arguments passed (shouldn't make any difference)<br>
Old template: {{pkg|apk-tools|foo|bar|bat|baz}} New template: {{Template:Sandbox|apk-tools|foo|bar|bat|baz}}


<pre>{{Delete|Reason.|Talk:Alternative Page}}</pre>
Extra positional arguments and extra named arguments (shouldn't make any difference)<br>
Old template: {{pkg|apk-tools|foo|repo=main|bacon=delicious}} New template: {{Template:Sandbox|apk-tools|foo|repo=main|bacon=delicious}}<br><br>


Flagged pages can be found in [[Special:WhatLinksHere/Template:Delete]].
empty branch parameter<br>
old template: {{pkg|apk-tools|branch=|arch=}}<br>
new template: {{Template:Sandbox|apk-tools|branch=|arch=}}<br><br>


=== Example ===
New behavior:
Link to apk-tools for every arch, but only for maintainer "Natanael Copa":<br>
{{Template:Sandbox|apk-tools|arch=|maintainer=Natanael Copa}}<br><br>


<pre>{{Delete|Message.}}</pre>
Link to all pipewire packages from maintainer "team/alpine-desktop"<br>
{{Template:Sandbox|pipewire*|arch=|maintainer=team/alpine-desktop}}<br><br>


will produce:
Link to all linux-edge packages from maintainer "Milan P. Stanić"<br>
<center>
{{Template:Sandbox|linux-edge|arch=|maintainer=Milan P. Stanić}}<br><br>
{|style="width: 48em; padding:2px; margin:0; margin-bottom:10px; background-color:#f1f1de; border:1px solid #cc9; -moz-border-radius-bottomright: 0.5em; -moz-border-radius-bottomleft: 1em; border-radius-bottomright: 0.5em; border-radius-bottomleft: 1em; -webkit-border-bottom-right-radius: 0.5em; -webkit-border-bottom-left-radius: 1em;"
|<div style="font-size: 1.5em; font-weight:bold; text-align:center;"> [[Image:Tango-user-trash-full.png|48px|left|link=]] This material is proposed for deletion ... </div><p style="text-align: center; font-size: 87%;">Message.
([[{{TALKPAGENAME}}|Discuss]])<br />Make sure [[Special:WhatLinksHere/{{FULLPAGENAME}}|no other pages link here]] and check [[Special:PageHistory/{{FULLPAGENAME}}|the page's history]] before deleting.</p>
|}</center>


<hr>
Link to all i686 ALSA packages on 3.19 (this is the hardest test on the page because mediawiki is very prone to breaking template parameters that start with a star!):<br>
 
{{Template:Sandbox|*alsa*|branch=v3.19|arch=x86}}
</noinclude><includeonly><center>
{|style="width: 48em; padding:2px; margin:0; margin-bottom:10px; background-color:#f1f1de; border:1px solid #cc9; -moz-border-radius-bottomright: 0.5em; -moz-border-radius-bottomleft: 1em; border-radius-bottomright: 0.5em; border-radius-bottomleft: 1em; -webkit-border-bottom-right-radius: 0.5em; -webkit-border-bottom-left-radius: 1em;"
|<div style="font-size: 1.5em; font-weight:bold; text-align:center;"> [[Image:Tango-user-trash-full.png|48px|left|link=]] This material is proposed for deletion ... </div><p style="text-align: center; font-size: 87%;">{{{1|}}}
([[{{{2|{{TALKPAGENAME}}}}}|Discuss]])<br />Make sure [[Special:WhatLinksHere/{{FULLPAGENAME}}|no other pages link here]] and check [[Special:PageHistory/{{FULLPAGENAME}}|the page's history]] before deleting.</p>
|}</center></includeonly>

Revision as of 18:12, 28 May 2024

This is a test of an upgraded version of the Template:pkg. It should preserve all old behavior *EXCEPT* it will print an error if positional parameter 1 is unset or empty.

The following 2 should produce the exact same URL:
Old template parameter 1 only: 3.20.3



New template parameter 1 only: 3.20.3




The following should produce the exact same URLs:
Positional parameter 1 + repo parameter: 3.20.3



Many parameters set: 3.20.3




Nonsense handling:
No arguments passed whatsoever (new template should handle gracefully)
Old template: First parameter cannot be undefined or empty in template: Template:Pkg New template: 3.20.3




Empty positional argument passed:
Old template: First parameter cannot be undefined or empty in template: Template:Pkg New template: 3.20.3




Extra positional arguments passed (shouldn't make any difference)
Old template: apk-tools New template: 3.20.3



Extra positional arguments and extra named arguments (shouldn't make any difference)
Old template: apk-tools New template: 3.20.3




empty branch parameter
old template: apk-tools
new template: 3.20.3




New behavior: Link to apk-tools for every arch, but only for maintainer "Natanael Copa":
3.20.3




Link to all pipewire packages from maintainer "team/alpine-desktop"
3.20.3




Link to all linux-edge packages from maintainer "Milan P. Stanić"
3.20.3




Link to all i686 ALSA packages on 3.19 (this is the hardest test on the page because mediawiki is very prone to breaking template parameters that start with a star!):
3.20.3