Jump to content

Wikipedia talk:Shortdesc helper

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

WikiProject iconShort descriptions
WikiProject iconThis page is within the scope of WikiProject Short descriptions, a collaborative effort to improve the coverage of short descriptions in articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.

Gadget is breaking message box display on deleted pages

[edit]

I filed a ticket. Please review at your convenience. Thank you. –Novem Linguae (talk) 03:00, 14 July 2023 (UTC)[reply]

Bump. This bug is still happening for me. –Novem Linguae (talk) 23:31, 11 April 2024 (UTC)[reply]
Noting that I just came here to report this issue as well. ‍—‍a smart kitten[meow] 11:12, 5 May 2024 (UTC)[reply]

Shortdesc helper allowing insertion of invalid invisible space characters

[edit]

In this 2020 edit, the Shortdesc helper allowed the insertion of an invalid invisible non-breaking space character. I fixed it with this edit, replacing the character with a normal space.

If this bug is still present, it would be helpful for the gadget to replace invalid white-space characters with spaces when a short description is saved. Wikipedia:Database reports/Short descriptions containing invalid space characters is tracking these invalid characters in short descriptions. The report's population does not appear to be increasing, so maybe this problem has been fixed already. I'll look for a recent instance. – Jonesey95 (talk) 18:54, 13 January 2024 (UTC)[reply]

Here's an edit from 6 January 2024 showing that this problem is still present. A couple of thinsp characters were apparently copy/pasted from the article into the SD helper text field. Let's scrub those and replace them with spaces. – Jonesey95 (talk) 19:01, 13 January 2024 (UTC)[reply]
I submitted this to github as an issue, along with a suggested fix. I am not a programmer, so submitting a pull request with modified code is probably beyond my skills. Maybe Novem Linguae would be able to make this addition? – Jonesey95 (talk) 20:22, 28 February 2024 (UTC)[reply]
should be easy to fix i'll try to do this soon Galobtter (talk) 07:10, 2 March 2024 (UTC)[reply]
Thanks. The report was completely cleared out a few days ago, and the problem appears to still be present. No rush, since it is pretty rare and easy to fix, but a code fix would be great. – Jonesey95 (talk) 16:43, 11 April 2024 (UTC)[reply]
According to this diff, the problematic characters are ascii 160 (non-breaking space). These should be converted to ascii 32 (normal space). –Novem Linguae (talk) 23:04, 11 April 2024 (UTC)[reply]
Patch submitted for approval.Novem Linguae (talk) 23:25, 11 April 2024 (UTC)[reply]

Jump after page load

[edit]

With this gadget enabled, whenever I load a page, its content jumps downward a few seconds later. This is because the shortdesc is inserted into the page when the shortdesc itself has loaded, which requires making space for it. This is extremely annoying. Is anyone else having this issue? Does it seem like it would be easy to fix? jlwoodwa (talk) 02:31, 21 March 2024 (UTC)[reply]

This happens with all javascript elements, in my experience. I have a bunch of gadgets and scripts installed, and page elements jump around like baby kangaroos while the page is loading. – Jonesey95 (talk) 03:47, 21 March 2024 (UTC)[reply]
This is fixable with thr "hidden css peer gadget" technique if someone wants to code it up. See MediaWiki:Gadget-Twinkle-pagestyles.css for an example. –Novem Linguae (talk) 08:43, 21 March 2024 (UTC)[reply]
Hmm, this gadget already uses the "hidden css peer gadget" technique mentioned above. It's possible the hidden css peer gadget is broken and needs fixing, or that you just have other gadgets and user scripts pushing things around in the same area. Is anyone else (who has very little installed except Shortdesc-helper) having this issue? –Novem Linguae (talk) 23:29, 11 April 2024 (UTC)[reply]
That doesn't seem to be available on Monobook. jlwoodwa (talk) 03:08, 12 April 2024 (UTC)[reply]

Comma in comment

[edit]

I couldn't find anything on the topic, so I figured I'd ask: Is there a reason for the comma in the comment? Currently shortdesc helper creates a comment like this (sorry for the german language example, but you should get the idea):

‎Beschreibung für [de] hinzugefügt: Gebäude in St. Gallen, (Shortdesc helper)

With a comma right after the new description. Which to me seems more confusing (Did I accidently place a comma?) then helpfull. And - at least in German, I assume English is the same - in front of brackets it's even wrong. Is there a case I miss when they are needed? Windharp (talk) 08:45, 26 March 2024 (UTC)[reply]

A diff would be helpful for debugging. –Novem Linguae (talk) 14:39, 26 March 2024 (UTC)[reply]
Sorry, here you are. Windharp (talk) 15:23, 26 March 2024 (UTC)[reply]
Good info there. So this is just the edit summary, not the wikicode. And it is probably Wikidata only. –Novem Linguae (talk) 16:51, 26 March 2024 (UTC)[reply]

Extremely specific issue on auto-generated "none"s

[edit]

I opened an issue on github, but I am assuming that the github is not very active since there haven't been any new changes in six months, so here's a very minor technical issue that stumped me for a while. In policy w/ WP:SDNONE, many articles do not qualify to have proper short descriptions. However, adding { {short description|none} } to a template does not register on the editor, making it seem as if it has no short description instead of a "none" short description. Article that looks like it has no short description, [1] except it has an infobox that does, [2] and search results show it has a short description. [3] -1ctinus📝🗨 00:41, 8 April 2024 (UTC)[reply]

