SpikeToronto (talk | contribs) →Won’t collapse: Update |
SpikeToronto (talk | contribs) m →Won’t collapse: c/e |
||
Line 83: | Line 83: | ||
:::::You should be able to use the archive list parameter along with a subpage to format you archives and put them in a collapsible box. (I have never tried this so don’t know if it would work). [[User:Terasail II|<span style="color:DarkCyan; font-weight:800;">Terasail II</span>]][[User talk:Terasail|<sup><span style="color:Black;">'''[✉]'''</span></sup>]] 04:32, 20 June 2021 (UTC) |
:::::You should be able to use the archive list parameter along with a subpage to format you archives and put them in a collapsible box. (I have never tried this so don’t know if it would work). [[User:Terasail II|<span style="color:DarkCyan; font-weight:800;">Terasail II</span>]][[User talk:Terasail|<sup><span style="color:Black;">'''[✉]'''</span></sup>]] 04:32, 20 June 2021 (UTC) |
||
::::::{{re|Terasail|Trialpears}} Turns out I no longer need it to collapse. The archive box on my talkpage now has the word “index” on it, which, when clicked, takes one to the [[User talk:SpikeToronto/Archive index|separate subpage |
::::::{{re|Terasail|Trialpears}} Turns out I no longer need it to collapse. The archive box on my talkpage now has the word “index” on it, which, when clicked, takes one to the [[User talk:SpikeToronto/Archive index|separate subpage]] where the uncollapsed Archives template sits. I no longer need it collapsed since it is the only thing on that page and it better serves its purpose there uncollapsed. However, it occurred to me that if one really wanted it to collapse, one could surround it with {{tlc|collapse top}} and {{tlc|collapse bottom}} templates using the same colour as the Archives box and some appropriate label. Thanks!{{smiley}} — <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto|<span style="color:#000000">Toronto</span>]]</span> 10:05, 20 June 2021 (UTC) |
||
::::::[[File:Ambox notice.svg|18px]] <b><u>UPDATE</u>:</b> I ended up using this where I did need it to be collapsed: <blockquote><code><nowiki>{{collapse top|title=Archives|bg=#F7EABA|bg2=#F7EABA|width=80%}}</nowiki></code><br> |
::::::[[File:Ambox notice.svg|18px]] <b><u>UPDATE</u>:</b> I ended up using this where I did need it to be collapsed: <blockquote><code><nowiki>{{collapse top|title=Archives|bg=#F7EABA|bg2=#F7EABA|width=80%}}</nowiki></code><br>''Archives box''<br><code><nowiki>{{collapse bottom}}</nowiki></code></blockquote>See '''[[User talk:SpikeToronto/Archive 08|here]]''' for an example. — <span style="font: bold 125% Garamond;">[[User:SpikeToronto|<span style="color:#DC143C">Spike</span>]][[User talk:SpikeToronto|<span style="color:#000000">Toronto</span>]]</span> 10:55, 20 June 2021 (UTC) |
||
: Comment: I dislike how merge discussions sometimes don't even consider loss of functionality like this. People don-tvote merge as if merging templates was trivial. And then, after the merge, when the lost functionality is pointed out, we get... programmer's excuses, instead of the obvious solution: revert the merge and ban it until it actually keeps the promises made during the breezy merge discussion (by entirely different and non-technical people than the hard-workingvolunteers actually grappling with the code, this is not a dig at you, it is an observation on the lazy-ass uninformed careless ''process''). [[User:CapnZapp|CapnZapp]] ([[User talk:CapnZapp|talk]]) 07:33, 20 June 2021 (UTC) |
: Comment: I dislike how merge discussions sometimes don't even consider loss of functionality like this. People don-tvote merge as if merging templates was trivial. And then, after the merge, when the lost functionality is pointed out, we get... programmer's excuses, instead of the obvious solution: revert the merge and ban it until it actually keeps the promises made during the breezy merge discussion (by entirely different and non-technical people than the hard-workingvolunteers actually grappling with the code, this is not a dig at you, it is an observation on the lazy-ass uninformed careless ''process''). [[User:CapnZapp|CapnZapp]] ([[User talk:CapnZapp|talk]]) 07:33, 20 June 2021 (UTC) |
Revision as of 17:33, 20 June 2021
Index
|
||
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Stripped td tag
@Izno, Paine Ellsworth, Koavf, Johnuniq, MSGJ, Godsy, Primefac, ProcrastinatingReader, Nardog, Steel1943, Trialpears, DannyS712, Wugapodes, and Headbomb: It seems that the combination of |image=none
and |large=yes
causes a stripped tag lint error for </td>
. I discovered this at Portal talk:Ancient Egypt and various sandbox tests. There may be other combinations of parameters that cause lint errors. Most transclusions of this template do not use |large=yes
, and I didn't find any other live examples causing lint errors. —Anomalocaris (talk) 21:48, 15 March 2021 (UTC)
- Looking into it — Wug·a·po·des 22:14, 15 March 2021 (UTC)
- @Wugapodes: I think I fixed the
|large=yes
|image=none
combination creating an extra header cell in the sandbox. Terasail[✉] 22:22, 15 March 2021 (UTC)- Thanks Terasail. I checked it at Template:Archives/testcases/lint and the sandbox version you have seems to work as expected with no lint errors. I'll add it to the main template. — Wug·a·po·des 22:26, 15 March 2021 (UTC)
- @Wugapodes: I think I fixed the
- Honestly, I have no idea what this template is doing. :) (Given all the conditionals, could use some Luafication.) --Izno (talk) 22:57, 15 March 2021 (UTC)
@Wugapodes and Terasail:
|image=none
is still, or again, causing errors, as can be seen in Portal talk:Cheshire, with a stripped </th>
emanating from {{Archives|collapsed=yes|image=none|search=no|...}}
. Help talk:Pictures has the same problem: {{Archives|collapsed=yes|image=none|search=no}}
. Help talk:Citation Style 1/Centralized discussions has many stripped </th>
tags emanating from this template. —Anomalocaris (talk) 08:41, 5 April 2021 (UTC)
... and this is still true.... —Anomalocaris (talk) 04:36, 7 May 2021 (UTC)
- Anomalocaris Should be fixed now. I really can't blame anyone for not wanting to deal with this. It is a minor lint error affecting a very small number of pages. It takes a good while to find for sure and then you have to make sure it doesn't break anything. Far from the most time effective or fun way to improve Wikipedia. --Trialpears (talk) 07:11, 7 May 2021 (UTC)
- Trialpears: Thanks! Help talk:Citation Style 1/Centralized discussions now has no stripped tags. —Anomalocaris (talk) 07:18, 7 May 2021 (UTC)
Doc
I took a stab at copy editing the documentation, specifically the parameters section, have a look. I began by repeating the otherwise easily overlooked formatting info from the header. Next I reorganized the parameters in a logical order (from simplest to most special/complex). I explained more.
I made assumptions I'd like you to confirm (or refute): 1) how many archives can be auto-detected? I couldn't see any number-specific formatting code in the template, so I'm assuming you could have millions of archives if you like. If the code runs out of memory (or something) already in the four figures ("Archive 9999") perhaps you can change the current statement. 2) I also had to assume manually supplied archives are assumed to live in the same space as the talk page the template is on - that is, the links are relative and that subpages are possible. Feel free to rephrase/correct. 3) normally if a parameter takes a default, then supplying that default changes nothing. This is not true here; meaning that this template is hacked so while {{Archives}} defaults to |auto=long
that is NOT identical to {{Archives|auto=long}}
. In the first case, if you add the unnamed parameter (|1=
) automatic detection is disabled, in the second, it's not. (the |auto=
parameter does two jobs at once)
CapnZapp (talk) 09:11, 24 March 2021 (UTC)
- 1) It's only limited by template limits. According to {{archive list}}'s docs it should go to ~400,000 on an empty page and even on Talk:Donald Trump you should be able to have over 300,000 so no limit in practice.
- 2) It's evaluated just like normal wikitext so relative links shouldn't be an issue. For archivelist where it does matter a bit more rel2abs is used so relative links should be fully supported everywhere if used correctly. 3) See my comment below. --Trialpears (talk) 12:53, 25 March 2021 (UTC)
Doc/Notes
There has been considerable work done on this template lately (for which we are all thankful, I'm sure). However, the documentation seems to be left behind. Two questions raised by the Notes section of the doc: 1) is it really broken to use |auto=no
in conjunction with the "Edit" link? (Please read the doc and resolve the editor question currently displayed to readers). 2) does |auto=
really override |archivelist=
as the documentation claims and what does it mean in practice? CapnZapp (talk) 09:23, 24 March 2021 (UTC)
- I feel like archivelist should be deprecated. It adds significant amounts of complexity and confusion and makes it harder to find where to edit the list rather than just have the archive list in the template. There are currently 353 archivelist subpages. Based on a querry only 12 of these are used multiple times in all other cases they could just be substituted in as the archive list without any disadvantage except perhaps a bit longer wikitext. The last 12 can stop using the archive list by either removing the archivebox if its unnecessary or by replacing it with {{archives|{{/archivelist}}}} which would have the same effect. Could of course be a few more using the archivelist parameter but deprecation and removal definitely seems very feasible and a not insignificant improvement in ease of use. --Trialpears (talk) 12:46, 25 March 2021 (UTC)
Adding search=yes shouldn't matter
The documentation says yes is default for search so adding |search=yes
shouldn't matter but it does.
{{archives |banner=yes |bot=lowercase sigmabot III |age=one |units=month |search=yes}}
produces:
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
"Threads older than 90 days may be automatically archived by lowercase sigmabot III." is placed to the left with many lines, making the box much taller with lots of empty space. Omitting |search=yes
places it better at the bottom:
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
I noticed the poor layout at Wikipedia talk:Teahouse. PrimeHunter (talk) 12:43, 24 March 2021 (UTC)
- Reminds me of how
|auto=long
is said to be default, yet you (can) get different results if you actually add|auto=long
... Cheers, CapnZapp (talk) 13:18, 24 March 2021 (UTC)- CapnZapp, auto=long is not really the default anymore. Instead the template is more clever and can detect whether there is a manually defined archive list or not and if not trying to auto detect with auto=long. If auto=long is specified it doesn't check if a list is manually supplied. That is at least how I intended it to work, but this template is quite difficult to read since it doesn't use a consistent method for handling default values and some of the logic goes through {{archive list}} and so on. Do you have an example where this is a problem/don't work as it's supposed to? --Trialpears (talk) 12:12, 25 March 2021 (UTC)
- My perspective is that of a documentation writer. In this context, I just made a remark, comparing the way the supposedly superfluous
|search=yes
should change nothing, yet does (did?) so; to the way|auto=long
shouldn't really do anything, yet (per the documentation) does so (it reenables auto-detection when used with|1=
). Cheers CapnZapp (talk) 15:04, 25 March 2021 (UTC)
- My perspective is that of a documentation writer. In this context, I just made a remark, comparing the way the supposedly superfluous
- CapnZapp, auto=long is not really the default anymore. Instead the template is more clever and can detect whether there is a manually defined archive list or not and if not trying to auto detect with auto=long. If auto=long is specified it doesn't check if a list is manually supplied. That is at least how I intended it to work, but this template is quite difficult to read since it doesn't use a consistent method for handling default values and some of the logic goes through {{archive list}} and so on. Do you have an example where this is a problem/don't work as it's supposed to? --Trialpears (talk) 12:12, 25 March 2021 (UTC)
- A second minor comment: if you are wondering why the output says "Threads older than one months..." it's because Prime accidentally spelled out "1", that is
|age=one
instead of the|age=1
that displays the correct grammatical number: "one month". CapnZapp (talk) 13:27, 24 March 2021 (UTC)- I copied
|age=one
from Wikipedia talk:Teahouse.|age=1
actually displays "1 month" but I suppose that's better than "one months". PrimeHunter (talk) 15:58, 24 March 2021 (UTC)- I fixed it. CapnZapp (talk) 16:51, 24 March 2021 (UTC)
- Now I really fixed it ;) CapnZapp (talk) 11:05, 25 March 2021 (UTC)
- I fixed it. CapnZapp (talk) 16:51, 24 March 2021 (UTC)
- I copied
- Terasail is this another quirk from your simplifications? --Trialpears (talk) 14:31, 24 March 2021 (UTC)
- @Trialpears: No, its from an if which sets the rowspan for the image cell. I think I fixed it in the sandbox. Terasail[✉] 15:32, 24 March 2021 (UTC)
- Terasail, alright! The change make sense and the testcases look good so I've gone ahead and implemented it. --Trialpears (talk) 12:00, 25 March 2021 (UTC)
- @Trialpears: No, its from an if which sets the rowspan for the image cell. I think I fixed it in the sandbox. Terasail[✉] 15:32, 24 March 2021 (UTC)
Discussion at Template talk:Auto archiving notice § Combine with Template:Archives or Template:Talk header
You are invited to join the discussion at Template talk:Auto archiving notice § Combine with Template:Archives or Template:Talk header. --Trialpears (talk) 22:09, 24 April 2021 (UTC)Template:Z48
UPDATE: Renewed and closed at Wikipedia:Templates for discussion/Log/2021 May 13#Template:Auto archiving notice. — SpikeToronto 10:11, 20 June 2021 (UTC)
Won’t collapse
Hi folks! Any idea why this implementation won’t collapse? It started life as a use of {{archive box collapsible}}
, then got changed to {{archives}}
by a bot (verify). I later tried adding |collapsible=yes
to the already existing |collapsed=yes
, but to no avail (verify). Any thoughts, ideas, or suggestions? Thanks! — SpikeToronto 15:23, 3 June 2021 (UTC)
- SpikeToronto For some reason collapsing and large/banner are mutually exclusive. I'm guessing this isn't intentional I can fix it but since there are so many weird quirks with this template I will leave it for a bit in case anyone has comments. --Trialpears (talk) 15:31, 3 June 2021 (UTC)
- @Trialpears: Thank you for explaining this to me! In the layout that I use, I like the wide archive box (i.e.,
|large/banner=yes
) because it lines up width-wise and centred precisely with the templates immediately above and below. Yet, I also like the idea of being able to collapse it while maintaining that width and centring because it reduces clutter and banner blindness at the top of the page. Thus, this may be one reason why having collapsing and bannering play nicely with each other could prove beneficial. Thanks! — SpikeToronto 15:58, 3 June 2021 (UTC)
P.S. Thank you for responding so quickly. Your turnaround time was phenomenal! I figured if I heard back from someone in a week or two, I’d be lucky. But, such a rapid answer was wholly unexpected, yet joyfully appreciated. Thanks! — SpikeToronto 15:58, 3 June 2021 (UTC)
- @Trialpears: Thank you for explaining this to me! In the layout that I use, I like the wide archive box (i.e.,
- I'm fairly certain that it is nothing mote than an oversight. Much of the functionality here is from merging with other templates which has made it a nightmare for testing. I'm unsure if having collapsing and banners at the same time has ever been possible hence it not being a problem in existing uses. --Trialpears (talk) 16:44, 3 June 2021 (UTC)
- @Trialpears and SpikeToronto: From what I remember, the separate banner template couldn’t collapse and trying to make it collapse with the image and layout was a mess... With the template being how it is and trying to not add more breaking points, there never seemed a need to add more if’s to have the functionality. So the closest you can get is making it a flat bar as shown in the testcase. Although I don’t think I ever looked that hard to try to make it work originally either... Terasail II[✉] 04:18, 20 June 2021 (UTC)
- You should be able to use the archive list parameter along with a subpage to format you archives and put them in a collapsible box. (I have never tried this so don’t know if it would work). Terasail II[✉] 04:32, 20 June 2021 (UTC)
- @Terasail and Trialpears: Turns out I no longer need it to collapse. The archive box on my talkpage now has the word “index” on it, which, when clicked, takes one to the separate subpage where the uncollapsed Archives template sits. I no longer need it collapsed since it is the only thing on that page and it better serves its purpose there uncollapsed. However, it occurred to me that if one really wanted it to collapse, one could surround it with
{{collapse top}}
and{{collapse bottom}}
templates using the same colour as the Archives box and some appropriate label. Thanks! — SpikeToronto 10:05, 20 June 2021 (UTC) - UPDATE: I ended up using this where I did need it to be collapsed:
See here for an example. — SpikeToronto 10:55, 20 June 2021 (UTC){{collapse top|title=Archives|bg=#F7EABA|bg2=#F7EABA|width=80%}}
Archives box{{collapse bottom}}
- @Terasail and Trialpears: Turns out I no longer need it to collapse. The archive box on my talkpage now has the word “index” on it, which, when clicked, takes one to the separate subpage where the uncollapsed Archives template sits. I no longer need it collapsed since it is the only thing on that page and it better serves its purpose there uncollapsed. However, it occurred to me that if one really wanted it to collapse, one could surround it with
- Comment: I dislike how merge discussions sometimes don't even consider loss of functionality like this. People don-tvote merge as if merging templates was trivial. And then, after the merge, when the lost functionality is pointed out, we get... programmer's excuses, instead of the obvious solution: revert the merge and ban it until it actually keeps the promises made during the breezy merge discussion (by entirely different and non-technical people than the hard-workingvolunteers actually grappling with the code, this is not a dig at you, it is an observation on the lazy-ass uninformed careless process). CapnZapp (talk) 07:33, 20 June 2021 (UTC)