Template talk:See also if exists

(Redirected from Module talk:See also if exists/sandbox)
Latest comment: 2 years ago by Nihiltres in topic Merge

Merge

edit

@BrownHairedGirl: Would you mind if I merged the module functionality for this template into Module:Labelled list hatnote? MB asked if I'd make {{further if exists}} as well, to help clear out Category:Articles with hatnote templates targeting a nonexistent page, and it seems logical to simply generalize the functionality the way that the labelled-list hatnotes module does in the first place. I'd rather not file a TfD and deal with all its associated baggage for such a simple change, and I've found myself procrastinating on this issue, so I figure with your consent I can reasonably skip some of those procedural steps. Thanks for your time, {{Nihiltres |talk |edits}} 16:04, 14 April 2022 (UTC)Reply

@Nihiltres, thanks for your thoughtful message.
In principle, I think that a technical change like this is better discussed in this way, away from the heat that TFD can sometimes generate.
In practice, I have found that several similar proposals have caused an unhelpful loss of functionality. So I would oppose a merge unless there was sandboxed test version with suite of testcases showing that all worked as intended.
Also, I am not entirely persuaded of the merits of multi-functional modules. They may avoid a lot of modules with similar code, but multifunctionality can add unhelpful complexity. Is there some reason why you don't just make some tweaks Module:See also if exists to solve the problem? BrownHairedGirl (talk) • (contribs) 16:25, 14 April 2022 (UTC)Reply
@BrownHairedGirl: Hi again, sorry for the delay. You prompted me to go through this with a bit more polish, :) so … I've set up modifications in Module:Labelled list hatnote/sandbox that add "if exists" functionality as an optional, default-off feature that can be enabled in a template definition. I also set up a suite of testcases for the module (which was sorely overdue in any event) including the sandboxed "if exists" functionality. {{Further if exists}} has also been prototyped using the module sandbox, and has some basic tests (could be improved) showing that it works as intended. I like to centralize hatnote template functionality because it makes it easier to build a common set of standard features, which I'd otherwise be reimplementing for the "if exists" templates. It made more sense to me in this case to fold "if exists" functionality into the main module than to reimplement the other features I'm trying to standardize. {{Nihiltres |talk |edits}} 14:32, 1 June 2022 (UTC)Reply
Wow, @Nihiltres! Great work!
That suite of testcases at Module:Labelled list hatnote/testcases is exceptionally thorough. You have clearly put a huge amount of work into making the tests, and into developing all the code in the modules.
Right now, I have the headspace for only a quick scan of the results. What I see all looks great, and since you are clearly applying a lot of skill and diligence and good judgement, it would ridiculous for me to stand in your way 'cos I haven't done my own scrutiny.
So, please do whatever you think is right. I am happy to trust your judgement.
When I started creating the if-exists variants a few years ago, I had no idea that their use would become so widespread. But since it has grown, it's a good idea to centralise the code. BrownHairedGirl (talk) • (contribs) 14:54, 1 June 2022 (UTC)Reply
Thank you. :) I'll make the changes sometime in the near future, scheduled to correspond with lower-than-average server load (as Module:Labelled list hatnote is used on ~1% of all pages). {{Nihiltres |talk |edits}} 15:20, 1 June 2022 (UTC)Reply