Wikipedia:Village pump (technical): Difference between revisions
PrimeHunter (talk | contribs) →Detecting transclusion through a redirect: Editors expect it to make no difference whether a redirect is used |
|||
Line 358: | Line 358: | ||
:@[[User:Nickps|Nickps]] The module could use <code>getContent()</code> to get the text of the current page and then search it for one of the redirect templates. <span class="nowrap">--[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<b style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:middle;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</b>]])</span> 02:30, 3 June 2024 (UTC) |
:@[[User:Nickps|Nickps]] The module could use <code>getContent()</code> to get the text of the current page and then search it for one of the redirect templates. <span class="nowrap">--[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<b style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:middle;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</b>]])</span> 02:30, 3 June 2024 (UTC) |
||
::I would oppose that as confusing and probably inefficient. Editors expect it to make no difference whether a redirect is used. If we really want a certain "redirect" to behave differently then don't make it a redirect but a wrapper which passes a certain parameter. [[User:PrimeHunter|PrimeHunter]] ([[User talk:PrimeHunter|talk]]) 02:47, 3 June 2024 (UTC) |
Revision as of 02:47, 3 June 2024
Policy | Technical | Proposals | Idea lab | WMF | Miscellaneous |
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.
Frequently asked questions (see also: Wikipedia:FAQ/Technical) Click "[show]" next to each point to see more details.
|
Tech News: 2024-21
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Recent changes
- The Nuke feature, which enables administrators to mass delete pages, will now correctly delete pages which were moved to another title. [1]
- New changes have been made to the UploadWizard in Wikimedia Commons: the overall layout has been improved, by following new styling and spacing for the form and its fields; the headers and helper text for each of the fields was changed; the Caption field is now a required field, and there is an option for users to copy their caption into the media description. [2][3]
Changes later this week
The new version of MediaWiki will be on test wikis and MediaWiki.org from 21 May. It will be on non-Wikipedia wikis and some Wikipedias from 22 May. It will be on all wikis from 23 May (calendar). [4][5]
The HTML used to render all headings is being changed to improve accessibility. It will change on 22 May in some skins (Timeless, Modern, CologneBlue, Nostalgia, and Monobook). Please test gadgets on your wiki on these skins and report any related problems so that they can be resolved before this change is made in all other skins. The developers are also considering the introduction of a Gadget API for adding buttons to section titles if that would be helpful to tool creators, and would appreciate any input you have on that.
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
MediaWiki message delivery 23:01, 20 May 2024 (UTC)
- Based on a quick search, it looks like the heading change will affect almost 300 scripts, many of which have inactive maintainers. Some arbitrary highlights from the top of the list include:
- Awesome Aasim's User:Awesome Aasim/rcpatrol.js
- BrandonXLF's User:BrandonXLF/FFUHelper.js
- Cacycle's User:Cacycle/wikEd.js, User:Cacycle/wikEd dev.js, and User:Cacycle/wikEd.user.js
- DannyS712's User:DannyS712/DiscussionCloser.js, User:DannyS712/SectionRemover.js, and User:DannyS712/SectionMover.js
- Enterprisey's User:Enterprisey/reply-link.js, User:Enterprisey/copy-section-link.js, User:Enterprisey/archiver.js, User:Enterprisey/strike-archived.js, User:Enterprisey/section-watchlist.js, and User:Enterprisey/section-redir-note.js
- Equazcion's User:Equazcion/OneClickArchiver.js, User:Equazcion/TeahouseRespond.js, and User:Equazcion/NewSectionSummary.js
- Evad37's User:Evad37/OneClickArchiver.js and MediaWiki:Gadget-XFDcloser-core.js
Mr. Stradivarius's User:Mr. Stradivarius/gadgets/SignpostTagger.js- PhantomTech's User:PhantomTech/scripts/AFCRHS.js
- SD0001's User:SD0001/RFUD-helper.js
- Terasail's User:Terasail/COI Request Tool.js
Technical 13's User:Technical 13/Scripts/OneClickArchiver.js- The Earwig's User:The Earwig/permalink.js and User:The Earwig/afc-helper.js
- The Evil IP address's User:The Evil IP address/hdedit.js
- Plus many, many more. --Ahecht (TALK
PAGE) 19:22, 21 May 2024 (UTC)- A quick way to test these scripts right now, is to enable the Parsoid beta option (which already uses the new html structure) and to disable DiscussionTools, which uses a partial form of the new heading structure. —TheDJ (talk • contribs) 08:39, 22 May 2024 (UTC)
- Indeed, you can already see it in Parsoid mode (but note that there are other differences – e.g. Parsoid output has
<section>
tags around each section, which may require a separate set of updates in some scripts). - Disabling DiscussionTools doesn't actually change anything though. The HTML structure is the same whether it's enabled or disabled, only the styles are different. Also, note that it uses a "hybrid" heading structure currently when using the default parser, as you say, but it uses the new structure when using Parsoid.
- So in short, you can just use Parsoid mode to test these scripts today here on English Wikipedia, but beware that there may be extra issues. But if they work with Parsoid, they will work with the new headings too. Matma Rex talk 11:25, 22 May 2024 (UTC)
- Indeed, you can already see it in Parsoid mode (but note that there are other differences – e.g. Parsoid output has
- The technical 13 script was blanked, so we don't have to worry about that one.
- Will the fact that they're rolling this out for only some wikimedia-deployed skins at this time make the patch more complicated? If I'm reading it right, the scripts may temporarily have to support both heading styles. –Novem Linguae (talk) 09:16, 22 May 2024 (UTC)
- Yes, it does, and they have to. Matma Rex talk 11:20, 22 May 2024 (UTC)
- At a glance, it seems that User:Mr. Stradivarius/gadgets/SignpostTagger.js already supports the new style, as it uses
$( '#bodyContent h2:first' ).text()
as a backup if$( '#bodyContent h2:first span.mw-headline' )
doesn't exist (line 291). — Mr. Stradivarius ♪ talk ♪ 13:09, 22 May 2024 (UTC) - Fixed RFUD-helper. Thanks for the ping. – SD0001 (talk) 18:33, 22 May 2024 (UTC)
- This is going to break both my edit request scripts, I will try to fix them at the weekend. Terasail[✉️] 18:41, 22 May 2024 (UTC)
- A quick way to test these scripts right now, is to enable the Parsoid beta option (which already uses the new html structure) and to disable DiscussionTools, which uses a partial form of the new heading structure. —TheDJ (talk • contribs) 08:39, 22 May 2024 (UTC)
Gadget-autonum (Auto-number headings)
- I'm assuming ~ and feel free to correct me if i'm wrong ~ that something about this deployment is why headings no longer have numbers (for me)? Will it be possible to go back to that at some point? I find long pages almost impossible to navigate around without numbered headings, so will have to learn a new way of working if it won't be possible. Thanks, Happy days, ~ LindsayHello 16:24, 27 May 2024 (UTC)
- @LindsayH: No, that was removed a while ago. You may try the "Auto-number headings" gadget here. Nardog (talk) 19:31, 27 May 2024 (UTC)
- If you're speaking about the table of contents, Vector 22 does not provide numbering. Vector, Monobook, and Modern do.
- If you are speaking about each actual heading, then indeed the preference is gone and indeed there is a gadget for it now. You have correctly identified that gadget as needing to be updated for this change. It looks like the necessary change to the snippet (documentation) has already been made, so someone needs to port that here. Izno (talk) 19:59, 27 May 2024 (UTC)
- Thank you, Izno, helpful. I'd assumed it was a script/gadget, as so many appeared to be affected above. I shall patiently wait in hope
Happy days, ~ LindsayHello 11:51, 28 May 2024 (UTC)
- @LindsayH. I think I fixed this gadget for monobook/timeless/modern with this update. But there is still a double number bug on some talk pages on vector/vector-2022. Will work on that next. –Novem Linguae (talk) 16:50, 1 June 2024 (UTC)
- You star! Thanks for the notification (and, of course, for fixing it). Happy days, ~ LindsayHello 06:14, 2 June 2024 (UTC)
- @LindsayH. I think I fixed this gadget for monobook/timeless/modern with this update. But there is still a double number bug on some talk pages on vector/vector-2022. Will work on that next. –Novem Linguae (talk) 16:50, 1 June 2024 (UTC)
- Thank you, Izno, helpful. I'd assumed it was a script/gadget, as so many appeared to be affected above. I shall patiently wait in hope
The obsolete nowrap attribute
See this edit and User talk:Awesometd#nowrap. The nowrap
attribute on a td
element, already deprecated in HTML 4 (December 1997), was marked as obsolete in HTML 5 (October 2014). The user says that they are copying its use from other pages, so does anybody know where in Wikipedia such usage is recommended or even suggested? --Redrose64 🌹 (talk) 10:30, 28 May 2024 (UTC)
- I doubt it's suggested anywhere. A few cases may have been added long ago and some users just copy what they saw in other articles. The user is right that it's used in 2024 F1 season. Unsurprisingly it's also in previous seasons. It's common to start such pages with a copy-paste from another season. PrimeHunter (talk) 11:16, 28 May 2024 (UTC)
- At a first estimation there are about 10k uses of it; I'm sure someone can refine that. Izno (talk) 15:26, 28 May 2024 (UTC)
- There's many more obsolete attributes still being used in tables, such as
align
orbgcolor
. If we truly want to get rid of them, the solution would probably be to extend the Linter extension, so that they'll be listed at Special:LintErrors. That's probably a discussion to be had over at WT:LINT. --rchard2scout (talk) 07:56, 29 May 2024 (UTC)
Mobile view Swiss flag
There is a bit of an issue on mobile view in when this template: " Switzerland" (or its variants) is used, the flag will appear stretched horizontally. Also, it’s to be noted this template: "
" does not have this issue. —TwinBoo (talk) 11:35, 28 May 2024 (UTC)
- File:Flag of Switzerland (Pantone).svg is square. MediaWiki:Minerva.css says:
.flagicon img { min-width: 23px; }
{{flag|Switzerland}}
produces:<span class="flagicon">[[File:Flag of Switzerland (Pantone).svg|23x16px|border |alt=|link=]] </span>[[Switzerland|Switzerland]]
- I reduced the problem to the combination of
flagicon
and an emptylink=
. I only see the mobile issue in the first row below.
- They all display the 16×16px https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Flag_of_Switzerland_%28Pantone%29.svg/16px-Flag_of_Switzerland_%28Pantone%29.svg.png. The mobile stretching just varies. PrimeHunter (talk) 12:16, 28 May 2024 (UTC)
- The minimum width of a flag on mobile is 23px, because without a minimum width, flag icons risk going to 0x0 inside tables and other common elements when on mobile, due to lack of available width. —TheDJ (talk • contribs) 05:45, 29 May 2024 (UTC)
- But can we make it keep the correct width-height ratio in all circumstances? I added a table row only saying 23px instead of 23×16px, but othwerwise identical to the distorted first row. This displays correctly for me as 23×23px in mobile. It apparently takes three things simultaneously to be distorted in mobile: flagicon, wikitext specifying both height and width, and an empty
link=
which omits a link on the image. PrimeHunter (talk) 11:49, 29 May 2024 (UTC)- We could turn it into: No ideal, but will work I think... —TheDJ (talk • contribs) 12:09, 29 May 2024 (UTC)
.flagicon img { min-width: 23px; height: auto !important; }
- It works for me in this section. PrimeHunter (talk) 12:42, 29 May 2024 (UTC)
- We could turn it into:
- But can we make it keep the correct width-height ratio in all circumstances? I added a table row only saying 23px instead of 23×16px, but othwerwise identical to the distorted first row. This displays correctly for me as 23×23px in mobile. It apparently takes three things simultaneously to be distorted in mobile: flagicon, wikitext specifying both height and width, and an empty
- The minimum width of a flag on mobile is 23px, because without a minimum width, flag icons risk going to 0x0 inside tables and other common elements when on mobile, due to lack of available width. —TheDJ (talk • contribs) 05:45, 29 May 2024 (UTC)
Template gadgets
A discussion regarding the new use of "tempalte gadgets" is now open at Wikipedia:Interface_administrators'_noticeboard#Template_gadgets_-_naming_convention, please join in there if interested. — xaosflux Talk 11:53, 28 May 2024 (UTC)
- Initial testing is available for anyone who would like to opt in to the first one of these. See the current bottom of Talk:Conway's Game of Life for info. — xaosflux Talk 20:09, 29 May 2024 (UTC)
- The first one of these has been launched. Please @ping me if there are any reported issues. Follow up on the general concept of template gadgets is welcome at WP:IANB. — xaosflux Talk 15:29, 31 May 2024 (UTC)
Issue with cast template visuals, but only on Chrome
Was editing the page for Ezra (2023) and noticed that on Google Chrome, there is a huge issue with spacing. Wish I could show screenshots to detail what I see. But underneath 'Cast', I see a large, multi-paragraph jump of just blank, white space. It nearly takes up the whole screen. I do not see this on mobile, nor do I see it on Microsoft Edge -- just Google Chrome. Unsure how to fix this as I'm newer to Wiki. Is anyone seeing the same thing as me, and do they potentially know how to fix? Squiddyonwiki (talk) 02:02, 29 May 2024 (UTC)
- Not seeing it on my chrome browser (Version 125.0.6422.76, Windows 11), apologies. CMD (talk) 02:46, 29 May 2024 (UTC)
- I see that
{{cast listing}}
sets the style declarationmin-width: min(25em, 100%)
- is Chrome interpreting that as expected? First off, themin(...)
function is in CSS Values and Units Module Level 4, which is still at the W3C Working Draft stage - not all browser vendors will impement it yet. Second, the spec says
- by my reading of that spec,For all three functions, the argument calculations can resolve to any <number>, <dimension>, or <percentage>, but must have a consistent type or else the function is invalid; the result’s type will be the consistent type.
25em
and100%
are not type-consistent. Chrome may be choking on that. --Redrose64 🌹 (talk) 06:30, 29 May 2024 (UTC)- min() is implemented by most of the browsers worth discussing. I think your observation about types is perhaps interesting. However, you are allowed to mix units in these min/max/clamp functions (see examples earlier in the page), and percentage is in a sense a unit...? I also know that CSS columns have a complex formula for how wide they are laid out and the 100% may be interfering with that. And that Chrome only recently (a couple years ago) made their CSS columns implementation much closer to fully specification compliant. Izno (talk) 15:18, 29 May 2024 (UTC)
- I see that
- That investigation just above aside, there is a possibility this was caused by a change that WMF made because they're thinking about how to make tables display appropriately when the width of the page is too narrow, based on your description of what you saw. The task for that is phab:T366119 and an initial bug report about suboptimal display was phab:T366119, after which there was some adjustment to how it functions - namely restricting this functionality to
wikitable
class tables. (There is still some things being learned there it looks like - though Isarra sorted most of this a while ago in Timeless....) Izno (talk) 15:33, 29 May 2024 (UTC)- That sounds like what I was seeing. What's weird, though, is that I'm on a Macbook now, still Chrome, and it looks normal. But on a Dell the display is what's bugged. Maybe it's based on the size of the laptop's screen? But unsure, because on my Dell on Microsoft Edge it was fine. Either way, I've never had to do a bug report but I will try to figure that out. Squiddyonwiki (talk) 15:38, 29 May 2024 (UTC)
Page previews not working
Since yesterday, page previews of links haven't worked for me. My "Enable page previews" option is turned on. Can anyone help? Thanks! LoganP25 (talk) 20:31, 29 May 2024 (UTC)
- @LoganP25: Do you have an "Edit preview settings" link at the bottom of pages? If so, can you enable it there? PrimeHunter (talk) 20:53, 29 May 2024 (UTC)
- I don't think so LoganP25 (talk) 21:12, 29 May 2024 (UTC)
- @LoganP25: It should be to the right of "Mobile view" if you have it. Do previews work if you log out? Do you have the link there? Do previews work at https://en.wikipedia.org/wiki/Example?safemode=1, logged in or out? Does it work to disable previews at Special:Preferences#mw-prefsection-rendering, save preferences, enable it again and save again? "Navigation popups" should be disabled at Special:Preferences#mw-prefsection-gadgets if you use page previews. Is it? PrimeHunter (talk) 21:28, 29 May 2024 (UTC)
- There's nothing to the right of "Mobile view" for me. Previews work when I'm logged out, but are broken again when I log back in. Previews don't work at the link you sent, and still don't after turning them off and on again. Navigation popups is disabled. Quite the enigma lol. LoganP25 (talk) 22:21, 29 May 2024 (UTC)
- @LoganP25: What is your skin at Special:Preferences#mw-prefsection-rendering? What is your browser? Do previews work logged in at other wikis like simple:Example? You may have to first enable them in preferences there. PrimeHunter (talk) 22:39, 29 May 2024 (UTC)
- My skin is Vector legacy, and I'm browsing on Google Chrome. Previews do work in other wikis, I hadn't thought to check that, but not in the English wikipedia. LoganP25 (talk) 22:47, 29 May 2024 (UTC)
- @LoganP25: What is your skin at Special:Preferences#mw-prefsection-rendering? What is your browser? Do previews work logged in at other wikis like simple:Example? You may have to first enable them in preferences there. PrimeHunter (talk) 22:39, 29 May 2024 (UTC)
- There's nothing to the right of "Mobile view" for me. Previews work when I'm logged out, but are broken again when I log back in. Previews don't work at the link you sent, and still don't after turning them off and on again. Navigation popups is disabled. Quite the enigma lol. LoganP25 (talk) 22:21, 29 May 2024 (UTC)
- @LoganP25: It should be to the right of "Mobile view" if you have it. Do previews work if you log out? Do you have the link there? Do previews work at https://en.wikipedia.org/wiki/Example?safemode=1, logged in or out? Does it work to disable previews at Special:Preferences#mw-prefsection-rendering, save preferences, enable it again and save again? "Navigation popups" should be disabled at Special:Preferences#mw-prefsection-gadgets if you use page previews. Is it? PrimeHunter (talk) 21:28, 29 May 2024 (UTC)
- I don't think so LoganP25 (talk) 21:12, 29 May 2024 (UTC)
- @LoganP25 Hello. I also had the same problem here, but fortunately I made it! So I would like to share my solution to you as well.
- The replies that you made to the questions of @PrimeHunter about having the link of "Edit preview settings" at the bottom of pages, the matter of "whether or not login/logout has an affect on page preview", "Navigation popups" options disabled or not along with all the other factors you mentioned matches exactly with mine. But I solved it in a different way.
- Firstly, go to the "Appearence" in your "Preferences" & check the box of the "Enable page previews" (if its already checked then follow the next steps). Now, go to the "User profile", click on "Set your global preferences". On the "Appearance", there you should enable the (another) page preview option (both of the boxes should be checked). Save it & again return to your (original) "Appearance" in your "Preferences" just to make sure that, two things are there — the "Enable page previews" is not only checked but also grayed out & the "Set a local exception for this global preference" is unchecked.
- Hope it helps. ERA (talk) 13:40, 30 May 2024 (UTC)
- That worked, thank you so much! LoganP25 (talk) 14:03, 30 May 2024 (UTC)
- Glad you finally worked it out. It sounds like a bug if you have to set a global preference to make a local preference work. I haven't heard of that before and didn't expect it. PrimeHunter (talk) 14:15, 30 May 2024 (UTC)
- That worked, thank you so much! LoganP25 (talk) 14:03, 30 May 2024 (UTC)
Production table formatting for correct text alignment
An experienced editor informed me that a table format - used over years with no negative feedback on numerous articles to display crop production data - "crashes" the text aligning to it in the right text margin. The editor says it works fine in Chrome, but doesn't on any browsers tried on a Windows PC.
The original table format parameters are
{| class="wikitable" style="float:right; clear:left; width:14em; text-align:center;"
|-
! colspan=2|Mango* production – 2022
|-
! style="background:#ddf; width:75%;"| Country
! style="background:#ddf; width:25%;"| <small>millions of [[tonne]]s</small>
|-
The editor made a change based on a "wikitable floatright" parameter plus internal table formatting (column alignment left or right) using:
{| class="wikitable floatright" style="width:15em; margin: 20px 20px 0px 20px"
|-
! colspan=2|Mango* production – 2022
|-
! style="background:#ddf;"| Country
! style="background:#ddf;"| <small>millions of [[tonne]]s</small>
|-
This is the history of editing. Please comment on parameters with potential text-table alignment effects:
- style="float:right
- clear:left
- style="background:#ddf; width: and the respective 75% and 25% (removed in the revision)
- the editor's revision: style="width:15em; margin: 20px 20px 0px 20px"
- table display effect on text alignment of different browsers using a Chromebook vs. Windows PC (vs. Apple).
Thanks for looking into this. Zefr (talk) 22:27, 29 May 2024 (UTC)
- @Zefr: The
floatright
class, when used on a table, is equivalent to setting thefloat:right; clear:right; margin: 0 0 0.5em 0.5em;
styles. Notice two things: (i) theclear
is for right not for left; (ii) it doesn't affect text alignment within the cells. You shouldn't need to explicitly set margin values if you are also using thefloatright
class. For an axample offloatright
without other styles, see the "Distribution of locomotives, March 1974" table in British Rail Class 24#Operation. --Redrose64 🌹 (talk) 16:52, 30 May 2024 (UTC)
OpenStreetMaps in Croatian? Is it just me?
The OpenStreetMap maps in the infoboxes at Radio City Music Hall and Carnegie Hall (and probably other locations) seem to be in Serbo-Croatian; at least all of the place names are spelled phonetically according to Serbo-Croatian rules. Is this true for everyone, or is there some weird setting in my Preferences I need to change? If it's true for everyone, can it be fixed? Surely OpenStreetMap has an English-language version of their map of Manhattan. —Mahāgaja · talk 11:28, 30 May 2024 (UTC)
- I see this, too. If I click through to get a large map, it affects all of Manhattan but not the other boroughs, New Jersey, or (as far as I can tell) any other place. rbrwr± 12:41, 30 May 2024 (UTC)
- For me it affects most but not all of Manhattan. Also raised at Talk:Manhattan#Question about the map. CMD (talk) 12:52, 30 May 2024 (UTC)
- phab:T366136 for this issue. related ticket: phab:T195318. – robertsky (talk) 13:03, 30 May 2024 (UTC)
New Gadget for viewing CT images
We at Wiki Project Med have built a gadget to view stacks of images such a as CT scans, which you can see here[6]. We are wanting to install it on EN WP.
Previously mentioned to User:MusikAnimal here who want to verify community consensus first.
We have an earlier version working on Commons[7]. Based on Template:PD-medical we have collected a few thousand complete CT and MRI scans of various conditions. Doc James (talk · contribs · email) 19:13, 29 May 2024 (UTC)
- @Doc James about how many pages would this need to run on? We are currently experimenting with our very first implementation of Template Gadgets (see a couple sections up) right now, which I imagine would be the way we would want to implement this (and most certainly not by hooking a full page text analyzer in to common.js). — xaosflux Talk 18:49, 30 May 2024 (UTC)
- A template gadget version has been copied to mediawiki.org as a demo. See mw:Template:ImageStackPopup Bawolff (talk) 19:00, 30 May 2024 (UTC)
- So User:Xaosflux sounds like it only loads when a specific category is present already. Doc James (talk · contribs · email) 19:21, 30 May 2024 (UTC)
- @Doc James yes, where said category would come along with a template that would wrap whatever is being used. It sounds like all instances of this would use some template so that part isn't hard. What order of magnitude of pages would you expect this would get used on? — xaosflux Talk 19:23, 30 May 2024 (UTC)
- User:Xaosflux few thousand at most, Doc James (talk · contribs · email) 19:44, 30 May 2024 (UTC)
- @Doc James yes, where said category would come along with a template that would wrap whatever is being used. It sounds like all instances of this would use some template so that part isn't hard. What order of magnitude of pages would you expect this would get used on? — xaosflux Talk 19:23, 30 May 2024 (UTC)
- Thanks for the note. — xaosflux Talk 19:24, 30 May 2024 (UTC)
- The mediawiki version is quite a bit better.
- For a default gadget, i'd have some concerns about the accessibility of the play button. It's not a button, and it's also not labeled.
- Similar for the pager and slider in the window. This is unlabeled. It should have accessibility labels to make it possible to understand what the slider does.
- The play button positioning and sizing might need a little bit more work, it seems kinda off (esp on iphone)
- Might want to hide the play button on media print
- Good to see that media credits are being linked.
- Seems to work on mobile, but could use some additional spacing at the top controls, they are really difficult to hit because everything is so close together now.
- Closing the dialog. All MW dialogs currently have close at the top (an old pattern i note due to mobile usage favoring thumb interaction at the bottom of a dialog). This does create an inconsistency, but i'm not particular concerned.
- The whole ImageStackPopup-viewer is inside a label element atm. I think that's an accident?
- —TheDJ (talk • contribs) 20:27, 30 May 2024 (UTC)
- User:TheDJ We have added labels. Let me know if what was done is sufficient? Doc James (talk · contribs · email) 13:06, 1 June 2024 (UTC)
- Perhaps we can use gitlab instead of mediawikiwiki for development? It can probably serve as the version which wikis copy from. I created a blank project at gitlab:repos/gadgets/ImageStackPopup, and can extend SDZeroBot 13 to support tracking updates from gitlab. – SD0001 (talk) 09:14, 31 May 2024 (UTC)
- There's been some accessibility improvements in the latest version. Button is also now hidden on print. The label thing and the close button at the bottom seem to be due to using
OO.ui.alert
. I'm not sure why OOUI does it that way for alert boxes. Bawolff (talk) 13:18, 31 May 2024 (UTC)- Synced local fork from upstream. — xaosflux Talk 13:57, 31 May 2024 (UTC)
- So User:Xaosflux sounds like it only loads when a specific category is present already. Doc James (talk · contribs · email) 19:21, 30 May 2024 (UTC)
- A template gadget version has been copied to mediawiki.org as a demo. See mw:Template:ImageStackPopup Bawolff (talk) 19:00, 30 May 2024 (UTC)
- @Doc James, As one of our professors often says, "One view is no view in Radiology." From a content perspective, I am confident that these imaging stacks will enhance the quality of our radiology related articles. Looking forward to seeing this implemented soon. signed, 511KeV (talk) 19:03, 30 May 2024 (UTC)
- Moral support for the idea, bug-report for the implementation: the stack is scrolled by a left–right slider, but when hovering over the image the stack scrolls when I move the mouse up-and-down and not side-to-side. DMacks (talk) 19:49, 30 May 2024 (UTC)
- Given the bird's-eye view with the line indicating the location of the specific scan is an up-and-down position, having the slider be side-to-side is confusing. Everything needs to be in sync. DMacks (talk) 00:09, 31 May 2024 (UTC)
- I've forked ImageStackPopup over for anyone that wants to test it out in sandboxes etc, you can either manually opt-in to it in the "testing and development" gadget section, or you can load it to a page with the
?withgadget
query parameter. From discussion above, this seems like it will need some extensive testing and tweaking. Nothing should currently be placed in to an article that is dependent on this right now, as readers will not be able to make use of it yet. — xaosflux Talk 23:55, 30 May 2024 (UTC)- The Vivarium template gadget being currently tested is much simpler, and we will make sure our roll out of template gadgets is done carefully. Additional discussion around if these should be able to be opted out of should also occur (i.e. not making them default+hidden). For a default here, we'll likely also use a fork, we have a bot to monitor remote changes and flag for promotion that can be used. — xaosflux Talk 23:58, 30 May 2024 (UTC)
The test version on Commons loads 250 images. Given how heavy these images are, this seems like a bad use case for a gadget and should potentially be in some sort of video instead, which won't try to download that many images all at the same time. Izno (talk) 00:24, 31 May 2024 (UTC)
- That does seem like a lot if its all hitting the browser right away. Something that heavy sounds like it would be better to paginate and be done in mediaviewer perhaps. — xaosflux Talk 00:28, 31 May 2024 (UTC)
- To clarify, the images get downloaded only after the user hits the play button, so only users who want to see them do the download. Perhaps that could be improved with a progress loading bar or something or the ability to cancel. The goal is to allow users to directly compare all the images all at once, so i'm not sure pagnation would work here. I agree that as a long term solution, transfering as a video with p-frames/temporal compression would probably be much more bandwidth efficient. Bawolff (talk) 05:43, 31 May 2024 (UTC)
- Also, just to be clear, this gadget does not exist on commons. There is a separate gadget on commons called ImageStack, which is the inspiration for this gadget, but its a totally different gadget. Bawolff (talk) 09:46, 31 May 2024 (UTC)
Perfect. Got it working here on EN WP User:Doc_James#CT_scan_viewer. Agree a bit of fine tuning is still required.
I like the idea of a progress loading bar. As User:DMacks suggests lets move the scroll bar to the right of the image. We will need a naming convention for these pages User:Doc James/Appendicitis CT Doc James (talk · contribs · email) 15:43, 31 May 2024 (UTC)
- this link can be used to manually enable to gadget once for others that want to see this without doing the opt-in. — xaosflux Talk 18:13, 31 May 2024 (UTC)
Next steps
We have implemented a bunch of the suggestions made above, see this link. Any further comments or can we have this go live and start using these in main space? Doc James (talk · contribs · email) 18:38, 1 June 2024 (UTC)
- Ping User:TheDJ and User:DMacks Doc James (talk · contribs · email) 18:39, 1 June 2024 (UTC)
- Looking very nice, but I still think it needs a bit more work for mobile. I'd still say that my fingers are not 3mm x 3mm. Additionally the right positioning of the controls now gets into the scroll zone, which is possibly even worse. I can trigger the rubber banding of the scroll area, and if I zoom in, we overlap with the scrollbar of the viewport. If you switch to desktop skin on mobile, you have the same, but zoomed out 6 times so you really do need that zooming and scrollbar. —TheDJ (talk • contribs) 22:33, 1 June 2024 (UTC)
- How about we use swipe right / left on mobile to move through images? Doc James (talk · contribs · email) 05:22, 2 June 2024 (UTC)
- My concerns about consistency in direction of scrolling are resolved. For the record, I'm using a desktop machine. DMacks (talk) 05:32, 2 June 2024 (UTC)
Replag
Another lengthy replag (~3 hours) on a Thursday night. Is there any place to go to find out when the estimated fix-it time will occur? Or is it just wait and see? Liz Read! Talk! 02:40, 31 May 2024 (UTC)
- Mostly just wait and see. My guess is the cause is phab:T364299. * Pppery * it has begun... 03:01, 31 May 2024 (UTC)
- Seems to have fixed itself. The highest I've seen it go was around 11 or 12 hours, so this one was not nearly as bad as it's been in the past. --rchard2scout (talk) 13:44, 31 May 2024 (UTC)
Phantom redirects
I'm running into the recurrence of a problem I've brought here a few times before, where an incategory search of Category:Living people for drafts or user sandbox pages that shouldn't be in it offers up several pages that aren't actually pages in the category but cross-namespace redirects to real articles, which resulted from an editor adding categories to the page while it was still in draft or user space, and then moving the page into mainspace shortly afterward. That's a relatively common occurrence which doesn't usually cause any serious problems, but every once in a while it causes situations like this, where for some reason the redirect lingers in the categories despite not actually having any categories on it.
In the past I've usually resolved this by redoing the move: I would move the page back overtop the redirect, wrap the categories in the {{draft categories}} wrapper to disable them, and then move the page back into articlespace again, which usually worked to get the redirect out of the category — but of the four such redirects currently showing up in the search, I've already done that on two of them, meaning even that trick isn't working anymore.
Additionally, I need to note that there are four phantom redirects currently showing up in the search, yet the results counter at the top of the page is claiming that there are eight pages, meaning that there are four more phantoms I can't even find.
Because Category:Living people is a megacategory with millions of pages in it, it's not a category I can search manually for draft or user pages — it has to be done as an incategory search, which means I can't just work around permanent speed bumps and need the tool to be clean. It might also be related to the replag problem that's been discussed above, because even the normal categorized drafts or userpages that I pull out of the category the normal way are taking longer than usual to clear from the search as well — but could somebody look into whether there's any way to fix it? Thanks. Bearcat (talk) 17:20, 31 May 2024 (UTC)
- Replag is currently around five seconds, so that's not it. It wouldn't affect searches on the live site anyway.If I query the database for members of Category:Living people that are in namespaces user, draft, or their corresponding talk, I get no results. All four of the current false positives in search (Draft:Amre Hamcho, User:Miminity/Yoshinobu Yamakawa, User:Minmarion/sandbox/voice, User:WikiOriginal-9/David Hinds (gridiron football)) were moved within the last 24 hours. And neither a null edit nor an actual edit (both to User:Miminity/Yoshinobu Yamakawa) helped. Taken together, these lead me to guess - with absolutely no knowledge whatsoever of how the search backend works, mind you - that it's only the search indices that are out of date.I suppose it's worth checking back in a day or so, without your move/edit/move workaround, to see if they clear up themselves. Failing that, I can build a database report for you, which might be more convenient than the search. (That is, unless you're worried about search results, too, not just what appears on the category page.) Any other categories to check besides Category:Living people? —Cryptic 18:39, 31 May 2024 (UTC)
- @Bearcat: Have you tried this?
- Navigate to the redirect that is incorrectly listed at Category:Living people
- Edit the redir page to add
[[Category:Living people]]
and save it - Edit the redir page to remove
[[Category:Living people]]
and save it
- Does this work to delist the redirect from Category:Living people? --Redrose64 🌹 (talk) 21:15, 31 May 2024 (UTC)
- It doesn't Bearcat (talk) 00:32, 1 June 2024 (UTC)
- @Bearcat: Have you tried this?
Font size bug - mobile
Hello, I have question. For quite some time now, The font size is not correctly shown when I want to see it on visual editing (i mostly work with filmografies of actors) - basically, I want to change font size from 100 to 80, and its not working at all. It stays same. The whole filmography also gets bigger sometimes for some reason when I want to edit it only by visual editing. I remember there was a discussion about this long time ago but I dont know if there was any improvement. I work on mobile, so I dont know whether pc users have this problem as well. If there is any sollution or way how to make it work, feel free to comment your suggestions. Thx in advance. Kesseder (talk) 17:55, 31 May 2024 (UTC)
This search has timed out. You may wish to try different search parameters.
I'm getting this error pretty frequently lately when opening my watchlist. Maybe a third of the time over the past several days. Anyone know what this is? — Rhododendrites talk \\ 01:32, 1 June 2024 (UTC)
- Reset your filters, so the page has to do fewer calculations ? Your watchlist is probably really large, I assume. —TheDJ (talk • contribs) 10:22, 1 June 2024 (UTC)
- @Rhododendrites: It could be several different things, or more likely, a combination of these.
- A large number of pages are listed at Special:EditWatchlist/raw
- A significant proportion of pages listed at Special:EditWatchlist/raw have been edited recently
- Some of the pages listed at Special:EditWatchlist/raw have recieved large numbers of edits recently
- Things to try:
- Go through Special:EditWatchlist/raw and remove pages that you're no longer interested in
- If you are watching a high-traffic page (like WP:ANI), unwatch it
- At Watchlist options, try
- reducing the period of time to display
- applying some of the "Hide" options
- selecting one namespace (possibly with its Associated namespace enabled) rather than all
- HTH. --Redrose64 🌹 (talk) 10:41, 1 June 2024 (UTC)
- Thanks. I do have a very large watchlist (17k pages), but this issue started happening all of a sudden a few days ago and the list has barely changed in recent weeks. I don't think I've ever once seen the error before then. It's also inconsistent. If I just refresh a few times, it'll display. — Rhododendrites talk \\ 13:44, 1 June 2024 (UTC)
- But the software and servers change all the time. If you are up to those numbers, even half percent of change in performance on that side can easily push you over an edge. —TheDJ (talk • contribs) 14:07, 1 June 2024 (UTC)
- @Rhododendrites You can try User:Ahecht/Scripts/watchlistcleaner to clean out unneeded or stale pages from your watchlist, but with 17k pages you may have to let it run overnight. I've only tested it on about half that many pages. --Ahecht (TALK
PAGE) 01:53, 3 June 2024 (UTC)
- Thanks. I do have a very large watchlist (17k pages), but this issue started happening all of a sudden a few days ago and the list has barely changed in recent weeks. I don't think I've ever once seen the error before then. It's also inconsistent. If I just refresh a few times, it'll display. — Rhododendrites talk \\ 13:44, 1 June 2024 (UTC)
Desktop and mobile view on same page
![](http://upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Desktop_and_mobile_views_on_desktop_aymatth2.png/220px-Desktop_and_mobile_views_on_desktop_aymatth2.png)
I just got a new Windows 11 laptop. When I start using Wikipedia, it shrinks the display area (but not the very top menu bar} to about 2/3 of the available width, then below the normal desktop view it shows a sort-of mobile view of the same page. See screenshot to the right. Wikipedia still looks fine on the old laptop. Is this a bug or some obscure configuration problem? Aymatth2 (talk) 13:46, 1 June 2024 (UTC)
- You installed this (old) script which does this: User:קיפודנחש/mobile-sidebarcopy.js. —TheDJ (talk • contribs) 14:10, 1 June 2024 (UTC)
- Thanks. I thought it was something dumb like that. Taking out the old script fixes the problem. Both laptops are fairly up to date Windows 11, but there must be some difference in their configuration. Aymatth2 (talk) 15:03, 1 June 2024 (UTC)
Broken parsing/HTML generation near math tags
Look at the vertical spacing here. The source code has a single blank line to separate the paragraphs, as usual, but the result is terrible. Moreover, examining the HTML DOM in both Firefox and Chrome reveals that the end on the first paragraph ("In fact...") is actually outside any paragraph tags, but there's an empty <p></p>
between "...Killing form)." and "This cross-product..." (which apparently creates that huge gap). A similar situation can be seen in the next section as well (before "Alternatively, one may...").
I've noticed that vertical spacing around <math>
some time ago became noticeable broken in some cases (seemingly regardless of <math display="block">
or : <math>
and blank lines before/after). Initially I was expecting that somebody else will notice that quickly and repair, then I forgot and was lazy to investigate, but this outstandingly wrong occurrence made me think that it must be at least reported... — Mikhail Ryazanov (talk) 09:41, 2 June 2024 (UTC)
- I suggest making screenshots, because I’m not sure what you mean with ‘terrible’ —TheDJ (talk • contribs) 11:52, 2 June 2024 (UTC)
- I've made screenshots at archive.is (to be sure that it's not my local problem):
- using the current default Vector (2022) skin,
- using the previous default Vector legacy skin.
- Now it seems to me that even though the "legacy" skin didn't have so obvious problems, they were still present, but partially hidden because paragraphs didn't have bottom padding added (for what reason?) in the new skin. Please also take a look at some tests with comments that I've made in my sandbox:
- with Vector (2022),
- with Vector legacy.
- Examining the DOM again reveals that the generated HTML is not correct (or recent versions of both Firefox and Chrome can't parse it properly, which is unlikely). — Mikhail Ryazanov (talk) 01:11, 3 June 2024 (UTC)
- Thanks for the screenshot. So "the result is terrible" means a few mm extra whitespace. Your link [8] uses
<math display="block">
. We add whitespace to that with code in MediaWiki:Common.css: /* Make <math display="block"> be left aligned with one space indent for * compatibility with style conventions */ .mwe-math-fallback-image-display, .mwe-math-mathml-display { margin-left: 1.6em !important; margin-top: 0.6em; margin-bottom: 0.6em; }
- Compare to a safemode link where local CSS like MediaWiki:Common.css is ignored. PrimeHunter (talk) 02:23, 3 June 2024 (UTC)
- Paragraph spacing is the subject of much recent discussion in phab:T362939 after the WMF changed paragraphs to use padding rather than margin. I would guess this is the issue you have identified. They intend to fix their previous decision making. (Apparently a math-specific one is phab:T361273 but that probably should be closed duplicate.)
- As for a bad DOM, that's probably phab:T182041. Izno (talk) 02:28, 3 June 2024 (UTC)
- Thanks for the screenshot. So "the result is terrible" means a few mm extra whitespace. Your link [8] uses
- I've made screenshots at archive.is (to be sure that it's not my local problem):
Detecting transclusion through a redirect
In Wikipedia:Templates for discussion/Log/2024 May 22#Template:Edit semi-protected a reason some editors, including myself, are opposed to merging is that the merged template will no longer be able to work properly if used on an unprotected page (which can happen in the case of an unprotected WP:ARBECR page, for example). SilverLocust put it like this: If these were all redirected to one template, then there would be a loss of functionality unless someone knows how to tell a module not merely which wrapper is invoking a module (since there would only be one merged wrapper), but rather which redirect is being used to transclude the wrapper that invokes the module (and I don't think that is possible).
So, is that right? Or is there a way to detect which redirect is used and merge the templates without any loss of functionality? Nickps (talk) 14:07, 2 June 2024 (UTC)
- @Nickps The module could use
getContent()
to get the text of the current page and then search it for one of the redirect templates. --Ahecht (TALK
PAGE) 02:30, 3 June 2024 (UTC)- I would oppose that as confusing and probably inefficient. Editors expect it to make no difference whether a redirect is used. If we really want a certain "redirect" to behave differently then don't make it a redirect but a wrapper which passes a certain parameter. PrimeHunter (talk) 02:47, 3 June 2024 (UTC)