To be clear, it appears that everything is working properly from a Wikipedia standpoint, but the SD gadget is showing the Wikidata description instead of showing the correct "This page intentionally has no description." Is that the bug? – Jonesey95 (talk) 15:58, 8 April 2024 (UTC)[reply]
exactly. -1ctinus📝🗨 16:46, 8 April 2024 (UTC)[reply]
this was discussed before at Wikipedia_talk:Shortdesc_helper/Archive_1#Auto_short_descriptions_with_a_value_of_"none". Changing what the short description template outputs might be needed. Galobtter (talk) 16:55, 8 April 2024 (UTC)[reply]
Thanks. I'll keep the GitHub issue open, though.
However, it appears that the gadget has also changed since 2022. From the talk page giving a reason why it doesn't do that,

It would help if the SD helper could detect that the page would have the SD set (to none or otherwise) by a template, but that would involve an additional API call to check the evaluated output of the page as well as a check of the page source

...doesn't the gadget already do that already? -1ctinus📝🗨 17:16, 8 April 2024 (UTC)[reply]

Feature request: option to append birth/death year

[edit]

Eg. (born 1975) or (1975–2023) which is missing from a lot of biographical articles. Would make life easier. Samuel Wiki (talk) 15:33, 30 July 2024 (UTC)[reply]

Why not just type it? MichaelMaggs (talk) 15:55, 30 July 2024 (UTC)[reply]
Keyboards don't have en dashes, and there is no bot that fixes en dashes in short descriptions.
PS. if somebody wants to create a bot that changes hyphens to en dashes in short descriptions, here's a quick regex pattern I cooked up in a few minutes:
{{[Ss]hort description\|[^\(]*\([0-9]{4}-[0-9]{4}\)}}
-1ctinus📝🗨 16:07, 30 July 2024 (UTC)[reply]
Why type it when you could just click a button? Samuel Wiki (talk) 16:26, 30 July 2024 (UTC)[reply]
Here's a tip: it may be more helpful to open a GitHub issue request than talking about it here in order to get the devs attention. -1ctinus📝🗨 16:27, 30 July 2024 (UTC)[reply]
On Mac OS, type option-hyphen to get an en dash. Pretty easy. I expect that there is a similar shortcut for other operating systems. – Jonesey95 (talk) 16:34, 30 July 2024 (UTC)[reply]
Windows sucks, so there is no quick short cut to write an en dash that's easy to remember :) -1ctinus📝🗨 16:38, 30 July 2024 (UTC)[reply]
You said it, not me. – Jonesey95 (talk) 18:03, 30 July 2024 (UTC)[reply]
@1ctinus: Yes there is: – emits – and see also Wikipedia:How to make dashes. --Redrose64 🌹 (talk) 05:37, 31 July 2024 (UTC)[reply]
I remembered that I actually did make a script to do exactly what you are describing: I don't remember it actually working that well, though. It is only tested for the timeless.js skin:
document.body.addEventListener("keyup", (e) => {
  if (e.key === "ScrollLock") {
let born = "";
let died = "";
let ret = "(–)";
try { 
born = Array.from(document.querySelectorAll('tr'))
      .find(el => el.innerText.includes("Born")).innerHTML.match(/[0-9][0-9][0-9][0-9]/)[0]} finally {}
try {
died = Array.from(document.querySelectorAll('tr'))
      .find(el => el.innerText.includes("Died")).innerHTML.match(/[0-9][0-9][0-9][0-9]/)[0]} finally {}
if(born !== "" && died !== ""){
    ret = "(" + born + "–" + died + ")";
} else if(born !== ""){
    ret = "(born "+ born +")";
} else if(died !== ""){
    ret = "(died " + died + ")";
}
    document.getElementById("sdh-descriptionbox").firstChild.value += ret;
  }
});
-1ctinus📝🗨 16:37, 30 July 2024 (UTC)[reply]
Samuel Wiki, could you explain exactly what you're suggesting? If you want a button that automatically extracts dates from the article, that would be hopelessly unreliable given the variability in the way dates appear in the text and/or infoboxes. It would definitely have to exclude living people per WP:SDDATES to avoid copying into the SD an unsourced birth date (surprisingly common). And it would encourage unthinking additions of dates for all articles, regardless of WP:SDDATES and WP:SDSHORT. Writing a SD requires an editor to think, just like the addition of any other content. I'd be against it. If you're concerned about layout, the SD Helper already corrects dashes automatically. I've just changed the SD on Pierre Desvignes by adding "(1764-1827)", which the helper automatically changed to "(1764–1827)". MichaelMaggs (talk) 17:11, 30 July 2024 (UTC)[reply]
Yes, a button that pulls in the years from categories, Wikidata or the body (up to the dev). It could preview the change in the text box. Just like how it is now, it is up to editors to ensure the info is sourced. I'm not asking for this to be done in bulk by a bot, just a button to make it faster for editors to do what they already do. Samuel Wiki (talk) 17:57, 30 July 2024 (UTC)[reply]