Jump to content

Wikipedia:Village pump (technical): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 793: Line 793:
This will apply to articles in the reading mode and in VisualEditor, but not in the wikitext editor. We are planning these changes to apply across all the wikis. The default may vary based on the language or script of the project. To confirm, we will also add preferences for logged-in and logged-out users.
This will apply to articles in the reading mode and in VisualEditor, but not in the wikitext editor. We are planning these changes to apply across all the wikis. The default may vary based on the language or script of the project. To confirm, we will also add preferences for logged-in and logged-out users.


We have prepared a prototype that allows for various changes in the font size and spacing. [{{fullurl:{{PAGENAME}}|banner=Accessibility_for_reading_prototype}} To use the prototype, force a banner to appear and click on it]. Next, try out different combinations and share what works for you. This prototype is '''not a reflection of the final design'''. Instead, we would like to learn what font sizes Wikimedians want to see across languages. We will use this data to determine the proposed default and options. [[mw:Special:MyLanguage/Reading/Web/Accessibility for reading/Community prototype testing|Read more about the test]]. [[User:OVasileva (WMF)|OVasileva (WMF)]], [[User:SGrabarczuk (WMF)|SGrabarczuk (WMF)]] ([[User talk:SGrabarczuk (WMF)|talk]]) 22:30, 5 October 2023 (UTC)
We have prepared a prototype that allows for various changes in the font size and spacing. [{{fullurl:{{FULLPAGENAME}}|banner=Accessibility_for_reading_prototype}} To use the prototype, force a banner to appear and click on it]. Next, try out different combinations and share what works for you. This prototype is '''not a reflection of the final design'''. Instead, we would like to learn what font sizes Wikimedians want to see across languages. We will use this data to determine the proposed default and options. [[mw:Special:MyLanguage/Reading/Web/Accessibility for reading/Community prototype testing|Read more about the test]]. [[User:OVasileva (WMF)|OVasileva (WMF)]], [[User:SGrabarczuk (WMF)|SGrabarczuk (WMF)]] ([[User talk:SGrabarczuk (WMF)|talk]]) 22:30, 5 October 2023 (UTC)

Revision as of 22:32, 5 October 2023

 Policy Technical Proposals Idea lab WMF Miscellaneous 
The technical section of the village pump is used to discuss technical issues about Wikipedia. Bug reports and feature requests should be made in Phabricator (see how to report a bug). Bugs with security implications should be reported differently (see how to report security bugs).

If you want to report a JavaScript error, please follow this guideline. Questions about MediaWiki in general should be posted at the MediaWiki support desk. Discussions are automatically archived after remaining inactive for five days.

Vector 2022. Sticky page title covers top 2 lines of sticky table headers

Vector 2010 has no sticky title to cover up sticky table headers. Is there any way to fix this in Vector 2022? Or can it be fixed locally in the template:

See: Help:Table#Tables with sticky headers. That section has been much updated.

Can the sticky table header in the template be made to have priority over the page title bar? People can always go back to the top of the page to get that page title bar.

In Vector 2022 the only thing that needs to follow one down a page is the table of contents sandwich menu. And that is small enough that it could fit in the blank space on the left.

The sticky page title bar coexists with the sticky table headers on this German wikipedia page:

And it works with multi-row headers. And it has header cell borders.

Someone put a lot of work getting these sticky headers linked below to work. Look at relevant section in the CSS file.

--Timeshifter (talk) 05:53, 17 September 2023 (UTC)[reply]

I have no idea what import style template is needed for, it seems overcomplicated for what it is trying to achieve, but this is a simple offset issue.
see also the gadget for sticky headers. MediaWiki:Gadget-StickyTableHeaders.css. unfortunately this causes other problems, when ppl start adding scrollable tables i side a scrollable page —TheDJ (talkcontribs) 14:24, 17 September 2023 (UTC)[reply]
TheDJ and Tol. I am not talking about scrolling tables. To avoid confusion I changed the name of the relevant Help:Table section to this:
Help:Table#Tables with sticky headers. I left an anchor to the old section name since it has been used elsewhere.
The most recent previous discussion at this Village Pump:
Wikipedia:Village pump (technical)/Archive 206#Vertical scrollable table with sticky headers
And there is the Phabricator task you, TheDJ, started in 2012: Phab:T42763: "Implement repeated/fixed/floating/sticky table headers".
I don't want to wait years more to have something that works, even if it isn't perfect. I want something that works for everybody without installing a gadget. So a template is one way to go that could be used now.
{{Import style}} was created by Tol.
See Global Search at Toolforge. Search for
"{{Import style|sticky}}" - in quotes. To get transclusion count and list of articles. It currently is used on 93 pages on various-language Wikipedias. Those sticky table headers work fairly well in Vector 2010.
{{Import style}} is also used for something else. Maybe it can be split off into a single-purpose template with a descriptive name like:
{{Sticky headers}}. With class=sticky-headers
I would be happy with just sticky column headers for now. How about somebody do that and incorporate the German Wikipedia method, and other methods, into it, too? Mostly pinging people participating in, or mentioned, in past sticky table header discussions: Jroberson108. TheDJ. Tol. Newslinger. Sdkb. Graeme Bartlett. Bawolff. GhostInTheMachine. Yair rand. Izno. Jts1882.
When this Village Pump discussion is done, people can continue here:
Help talk:Table#Tables with sticky headers. Discussions. It links to past discussions too.
Are there forums just for templates?
--Timeshifter (talk) 12:40, 18 September 2023 (UTC)[reply]
Template:Import style was my attempt at providing a single template with which multiple different reusable styles could be imported for use (to reduce redundancy between different style-importing templates), but it is not all that widely used. As for now, I can work on using the German Wikipedia implementation here (as it seems to work quite well there). Tol (talk | contribs) @ 13:55, 18 September 2023 (UTC)[reply]
Sticky table headers seem to be the norm on all of my devices and I have yet to see a page where this seemed to be a problem. Then again, I do not normally use Vector2022. However, after a couple of tests with Vector2022, I am solidly confirmed in my resolve to stay with Real Vector, but the sticky table headers vs stick article header thing still does not seem to be a problem. As such, I don't see any need for a template. Is there a specific browser that seems to have this problem? — GhostInTheMachine talk to me 13:58, 19 September 2023 (UTC)[reply]
True for Firefox, Edge, Chrome, and Opera. It is in Vector 2022 that the problems lie. {{Import style|sticky}} works well in Vector 2010. See: Help:Table#Tables with sticky headers for details. --Timeshifter (talk) 15:27, 19 September 2023 (UTC)[reply]
@Timeshifter, am I missing something here? I don't see any issues with the sticky header on List of countries by real population density based on food growing capacity — Qwerfjkltalk 18:46, 19 September 2023 (UTC)[reply]

