This redirect is within the scope of WikiProject Categories, a collaborative effort to improve the coverage of categories on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.CategoriesWikipedia:WikiProject CategoriesTemplate:WikiProject CategoriesCategories
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]
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]