MediaWiki talk:Common.js
![]() | This interface message or skin may be documented on MediaWiki.org or translatewiki.net. The page forms part of the MediaWiki interface, and can only be edited by administrators and interface editors. To request a change to the page, add {{edit fully-protected}} to this page, followed by a description of your request. Consider announcing discussions you add here at Wikipedia:Village pump (technical) to bring more people to the discussion. |
![]() | Functions and global variables defined by Common.js should be documented in the CSS and JavaScript catalog, especially if they are of interest to script authors. |
![]() ![]() | To help centralise discussions and keep related topics together, the following talk pages redirect here:
|
This page has archives. Sections older than 40 days may be automatically archived by Lowercase sigmabot III. |
Removing magic editintros
The last discussion on remove the "magic editintros" (for BLP/disambig pages) was at MediaWiki talk:Common.js/Archive 22#Replacing magic editintros with editnotices and Lua. That fixated on solving the problem by detecting page categories using lua - which is not really possible until phab:T50175 is resolved. I have a patch for that in the pipeline which is stuck. But never mind, this doesn't actually need T50175:
- Module:Disambiguation has seen significant improvements over the last year which make it very accurate in detecting disambiguation pages, without any performance impact. It can be used to check whether to include {{disambig editintro}}.
- for BLP editintro we check for Category:Living people and Category:Possibly living people. Both of them are always used directly (not via a template). So a wikitext search suffices.
I propose to drop the code from Common.js and include the editintros via Template:Editnotices/Namespace/Main like other editnotices. I've created Module:Mainspace editnotice which implements the existing editnotices added by the template and by Common.js. – SD0001 (talk) 06:38, 4 February 2024 (UTC)
- Pinging people from the earlier discussion: @Galobtter @TheDJ @Tacsipacsi. – SD0001 (talk) 06:42, 4 February 2024 (UTC)
- I'd support this, per what I said in the last discussion. I assumed it'd be too annoying to figure out disambiguation pages without the category, but since it is possible, that was the only blocker to doing what I was trying to do. The only thing is that this needs to be fast since the editnotice is parsed everytime it needs to be displayed. Galobtter (talk) 15:52, 5 February 2024 (UTC)
- Performance should be no more of an issue that the already existing check for {{refideas}} on the talk page is (which I wrote without even thinking about performance and AFAIK hasn't caused any problems of that nature). * Pppery * it has begun... 17:19, 5 February 2024 (UTC)
- As part of the {{draft at}} inclusion conditionals, the current editnotice is already checking whether the page is a disambiguation page. In the new module, I'm reusing the same check result for both use-cases. I also tested by not reusing the result and letting it get computed twice - even then no discernible change in lua execution time was seen at a millisecond precision. – SD0001 (talk) 17:52, 5 February 2024 (UTC)
- Looks good then. Galobtter (talk) 19:02, 5 February 2024 (UTC)
- I have requested the edits at Template talk:Editnotices/Namespace/Main#Interface-protected edit request on 6 February 2024. – SD0001 (talk) 10:48, 9 February 2024 (UTC)
- Looks good then. Galobtter (talk) 19:02, 5 February 2024 (UTC)
Unarchiving this discussion as there is a problem, as indicated at Template_talk:BLP_editnotice#Suppresses_link_to_Page_notice, which has been traced to the above edit. Is there something that can be done to resolve the issue? SilkTork (talk) 23:24, 25 May 2024 (UTC)