For that list article you may need to narrow your browser width and/or increase the page's text size in order to better see the problems in Vector 2022. Here below is a simpler example: Part of a table from United States drug overdose death rates and totals over time#Comparisons to other countries. Note that when you scroll the page you can't see the sticky header in Vector 2022. But you can see it in Vector 2010.

Template:Import style

Drug overdose deaths per year.
Location 2021 2020 2019 2018 2017
 Austria 235 191 196 184 154
 Belgium 168 152 148
 Bulgaria 20 24 11 24 18
 Croatia 77 99 97 85 65
 Cyprus 10 6 5 12 16
 Czech Republic 64 58 42 39 42
 Denmark 197 202 183 239

--Timeshifter (talk) 20:58, 19 September 2023 (UTC)[reply]

You can also see it in MonoBook. --Redrose64 🌹 (talk) 20:54, 20 September 2023 (UTC)[reply]

Redrose64. In Monobook skin are all the header lines sticky below in this table excerpt from United States drug overdose death rates and totals over time#1968–2021 overdose death rates and totals?:

Template:Import style

1968–2020 US drug overdose deaths. 1,106,859 total.
Year Deaths Population
(July 1 residents)
Crude death rate per 100,000 Age adjusted death rate per 100,000
1968 5,033 199,533,564 2.5 2.8
1969 6,006 201,568,206 3.0 3.3
1970 7,101 203,458,035 3.5 3.8
1971 6,771 206,782,970 3.3 3.5
1972 6,622 209,237,411 3.2 3.4

--Timeshifter (talk) 14:58, 21 September 2023 (UTC)[reply]

The row with the sorting arrows is non-sticky. The stuff above is all sticky. Sorry for the delay - catching up on my watchlist after four eleven-hour shifts and one six-hour. Not in that order. --Redrose64 🌹 (talk) 19:44, 22 September 2023 (UTC)[reply]

Potential fix

I have potentially fixed this by using:

body.vector-sticky-header-visible .is-sticky {
	top: 3.125rem;
}

This will only apply the additional 3.125rem vertical shift if the sticky header is visible at that time. Tol (talk | contribs) @ 22:13, 23 September 2023 (UTC)[reply]

Thanks Tol! It works for me on Firefox, Edge, Chrome, and Opera.
Are there some simpler tables on German Wikipedia with sticky headers using the same template as the more complex table? And are they using a template above the table like here? Along with a class on the top line? I'd like to see how they are doing it. And how are they getting borders on headers?
I would prefer something simpler like {{sticky}} and class=sticky. --Timeshifter (talk) 00:13, 24 September 2023 (UTC)[reply]
No problem, @Timeshifter. I'm not entirely sure how the German Wikipedia does this, but it looks like (in this instance) it's applied through a part of their de:Modul:Musikcharts system, which makes the header sticky (through styles at de:Vorlage:Charttabelle/styles.css) once the table reaches a certain length. My intent with Template:Import style was that multiple styles could be imported to a page through one system, in the hope of reducing duplication and redundancy, but it hasn't become too widely used. Tol (talk | contribs) @ 20:25, 24 September 2023 (UTC)[reply]
Tol. I updated Help:Table#Tables with sticky headers to acknowledge that it is now working on Vector 2022 also. So, on German Wikipedia it looks like they don't have a simple dedicated template just for sticky headers? I think if such a template were created on English Wikipedia it would be widely used, and would be copied to other-language wikis. --Timeshifter (talk) 20:44, 24 September 2023 (UTC)[reply]
Thanks for letting me know, @Timeshifter. I'm not aware of a widely used sticky-header template, though it looks like Template:Import style has been copied to some other language Wikipedias. Based on Wikidata (Template:Import style/sticky.css (Q110736505)), there are at least 5 other languages with Template:Import style/sticky.css. Tol (talk | contribs) @ 18:40, 26 September 2023 (UTC)[reply]

Multi-row headers

Tol. I noticed that only the top row of multi-row headers is sticky. That is a problem in some cases. It is interesting that only the top row loses the borders.

Template:Import style

2018 Bauxite production and reserves (kilotonnes)
Country Production Reserves
 World 327,000 30,000,000
 Australia 110,000 6,000,000
 Guinea 82,000 7,400,000
 China 60,000 1,000,000
 Brazil 35,000 2,600,000
 Indonesia 23,000 1,200,000
 India 22,000 660,000

List of U.S. states and territories by incarceration
and correctional supervision rate
has several multi-row tables. Template:Import style

Adult incarceration rates by state. Dec 31, 2018
Jurisdiction 2018 rate per 100,000 of all ages 2018 rate per 100,000 adults 2018. Adults in prison or jail
  Federal 50 70 179,200
  State 580 750 1,919,200
 Louisiana * 980 1,280 45,700
 Oklahoma * 970 1,290 38,500
 Mississippi * 920 1,210 27,500
 Georgia * 850 1,110 89,700
 Kentucky * 840 1,080 37,500
 Alabama * 820 1,060 40,400

Template:Import style

