Module talk:Articles by class
Rename?
I have now merged Module:Articles by importance into this module by move out the common functionality into a separate function and calling this with different configuration options. It would make sense to rename this module to something more generic (taking "quality" out) — Martin (MSGJ · talk) 14:57, 27 March 2025 (UTC)
- Planning to move to Module:Articles by class unless anyone has a better idea — Martin (MSGJ · talk) 06:17, 7 May 2025 (UTC)
Done — Martin (MSGJ · talk) 10:37, 7 May 2025 (UTC)
format=toc
Potential removal of this argument:
| → Template talk:Articles by Quality#format=toc |
Aluxosm (talk) 09:47, 8 October 2025 (UTC)
Custom arguments
The |custom1= and |custom2= arguments are used so rarely that they might be able to be removed. I'm currently searching through them and removing any that use pre-existing classes (like SIA).
Aluxosm (talk) 09:19, 15 October 2025 (UTC)
This feature either uses {{Importance}} or {{Class}} to style and display the text in the table. The importance template is more permitting and lets you put anything in there, but the class template is more strict and just breaks if it's not a known type; all of the known types however are already accounted for by this module. See their use here: Wikipedia:Department of Fun#Quality and importance assessment. Maybe we could just dumb down the logic and get rid of the template calls so a little fun can still be had haha. Aluxosm (talk) 09:34, 15 October 2025 (UTC)
- In your first post you argue for the removal of these parameters. In your second post you seem to asking for more freedom to input anything? — Martin (MSGJ · talk) 13:54, 15 October 2025 (UTC)
- Sorry for confusing, was mostly joking because the only user of these options that I could see was the Department of Fun 😆. I've since gone through and cleaned up all of the old uses where they were just set to a class that's no longer used; in doing so, I only came across a single other place: Category:National Register of Historic Places articles by importance (Related-importance). Not sure what the best course of action is but I think it's probably best to leave the parameters undocumented. Aluxosm (talk) 14:30, 15 October 2025 (UTC)
- Ohh, for some reason I thought that the calls to the {{Importance}} and {{Class}} templates only originated from these options, so in removing them you could trim a load of code. Obviously not the case though so there's no drama keeping this in for testing and for the couple edge cases. Definitely no rush on this bugfix at least, as
|custom1=is only used on two pages, and|custom2=isn't actually used anywhere! Aluxosm (talk) 15:24, 15 October 2025 (UTC)- Let's just get rid of custom2? — Martin (MSGJ · talk) 17:29, 15 October 2025 (UTC)
- Not fussed, up to you. Apologies for the flip-floppy thread! I just went down a rabbit hole after reading the code wrong 😅 it did lead me to fixing a load of the uses of this template though so it wasn't for nothing! Aluxosm (talk) 02:17, 20 October 2025 (UTC)
- Removed custom2 on the sandbox. Also made custom and alias for custom1 — Martin (MSGJ · talk) 11:38, 20 October 2025 (UTC)
- Not fussed, up to you. Apologies for the flip-floppy thread! I just went down a rabbit hole after reading the code wrong 😅 it did lead me to fixing a load of the uses of this template though so it wasn't for nothing! Aluxosm (talk) 02:17, 20 October 2025 (UTC)
- Let's just get rid of custom2? — Martin (MSGJ · talk) 17:29, 15 October 2025 (UTC)
Root categories and 'Category:Wikipedia 1.0 assessments'
| → Template talk:Category class extended#Purpose |
Should the root categories (TOPIC articles by quality & TOPIC articles by importance) be automatically added to Category:Wikipedia 1.0 assessments? Just like how the sub-categories are currently added to their parents. It would be one less thing for the WikiProject catalyst tool I'm working on to handle, but I can understand not wanting to jam everything into this module. Aluxosm (talk) 13:04, 27 October 2025 (UTC)
- A root category would be a good idea, but WP:1.0 is pretty much a historical/obsolete page — Martin (MSGJ · talk) 14:17, 27 October 2025 (UTC)
- As far as I'm aware, having these in Category:Wikipedia 1.0 assessments is vital for User:WP 1.0 bot to function correctly. I think that it only actually uses the "root"
TOPIC articles by qualitycategories to work out the list of pages connected to a WikiProject, ignoringTOPIC articles by importance, but having both in there is definitely the norm and may be required by other tools/workflows. - If the Wikipedia 1.0 assessments category was applied by this module it would make any future categorisation changes easier.
- ...I think I may have confused things by using the word "root" here; I've added a note to the catalyst tool's docs to hopefully clear it up. Aluxosm (talk) 21:03, 27 October 2025 (UTC)
- In that case, please feel free to add it to the module — Martin (MSGJ · talk) 05:43, 28 October 2025 (UTC)
- I think this will do it, but please test it — Martin (MSGJ · talk) 22:38, 28 October 2025 (UTC)
- Cheers Martin! Yet again, beat me to it but was for the best, much cleaner solution. I promise I'm taking notes haha, will hopefully be of a bit more help soon.
- Just tested it out and it all looks good. I've got a couple other ideas though so probably worth holding off and bundling them together tomorrow. Thanks again, Aluxosm (talk) 14:17, 30 October 2025 (UTC)
- Think that's it for the moment; add away if you're happy 🤙. Aluxosm (talk) 21:22, 30 October 2025 (UTC)
- As far as I'm aware, having these in Category:Wikipedia 1.0 assessments is vital for User:WP 1.0 bot to function correctly. I think that it only actually uses the "root"
Removal of class=nocat
The ability to disable categorisation by setting |class=nocat was added to the template in 2008 (see this discussion), and then presumably transferred here. This was done to allow the template to be added to the root topic articles by quality category without it being added to to the x-Class articles categories. Since then however, the categorisation logic has improved enough that this is unnecessary. This was being used in a few places (incorrectly mind, as |nocat=yes), but I've since gone through and cleaned them up (example):
- Usage search for Articles by Quality
- Usage search for Articles by Importance
With the addition of the ability to categorise the root categories into Category:Wikipedia 1.0 assessments (discussion), we could add an option to disable categorisation that doesn't rely on the |class= parameter so that it could be used anywhere, maybe using |nocat=yes intentionally this time, but I'm not sure that it's particularly necessary. Aluxosm (talk) 20:38, 30 October 2025 (UTC)
- Removed in the sandbox (diff) Aluxosm (talk) 20:43, 30 October 2025 (UTC)
Better page checking for template placement
The current page checking logic applies {{Possibly empty category}} to any category page that {{AbQ}} or {{AbI}} is on, as long as it's title isn't topic articles by quality/importance.
if title.namespace==14 and not title.text:match('^' .. topic .. ' articles by ' .. cfg.qualimp .. '$') then
out = frame:expandTemplate{title='Possibly empty category'}
end
The problem with this is that there are 23 category pages (at the moment) where both {{AbQ}} and {{AbI}} are placed together where the title check doesn't apply. I'm thinking we just use the same check for the |class= parameter that's in use elsewhere so that the template only shows up on the second-tier x-Class topic articles or x-importance topic articles; what do you reckon? Aluxosm (talk) 21:07, 30 October 2025 (UTC)
- Changes in the sandbox (diff). Aluxosm (talk) 21:17, 30 October 2025 (UTC)
- Looks good. I've done some tweaking and simplifying. Do you know if the
|parent=or|sort=parameters are used much? — Martin (MSGJ · talk) 23:03, 30 October 2025 (UTC)- You read my mind, they were both actually added to my to-do list of things to investigate/fix/document yesterday after seeing them everywhere:
|parent=- Usage search for Articles by Quality - 534
- Usage search for Articles by Importance - 170
|sort=- Usage search for Articles by Quality - 2,688
- Usage search for Articles by Importance - 910
- I removed all of the
|parent=parameters in the 17 pages I edited when I was looking at class=nocat because they were all seemingly following the format of {{Article classification}} and {{Article importance}} and pointing to the parent WikiProject instead of the parent category (as can be seen in this correct example); It may have been intentional but because they weren't in thex-Class articles/pagesorx-importance articles/pagescategories the arguments were being ignored anyway. I'd imagine a large number of the results in those searches are also unnecessary or incorrect. - Here are some other related but deprecated parameters:
|task_force=- Usage search for Articles by Quality - 83
- Usage search for Articles by Importance - 30
|tf_link=- Usage search for Articles by Quality - 80
- Usage search for Articles by Importance - 25
- Aluxosm (talk) 06:35, 31 October 2025 (UTC)
- Bit hypocritical for me to remove the
|parent=params if they were actually intentional after complaining about a similar thing 😅. Let me know what you reckon and I'll stick them back in if needed! Aluxosm (talk) 06:41, 31 October 2025 (UTC)- All the ones I have checked seemed to be completely redundant. Have you found any which are not? — Martin (MSGJ · talk) 09:55, 31 October 2025 (UTC)
- Bit hypocritical for me to remove the
- You read my mind, they were both actually added to my to-do list of things to investigate/fix/document yesterday after seeing them everywhere:
Could we suppress the {{possibly empty category}} in all cases when the category title does not match the expected format? That would avoid a lot of cases when this template is being duplicated like at Category:Computer networking articles by quality and importance — Martin (MSGJ · talk) 09:09, 31 October 2025 (UTC)
- Could do, but the change I made in the sandbox (diff) already achieves this by checking if
classis set as that should only be the case onx-Class articles/pagesorx-importance articles/pagescategories. It also works when the category doesn't have a name in the expected format and is set manually. Aluxosm (talk) 10:00, 1 November 2025 (UTC)- Ah, I hadn't really noticed that edit. Okay then. Just to clarify if
|class=is set manually on a non-standard page then do we want {{emptycat}} or not? Will there ever be a need to set class manually? — Martin (MSGJ · talk) 14:38, 1 November 2025 (UTC)- Nope, you're right. I've just searched for pages that don't match the format expected by each template (these don't check that they have the right suffix) and none differ so
classshould always be set correctly: - and the {{Empty cat}} template shouldn't be on any of them because they all have sub categories, all apart from these two where the template was actually already there before I removed it:
- So checking to make sure the title matches the expected format is probably better way to go about it. Aluxosm (talk) 05:58, 2 November 2025 (UTC)
- If we just remove the ability to set class manually, this will be equivalent to your solution — Martin (MSGJ · talk) 09:09, 2 November 2025 (UTC)
- Sounds like a plan 🤙 Aluxosm (talk) 09:08, 4 November 2025 (UTC)
- If we just remove the ability to set class manually, this will be equivalent to your solution — Martin (MSGJ · talk) 09:09, 2 November 2025 (UTC)
- Nope, you're right. I've just searched for pages that don't match the format expected by each template (these don't check that they have the right suffix) and none differ so
- Ah, I hadn't really noticed that edit. Okay then. Just to clarify if