Correctional supervision rates by state, 2018.
Jurisdiction Total Community supervision Incarcerated
Total, 12/31/2018 Rate per 100,000 adults Probation or Parole, 12/31/2018 Rate per 100,000 adults In prison or jail, 12/31/2018 Rate per 100,000 adults
  Federal 302,100 90 122,800 40 179,200 50
  State 6,083,300 1,850 4,276,200 1,300 1,919,200 580
 Alabama * 99,200 2,030 60,900 1,240 40,400 820
 Alaska * 7,800 1,060 3,400 460 4,400 600
 Arizona * 136,800 1,890 84,300 1,170 54,600 750
 Arkansas * 74,700 2,470 53,800 1,780 24,700 820
 California * 513,100 1,290 312,400 790 200,700 510
 Colorado * 122,600 2,140 91,300 1,590 32,700 570

--Timeshifter (talk) 23:17, 24 September 2023 (UTC)[reply]

@Timeshifter, yes, multiple lines of sticky headers are not going to work (and I'm pretty sure that they wouldn't have worked previously, either). Implementing an alternate method of styling to allow compatibility with multiple lines of sticky headers would probably not be compatible with the current implementation, but I can look into it to see if it would be feasible. Tol (talk | contribs) @ 17:29, 26 September 2023 (UTC)[reply]
Tol. I tested both Vector 2022 and 2010 and neither work with multi-row headers.
class=floatable-header works with multi-row headers here:
https://yugipedia.com/wiki/Historic_OCG_Limitations_Chart/2021%E2%80%93 - it is a very large wiki.
The other year ranges linked at the top also have multi-row headers that float. It seems they are based solely on CSS:
https://yugipedia.com/wiki/MediaWiki:Common.css - search for "floatable".
I see nothing about floatable headers in the JS:
https://yugipedia.com/wiki/MediaWiki:Common.js
I am curious to know if the CSS can be copied as is to a template style of the same name:
{{floatable header}}
If I knew enough about templates and CSS I would try it myself. Maybe you or someone else could try it.
{{Floatable header}} and class=floatable-header are easy to remember.
Unlike {{Import style|sticky}} and class=is-sticky
That is why I say a dedicated template with a simple name would be used much more widely. I have difficulty remembering the current template here. It will never be widely used in my opinion on the English Wikipedia. Other wikis will try it out, but I doubt it will have wide use on the other-language wikis either. For the same reason.
I also like that class=floatable-header is used on the same line as class=wikitable. That is easier to remember too.
--Timeshifter (talk) 19:44, 26 September 2023 (UTC)[reply]
@Timeshifter, taking a quick look at the Common.css you linked from the other wiki, it seems to be a collection of very messy workarounds (as acknowledged in the comments for the .floatable-header styles), and I would be very hesitant to use an implementation based on it. In particular, it is hard-coded to make each header row 29px below the previous one (resulting in it breaking quite badly when a header runs over multiple lines).
The reason that the floatable-header class is applied next to the wikitable class is because it is applied to the table, not to the row. This is because its CSS is done so that it applies to all header cells in the object (not to the object itself). Here, the CSS floats the object itself (the row).
I'm working on implementing an alternative style that would float the entire header (the thead element) of a table; this should be able to use the Vector 2022 header fix as well. Tol (talk | contribs) @ 21:58, 26 September 2023 (UTC)[reply]
Just tested in Google Chrome (version 116.0.5845) with a Monobook skin, and scrolling seems to work perfectly: first, data rows slide up and hide beneath headers; then—when all data rows disappear—all header rows except the first one start hiding under the first one; finally only the first header row remains visible and it gets scrolled-out from view, too. --CiaPan (talk) 20:14, 26 September 2023 (UTC)[reply]
CiaPan. I just tested in Chrome (version 117.0.5938.92) with a Monobook skin. The only header (in the multi-row header tables) I see floating is the top row. The rest roll under it as I scroll up. This is the same thing I see in the other browsers I tested: Firefox, Edge, Opera. --Timeshifter (talk) 20:28, 26 September 2023 (UTC)[reply]

Yugipedia floatable-header tests

Tol and all. See: https://yugipedia.com/wiki/User:Spaceshifter - (Timeshifter was taken). I tested some tables there. This is the best I could do. See file history for what was done. That floatable-header CSS depends on scope=col

I couldn't get more header rows to float beyond what is showing there.

I created {{header test}} to try out some ideas. Feel free to edit it further. I haven't had time to try much yet in a sandbox. --Timeshifter (talk) 21:59, 26 September 2023 (UTC)[reply]

@Timeshifter, as I mentioned above, the Yugipedia CSS works through a complicated and easily breakable workaround. The header scope parameters (scope="col") are there for accessibility reasons, and have their own meaning (see Mozilla docs); they really shouldn't be used for floating headers. Tol (talk | contribs) @ 22:03, 26 September 2023 (UTC)[reply]

Multi-row headers implemented

Timeshifter, I have put together a basic working implementation of multi-row headers. See:

Template:Import style

An example table
A header above other headers
Header 1 Header 2
Another header 1 Another header 2
Content 1 Content 2
More content 1 More content 2
Even more content 1 Even more content 2

This can be done by applying the class is-sticky-head to the table itself; this then makes the table's entire header (thead element) sticky. There are still some problems with borders that I'm sorting out. Tol (talk | contribs) @ 22:13, 26 September 2023 (UTC)[reply]

On second try, this seems to only work with sortable tables (as otherwise, there is no thead element, because MediaWiki doesn't implement HTML tables well). Tol (talk | contribs) @ 22:18, 26 September 2023 (UTC)[reply]
Tol. It works in preview on all the tables in #Multi-row headers above. It does not work with {{Static row numbers table}}. Those subtemplates of {{Static row numbers}} are problematic and I don't use them anymore. I removed {{Static row numbers table}} from this thread. I substituted: class="wikitable sortable static-row-numbers srn-white-background" style=text-align:right;
--Timeshifter (talk) 23:29, 26 September 2023 (UTC)[reply]

Tol. I updated Help:Table#Tables with sticky headers. I threw in rowspan. Your example table only had colspan. The template works with complex, multi-line, multi-row headers with both rowspan and colspan below. Scroll down slowly. I see that you figured out how to add borders for Chrome, Edge, and Opera! But not Firefox as of this writing. --Timeshifter (talk) 23:00, 28 September 2023 (UTC)[reply]

Without sticky template

rowspan and colspan
Name Data columns are below
1 2 3
Name1 1-1 2-1 3-1
Name2 1-2 2-2 3-2
Name3 1-3 2-3 3-3
Name4 1-4 2-4 3-4
Name5 1-5 2-5 3-5
Name6 1-6 2-6 3-6

With sticky template Template:Import style

rowspan and colspan
Name Data columns are below
1 2 3
Name1 1-1 2-1 3-1
Name2 1-2 2-2 3-2
Name3 1-3 2-3 3-3
Name4 1-4 2-4 3-4
Name5 1-5 2-5 3-5
Name6 1-6 2-6 3-6

Wiki source excerpt:

{{mw-datatable}}{{Import style|sticky}}
{| class="wikitable sortable mw-datatable is-sticky-head" 
|+ rowspan and colspan
|-
! rowspan=2 | Name
! colspan=3 style=max-width:8em | Data columns are below
|- 
! 1
! 2
! 3
|- {{sort row|4}}
...

--Timeshifter (talk) 23:00, 28 September 2023 (UTC)[reply]

Template:Sticky header

Tol and all. I experimented at Template:Header test using your CSS at Template:Import style/sticky.css. I got it to work in a sandbox, and it has been adapted to work at Template:Sticky header (via another sandbox). See: Template:Sticky header/styles.css

I updated Help:Table#Tables with sticky headers to use Template:Sticky header. It is easy to remember, and thus easy to use:

{{sticky header}}
{| class="wikitable sortable sticky-header"

I have installed it in a few articles, and it is working fine in all 4 main browsers. I hope to replace the old template where it is being used as I find the time. There are many articles I want to use it in. It is much easier now that I don't have to keep looking back at Help:Table to remember the different names for the template and class for the old template. And I don't have to remember whether to use a bar or a slash as with
{{Import style|sticky}} And there is no need for a Lua module. Other wikis will find this much easier to copy. --Timeshifter (talk) 08:31, 2 October 2023 (UTC)[reply]

How to make a new template

How does wone go about making a new template for a sport. I am trying to make one for netball tours. I have though no idea where to begin. PicturePerfect666 (talk) 04:41, 24 September 2023 (UTC)[reply]

See Help:Templates#Writing templates Mach61 (talk) 05:32, 24 September 2023 (UTC)[reply]
What exactly do you want the template to show? There are lots of templates that show the results of matches or tables of results. There is probably some existing template that does approximately what you want and you can use that as the template for your template. —  Jts1882 | talk  08:40, 24 September 2023 (UTC)[reply]
Well in the same way cricket has a cricket series template I would like to generate a similar template for netball. cricket and rugby have tours, and so does netball and I am trying to create a template in the same vein for those tours. There is no existing template which does what I want. PicturePerfect666 (talk) 14:33, 24 September 2023 (UTC)[reply]

Is there a way of getting an individual to help guide me through how to create a template? As I am struggling, Thank you in advance. PicturePerfect666 (talk) 16:12, 26 September 2023 (UTC)[reply]

Can you describe exactly what the template should contain and how it should display? Some are easier than others. If one already exists which can be modified it can be relatively easy. · · · Peter Southwood (talk): 12:08, 30 September 2023 (UTC)[reply]

Video Cut Tool login failure

I'm unable to login with OAuth to the Video Cut Tool, and get a 404 Page Not Found message each time I try. I left a comment on the related talk page, but have not yet had any response.

Any advice, or prompting that can be made to the developers would be most welcome! Cheers, Nick Moyes (talk) 11:00, 28 September 2023 (UTC)[reply]

@Nick Moyes I will take a look, assuming something in our (Video Cut Tool's) tech stack went down :( -- Sohom (talk) 07:22, 29 September 2023 (UTC)[reply]
@Sohom Datta Thanks: that'd be great. I'm desperate to trim down a webm file before I run an editathon next Tuesday. If you can fix it before then that'd be absolutely brill. Cheers, Nick Moyes (talk) 08:57, 29 September 2023 (UTC)[reply]
Update: I have now been able to login successfully. Thanks for looking into this for me. Nick Moyes (talk) 13:59, 1 October 2023 (UTC)[reply]

Tracking unreviewed new articles by user.

How difficult/costly/complicated would it be to track the unreviewed mainspace articles created by an editor. Primary target would be the number, but keeping track of which articles would be a nice extra. Real time (or within an hour) would be best, but daily might work well enough. (please ping) Cheers, · · · Peter Southwood (talk): 07:57, 29 September 2023 (UTC)[reply]

@Pbsouthwood, what specifically would you be wanting? For a given user? I assume this would be on a website. — Qwerfjkltalk 16:31, 29 September 2023 (UTC)[reply]
Qwerfjkl, it would be an on-Wiki way of keeping track of the number, rate of creation and rate of assimilation into the Wiki of a user's new article contributions. I am brainstorming possible solutions to the "mass article creation" issue, and this is a question that arose. So I am interested in ways it could be done. Obviously a list could be stored on a user subpage, and updated by a bot, or several bots for different types of update. The initial population could be done by one bot, then additions to the list might be possible by a bot or other routine monitoring article creation, and removals by something monitoring deletions and something monitoring review status, which could be autoreview, NPP review through the toolset, or other possibilities. What Is less clear is what options there are for methods of doing this, and what the overheads would be. As this would be needed for all articles created, reviewed and deleted, there might be quite a high setup overhead and an ongoing overhead of unknown magnitude, so there would be a cost-benefit playoff of a size I cannot guess. The possible benefits of such a system would be a way to put a brake on high rate article creation automatically based on the NPP backlog, the number of articles the user has in the queue for review, and possibly input from ORES on article quality. People occasionally creating articles of reasonable quality might never notice the system, those creating large numbers of stubs in a small period would hit a wall until their articles were reviewed or deleted to make space in their personal list for more. List length could be extended on request if needed, or reduced in problem cases, or when NPP is overloaded. It might encourage more article creators to help with NPP if they had skin in the game, and were competent. Probably also factors I have not thought of yet, but that is where I am now. Some idea of feasibility and practicability would help decide if this is worth further investigation. Cheers, · · · Peter Southwood (talk): 04:39, 30 September 2023 (UTC)[reply]
@Pbsouthwood, you could ask at WP:QUERY and use {{Database report}}. I think you mean that there would be one list that contains the users with the highest rate of new article creation?
Sorry for the delay in answering. — Qwerfjkltalk 09:47, 2 October 2023 (UTC)[reply]
One bit of information WP:QUERY would need: is there any way to distinguish an unreviewed page? I don't see anything in the obvious places such as page_props or change_tag_def, but there are many other places that information could be hidden. Certes (talk) 11:26, 2 October 2023 (UTC)[reply]
(after some digging) It's in the logging table. An entry with log_action="patrol" and log_type="patrol" means it's been reviewed. Certain actions (e.g. blank-and-redirect then overwrite with a new article) will quietly invalidate that entry. That's a regular occurrence on vandal magnets like Bears but rare in general, and no worse than creating a good article then overwriting it directly with crap which NPP was never designed to detect. Certes (talk) 11:44, 2 October 2023 (UTC)[reply]
You can sort of reconstruct it from logging, yes, but the canonical place is pagetriage_page. mw:Extension:PageTriage#Via SQL. —Cryptic 14:34, 2 October 2023 (UTC)[reply]
A quick way of getting a (rough) number could be to filter by username at Special:NewPagesFeed though they do drop off the feed eventually (not sure when and it's too late in the day for me to consult documentation today. Alpha3031 (tc) 14:45, 2 October 2023 (UTC)[reply]
I believe it's 90 days. — Qwerfjkltalk 16:05, 2 October 2023 (UTC)[reply]

Thanks everyone, it seems likely that such tracking would be technically feasible and unlikely that the overhead would be excessive. I now need to consider the arguments for and against actually doing something like this as a way to reduce pressure on NPP, while minimising disruption of useful page creation. Cheers, · · · Peter Southwood (talk): 05:49, 3 October 2023 (UTC)[reply]

empty sitenotice dismiss dialog

It appears there is a bug, likely with sitenotice, that may be triggering you to "dismiss" an empty notice on every page. If so, this is being looked in to in phab:T347722. It is safe to click dismiss there. — xaosflux Talk 15:38, 29 September 2023 (UTC)[reply]

Now phab:T347645. — xaosflux Talk 15:41, 29 September 2023 (UTC)[reply]

Hide

All of a sudden the "Hide" option is showing up at the top of my pages. Not knowing what it was for, I clicked on it in Chrome, and now it's gone there. I haven't touched it on Firefox or Edge. Why is it there, and should I care that it's suddenly popped up? It shows up as "Dismiss" on Wikisource. — Maile (talk) 04:07, 30 September 2023 (UTC)[reply]

See this section above; I noticed it too. Graham87 (talk) 04:16, 30 September 2023 (UTC)[reply]
Thanks.— Maile (talk) 04:19, 30 September 2023 (UTC)[reply]

Temporary accounts for unregistered editors

Read this in your languagePlease help translate to other languages. • Please tell other users about these changes

Mock up of history page showing old and new username styles. The IP address 172.0.0.1 changes to the temporary account ~2024-23126-086, with an icon for revealing the underlying IP address
Next year, unregistered editors will start using temporary accounts.

In 2024, editors who have not registered an account will automatically begin using temporary accounts. These editors are sometimes called "IP editors" because the IP address is displayed in the page history.

The Trust and Safety Product team gave a presentation at Wikimania about this change. You can watch it on YouTube.

There is more information at m:IP Editing: Privacy Enhancement and Abuse Mitigation.

SGrabarczuk (WMF) (talk) 02:05, 30 September 2023 (UTC)[reply]

This'll be an interesting change. I just hope it doesn't make AV patrolling a complete nightmare. Deauthorized. (talk) 03:24, 1 October 2023 (UTC)[reply]

Sections not working correctly in mobile view

Desktop (with mobile view) screenshot, logged-in with gadgets and skin preferences (Firefox)
Desktop (with mobile view) screenshot, logged-out with default settings (Chrome)

On the article TFT LCD, the section headings past "Types" aren't working correctly when on the mobile website - they all get superseded by the Types section and can't be collapsed by themselves. This happens no matter the browser - I tried Firefox on Android and on desktop with mobile view enabled, as well as Chrome on desktop with mobile view. It happens both logged-in and logged-out (I thought a gadget or my common.css was messing with it, but that doesn't seem to be the case).

I'd put this on Phabricator, but I honestly don't know how to reproduce this other than that one article. I can't see anything wrong with the source. Suntooooth, it/he (talk/contribs) 08:46, 30 September 2023 (UTC)[reply]

Fixed by removing unclosed div tags. Nardog (talk) 08:56, 30 September 2023 (UTC)[reply]
Thanks for the fix! Looking at the page history, seems like this has gone unnoticed since 2009 :P Suntooooth, it/he (talk/contribs) 09:01, 30 September 2023 (UTC)[reply]
This is a good example of why it is useful for bots and human editors to fix "low priority" Linter errors, even though those edits may seem like noise in your watchlist. Missing end tags can sometimes result in the rest of a page being "swallowed up" or otherwise formatted incorrectly.
This page had two missing end tags. Gnomes have fixed all of the articles starting with A through G with two Linter errors (see report); this one, starting with T, was one of a few thousand left to tidy up. There are tens of thousands with a single Linter error as well. Thanks Nardog! – Jonesey95 (talk) 14:11, 30 September 2023 (UTC)[reply]

Hey, what's going on?

There's a problem here.

‍ ‍ Relativity ‍ 22:16, 30 September 2023 (UTC)[reply]

I was able to get here by typing https://en.wikipedia.org/wiki/Wikipedia:Teahouse directly into my browser. ‍ ‍ Relativity ‍ 22:17, 30 September 2023 (UTC)[reply]
What's also weird is that the error comes up so far when I test "Maroon 5" but not "Apple", "Human" or "Benedict Arnold". ‍ ‍ Relativity ‍ 22:21, 30 September 2023 (UTC)[reply]
Please write the error message out in text or at least briefly describe it (or maybe someone else here could do that). Not only is the video completely inaccessible to screen reader users like me, it also doesn't help with text searching should someone else get the same error message and try to search for it. Graham87 (talk) 06:45, 1 October 2023 (UTC)[reply]
I see you also posted it at this teahouse thread without informing us, in violation of guidelines about multiple posting. From that thread it seems to be a normal maintenence error message. Graham87 (talk) 06:53, 1 October 2023 (UTC)[reply]
@Graham87 Thanks. And sorry about posting also on the Teahouse; I wasn't aware of that rule. ‍ ‍ Relativity ‍ 18:45, 1 October 2023 (UTC)[reply]
The error message looks the same as in T347588 ("Service Temporarily Unavailable"), perhaps it's the same issue (although the reporter there only noticed it happening when submitting the search with nothing entered). Matma Rex talk 19:30, 1 October 2023 (UTC)[reply]

Load a packaged gadget on another project

I'm looking for a way to retrieve the export value of a modular gadget on another project. What I mean by "modular gadget" is a gadget file with a module.exports declaration, i.e. a script file that's only reserved for variable/function declarations and doesn't call any function internally (see ja:MediaWiki:Gadget-testPackage.js that I created for experimental purposes).

When you load this file on the same project, either of the following just works:

var moduleName = 'ext.gadget.testPackage';
mw.loader.using(moduleName, function() {
	var testFunctions = mw.loader.require(moduleName);
	console.log(testFunctions);
});
var moduleName = 'ext.gadget.testPackage';
mw.loader.using(moduleName, function(require) {
	var testFunctions = require(moduleName);
	console.log(testFunctions);
});

But I don't know how I can do the same on another project on which the ResourceLoader doesn't recognize ext.gadget.testPackage as a module. Try, for instance on enwiki:

mw.loader.using('ext.gadget.testPackage').catch(function(err) {
	console.log(err); // Error: Unknown module: ext.gadget.testPackage
});

This result is taken for granted because enwiki doesn't have testPackage as a module name in gadgets-definition. So, for us to retrieve the export value of testPackage, we'll need to first make the system recognize testPackage as a module, and then call require. The only solution I have atm is:

var moduleName = 'ext.gadget.testPackage';
mw.loader.load('//ja.wikipedia.org/enwiki/w/load.php?modules=' + moduleName);
setTimeout(function() {
	var testFunctions = mw.loader.require(moduleName);
	console.log(testFunctions); // OK
}, 3000);

But, it's ugly to use setTimeout because we want to do a "load the module, THEN" operation. Any idea how we can do this? FYI, the following doesn't work:

var moduleName = 'ext.gadget.testPackage';
mw.loader.load('//ja.wikipedia.org/enwiki/w/load.php?modules=' + moduleName);
mw.loader.using(moduleName)
.then(function() {
	var testFunctions = mw.loader.require(moduleName);
	console.log(testFunctions);
})
.catch(function(err) {
	console.log(err); // Error: Unknown module: ext.gadget.testPackage
});

I'd appreciate any help. Dragoniez (talk) 08:17, 1 October 2023 (UTC)[reply]

You can use mw.loader.getScript() (which is a wrapper for $.ajax()). mw.loader.require() is "publicly exposed for debugging purposes only and must not be used in production code" btw. Nardog (talk) 08:25, 1 October 2023 (UTC)[reply]
@Nardog Thanks, the code below just worked.
var moduleName = 'ext.gadget.testPackage';
mw.loader.getScript('//ja.wikipedia.org/enwiki/w/load.php?modules=' + moduleName)
.then(function() {
	mw.loader.using(moduleName)
	.then(function(require) {
		var testFunctions = require(moduleName);
		console.log(testFunctions);
	})
	.catch(function(err) {
		console.log(err);	
	});
})
.catch(function(err) {
	console.log(err);	
});
I guess I was a bit over-complicating things. Dragoniez (talk) 08:34, 1 October 2023 (UTC)[reply]

Please help me adding new version of this graphic

I tried to upload the new corrected version of this graphic Media:Legal_framework_for_the_conscientious_objection_to_abortion_in_Europe.png but I don't know why the colours of my map has not been changed although I changed it in my new version of thi file. But Czechia and Bulgaria still are in blue omitting that fact, I changed their colours on red in my file The Wolak (talk) 11:23, 1 October 2023 (UTC)[reply]

Wikipedia:Bypass your cache. Nardog (talk) 11:34, 1 October 2023 (UTC)[reply]

Pop-up on talk pages

There has been a change where adding __NONEWSECTIONLINK__ no longer hides this popup that comes up on empty talk pages. Is there another way to get rid of it? 1989 (talk) 14:29, 1 October 2023 (UTC)[reply]

@1989 I don't see any "pop up" on my normal view or as a logged out editor, can you be more specific? The page you linked to is also not "empty". — xaosflux Talk 17:32, 1 October 2023 (UTC)[reply]
Perhaps you are seeing something similar to phab:T344387? — xaosflux Talk 17:34, 1 October 2023 (UTC)[reply]
No. I'm referring to this popup saying "Start a discussion with..." with a flower image next to it. 1989 (talk) 17:38, 1 October 2023 (UTC)[reply]
That is made by "Enable quick topic adding" at Special:Preferences#mw-prefsection-editing. I don't know whether there is a way to only remove it on pages with __NONEWSECTIONLINK__. PrimeHunter (talk) 18:10, 1 October 2023 (UTC)[reply]
There was a way, for some reason it was changed to where that is no longer possible. Is there a way to get it reversed? 1989 (talk) 18:19, 1 October 2023 (UTC)[reply]
This seems wrong, this message shouldn't appear when the page doesn't have the "Add topic" tab. Want to file a bug? Matma Rex talk 19:41, 1 October 2023 (UTC)[reply]
I filed phab:T347878. Matma Rex talk 14:58, 2 October 2023 (UTC)[reply]
Fixed now. Thanks for spotting. Matma Rex talk 21:54, 2 October 2023 (UTC)[reply]

Inline diff font-family change missed a class or something

I think it was two Thursdays ago this merge changed the inline diff display font to monospace from sans-serif. But as is demonstrated by e.g. Special:MobileDiff/1178149481, whatever class is used for text that is determined to have been moved around rather than altered, remains sans-serif. Is this intentional? It seems like an oversight. Folly Mox (talk) 22:22, 1 October 2023 (UTC)[reply]

Because diffing didn't have inline diff display, mobile diff implements its own version of diffs (in a way) and with its own CSS. phab:T117279 is probably what you're looking for - mobile diff will go away Soon (or more likely redirect to Special:Diff). Izno (talk) 23:40, 1 October 2023 (UTC)[reply]
You can add this to Special:MyPage/minerva.css if you don't like the mixed fonts:
.mw-diff-inline-context, .mw-diff-inline-deleted, .mw-diff-inline-added {font-family: sans-serif !important;}
PrimeHunter (talk) 00:11, 2 October 2023 (UTC)[reply]
Thanks! It's not super important to me what font-family the diffs are displayed in; I was just wondering if the display of the moved-about bits was intentionally different. Folly Mox (talk) 14:18, 2 October 2023 (UTC)[reply]
Thanks for spotting - this is fixed by https://gerrit.wikimedia.org/r/c/mediawiki/core/+/962664/1 which should be deployed in the next week or two. ESanders (WMF) (talk) 18:11, 2 October 2023 (UTC)[reply]

Special:UrlShortener

I see that Special:UrlShortener has been enabled. Am I correct that this will give us random and unmemorable abbreviations? For example, if I use it on this page which has the perfectly good abbreviation VPT, I'll get something like w.wiki/k4W? If so, is there any way to reserve useful and memorable existing abbreviations so that, for example, w.wiki/VPT arrives here and not to some obscure page without the initials V, P or T for which it was randomly generated? This question/point probably applies to articles at least as much as to WP: namespace. Certes (talk) 09:59, 2 October 2023 (UTC)[reply]

@Certes short answer: no. They are not "random", but you can't pick them. You will get the same URL for a page if you use it again on the same page. Also note, shorturl's are global across all languages and project types. The primary causal use is for giving someone a link where sending the full URL is difficult, such as via a messaging app or when it requires actually typing it in somewhere else. — xaosflux Talk 10:37, 2 October 2023 (UTC)[reply]
They seem to be nice and short, especially for really important pages like https://w.wiki/tr and I assume the main point really is that they will not need to be blacklisted like other URL shorteners, so you can quote your messaging post onwiki without making changes. —Kusma (talk) 10:54, 2 October 2023 (UTC)[reply]
Some of these don't look random:
Looks like people had some fun :) —Kusma (talk) 12:20, 2 October 2023 (UTC)[reply]
URLShortener is from 2019. I guess somebody picked targets for many one-character strings before it went public, including some digits like https://w.wiki/5 (Wikipedia:Five pillars). PrimeHunter (talk) 17:42, 2 October 2023 (UTC)[reply]
Thanks. Fair enough; here's hoping the short-to-long decoder lasts as long as Wikipedia. Certes (talk) 11:13, 2 October 2023 (UTC)[reply]
For this page use: https://w.wiki/4HJw Graeme Bartlett (talk) 11:20, 2 October 2023 (UTC)[reply]
Edward-Woodrowtalk 23:36, 2 October 2023 (UTC)[reply]

Tech News: 2023-40

MediaWiki message delivery 01:24, 3 October 2023 (UTC)[reply]

Vector 2022 CSS/JS changes

See Tech News above.
An intadmin needs to Copy any necessary content from MediaWiki:Vector.css into MediaWiki:Vector-2022.css.
There should probably also be a sitenotice / watchlist notice / mass mailing for users to:

CSS: Copy or migrate any necessary content from User:<username>/vector.css into User:<username>/vector-2022.css – OR – m:User:<username>/global.css.
JavaScript: Migrate any content from User:<username>/vector.js into User:<username>/common.js – OR – m:User:<username>/global.js. (NOT duplicating it, because that can cause errors, unless you know what you are doing.)


This should also be used as an opportunity to encourage housekeeping. E.g. deletion of local skin JS/CSS that is no longer used.— Frostly (talk) 02:10, 3 October 2023 (UTC)[reply]

Site script code review request

I've proposed some changes at Wikipedia talk:File upload wizard#Use AJAX instead of <iframe> in the script and I'm wondering if anyone would like to review them before I turn my suggestion into an edit request. Matma Rex talk 16:09, 3 October 2023 (UTC)[reply]

lgtmTheresNoTime (talk • they/them) 16:56, 3 October 2023 (UTC)[reply]
@Matma Rex, there appear to be a few other uses of iframe in MediaWiki space and a lot more in user space. You may wish to review at least the MW space pages for the same issue. Izno (talk) 19:40, 3 October 2023 (UTC)[reply]
@Izno I had a look at the MediaWiki namespace scripts and they use other things in their iframes, which is just fine. I'm only trying to get rid of using api.php in an iframe, and it's very unlikely that any other script would do this, because it's such a chore to implement (but FileUploadWizard had it, because it was needed to support file uploads on IE 8 until we dropped support for it in 2016-ish – the technique wasn't needed for anything else since like… 2007). Matma Rex talk 20:59, 3 October 2023 (UTC)[reply]

Cite Journal template

Hello, I hope this is the correct forum for this; if I should post elsewhere, please let me know.

Situation:

  • When editing an article you can click on the REFTOOLBAR and use CITE >> Templates >> Cite journal to add a reference.
  • I frequently add the DOI only to the form, insert, and then use the CITATIONS tool to fill in the details. This works well.
  • I sometimes have the JSTOR ID and not a DOI. For these I add the JSTOR ID to the DOI field, insert, change the name of the field to JSTOR, then use the CITATION tool.

Question: Would it be possible to add a JSTOR field to the insert citation form like the DOI field?

I hope my description is clear. Thanks,  // Timothy :: talk  17:56, 3 October 2023 (UTC)[reply]

1. Are you aware, that you can just click the magnify icon next to the doi field there and it will fill the fields immediately?
2. Depends on the field definitions known to reftoolbar, and can likely be added. Probably somewhere in this page: mediawiki:RefToolbarConfig.js#L-158
TheDJ (talkcontribs) 19:39, 3 October 2023 (UTC)[reply]
You can already put your JSTOR url into the URL box in the RefToolbar journal citation and click the magnifying glass. Eg for https://www.jstor.org/stable/1304899 to give <ref>{{cite journal |last1=Repetski |first1=John E. |title=Review of Treatise on Invertebrate Paleontology: Part W, Miscellanea, Supplement 2, Conodonta |journal=Journal of Paleontology |date=1984 |volume=58 |issue=6 |pages=1538–1541 |url=https://www.jstor.org/stable/1304899 |issn=0022-3360}}</ref> Graeme Bartlett (talk) 21:31, 3 October 2023 (UTC)[reply]
This what I do, but once it's created I cut |URL=https://www.jstor.org/stable/1304899 down to |jstor=1304899. -- LCU ActivelyDisinterested transmissions °co-ords° 21:48, 3 October 2023 (UTC)[reply]
  • Response: Thank you all, this is very helpful. For me putting the URL in is just as easy as the JSTOR ID. My vision is so bad I never knew there was a mag glass but I found it. Greetings from Los Angeles,  // Timothy :: talk  12:45, 4 October 2023 (UTC)[reply]

Bolding in Watchlist not working properly

In my Preferences, I have my watchlist view set up so that pages I have not visited since they have been edited are shown in boldface.

For the past several hours, that isn't working properly -- only the first 30 or so entries at the top get proper bolding, and then below that no bolding at all.

I have thousands of pages on my watchlist and often view more than 7 days' worth of changes if I've been away for a while, so this is a problem. Does anyone know what is happening and whether it is being fixed or looked into? Softlavender (talk) 08:45, 4 October 2023 (UTC)[reply]

@Softlavender: It works for me. It sounds like you accidentally clicked "Mark all changes as seen". The button can be hidden with the below in your CSS.
.mw-rcfilters-ui-markSeenButtonWidget {display:none !important;}
PrimeHunter (talk) 11:42, 4 October 2023 (UTC)[reply]
I guess that's what happened. Thanks for the tip; I have implemented the script now. Softlavender (talk) 02:37, 5 October 2023 (UTC)[reply]

substring from strings

Hi! How can I return a substring from a string, beginning with the fourth character to the fourth-last character, using it in a template.

And I have a date string: "4. October 2023" and what to return the day (without point), the month (but numerical = 10) and the year separately. – Doc TaxonTalk01:52, 5 October 2023 (UTC)[reply]

There's {{str right}}. Nardog (talk) 01:59, 5 October 2023 (UTC)[reply]
See more at {{String-handling templates}} and mw:Help:Extension:ParserFunctions##time. {{#time:j|4. October 2023}} {{#time:n|4. October 2023}} {{#time:Y|4. October 2023}} produces 4 10 2023. PrimeHunter (talk) 02:28, 5 October 2023 (UTC)[reply]
@PrimeHunter: I noted that {{#time:j|4. October 2023}} works in Englisch, but in German the month spells "Oktober". So {{#time:j|4. Oktober 2023}} doesn't work. {{#timel:j|4. Oktober 2023|de}} doesn't work too. I get "Error: Invalid time". Can I format the German month "Oktober" to English month "October"? Sorry for this special question. – Doc TaxonTalk03:22, 5 October 2023 (UTC)[reply]
See Module:User:Mr._Stradivarius/convertTime. Then in lua #time is mw.language.new('de'):formatDate( format, string, language ). This is also the long standing bug Phab:T21412. Snævar (talk) 10:36, 5 October 2023 (UTC)[reply]
This is the English Wikipedia. Always say if your post is about another wiki. You can translate to English and use #time. There may be easier ways with existing German Wikipedia templates but I don't know which templates you have. PrimeHunter (talk) 11:15, 5 October 2023 (UTC)[reply]

Prototype for readability improvements

Prototype screenshot
Screenshot of the prototype

Introduction to a new project

As the Wikimedia Foundation Web team, we are beginning a project called Accessibility for reading. The goal is to make the wikis more accessible and comfortable for reading. We are starting with the font size and typography for articles. In the next phase, we will focus on color palette customizations, such as dark mode. All these will be available for both logged-in and logged-out users as settings, on both desktop and mobile web.

This project is a consequence of the many requests from volunteers. We would like to thank everyone who has asked about this. On the technical side, dark mode is easier now than the font size, but it will need more involvement from the communities. This is why we are asking you to follow our project. Watch the project page and subscribe to our newsletter. We'll share more details on that in the coming weeks and months.

Test out our prototype

Now, we would like to focus on making articles easier to read and scan for casual readers. We aim for:

  1. Making the default font size bigger (but not too big) to improve readability
  2. Increasing the information density to improve scanning
  3. Increasing the space between paragraphs and sections to improve scanning
  4. Allowing readers (including logged-out users!) to customize the density of text

This will apply to articles in the reading mode and in VisualEditor, but not in the wikitext editor. We are planning these changes to apply across all the wikis. The default may vary based on the language or script of the project. To confirm, we will also add preferences for logged-in and logged-out users.

We have prepared a prototype that allows for various changes in the font size and spacing. To use the prototype, force a banner to appear and click on it. Next, try out different combinations and share what works for you. This prototype is not a reflection of the final design. Instead, we would like to learn what font sizes Wikimedians want to see across languages. We will use this data to determine the proposed default and options. Read more about the test. OVasileva (WMF), SGrabarczuk (WMF) (talk) 22:30, 5 October 2023 (UTC)[reply]