MediaWiki talk:Gadget-Page descriptions.js

Erratic display
, Assuming that it is this gadget producing the display of short descriptions I see just under the article title, it appears to display only some of the time. Refreshing the page seems to toggle it on and off, with an apparently random effect with probability a bit les than 0.5 of displaying (sometimes it comes up immediately, sometimes it takes 1, 2, 3 or more refreshes.) I am using Vector in Chrome and Firefox on Windows 10. No obvious differences between browsers.

Other than this problem, the gadget is excellent for the purpose. It would be nice if I could get it to stand out a bit more prominently though. My choice would be a background of light yellow. Is there some css that will do this? Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 06:35, 11 April 2018 (UTC)
 * I've only seen this problem with the Page metadata gadget activated at the same time. In that case, both scripts try to claim the same area, and one of them wins (randomly). Alternatively, it might just be a script loading problem. I remember you have been having problems with loading scripts before and I couldn't figure out back then what caused it. Maybe that same problem also interferes with this script ? —Th e DJ (talk • contribs) 07:52, 11 April 2018 (UTC)
 * I have the page metadata enabled, and when the short description shows, it inserts just before the metadata, which always shows, which would be ideal if it was consistent, as it is logically also metatdata. I like this grouping. Ideally it would be stable and I could put the short description on a background colour. The red text for no short description is good. Orange for Wikidata is probably also good, but oddly enough I have not seen it yet.
 * I had a script conflict of some kind when I had User:The Transhumanist/ViewAnnotationToggler.js loaded, but since I deleted it that problem seems to have gone away. It is possible that there is some other script that conflicts, but the metadata does seem a likely cause. I wouldn't like to lose it though. I will try to work out where I enabled it and test what happens if it is disabled.
 * While looking for this I found I have both User:Pbsouthwood/Common.js and User:Pbsouthwood/common.js. Could this cause any problems? should I consolidate and if so, which name is better? Cheers, &middot; &middot; &middot; Peter (Southwood) (talk): 08:54, 11 April 2018 (UTC)
 * There seems to be a conflict with the assessment gadget. Metadata gadget still enabled and short description displays without apparent problems.
 * The conflict seems to be a matter of the order in which the gadgets execute. Whichever executes last overwrites the one that finished first - you can see the flicker as the one writes and is then overwritten. &middot; &middot; &middot; Peter (Southwood) (talk): 09:00, 12 April 2018 (UTC)

Compatibility with page assessments
My testing shows that this gadget is in fact compatible with the Page Assessment gadget. —  python coder    (talk &#124; contribs) 18:56, 8 May 2018 (UTC)

Punctuation syntax?
On the English Wikipedia, following instructions on en:Wikipedia:Short description, this script can be enabled with a gadget setting (I assume that instruction is pointing to the right script). After enabling, I see text like the following: "1st President of the United States, F rom Wikipedia, the free encyclopedia". I can't see how the whole text is constructed in the js, but can we either have a period or a lowercase f? David Brooks (talk) 16:27, 30 October 2018 (UTC)


 * Followup, and another example: Proboscis monkey (which I just happened to have open) has this at the top: species of mammal ( Wikidata ), From Wikipedia, the free encyclopedia (the word Wikidata is linked to an editing tool). Looking more closely at this js, it seems to be simple due to the line  and the line lower down with more concatenation. If that can be replaced by a period, I don't think there would be any other side-effects. I'll submit an edit request. David Brooks (talk) 18:40, 8 November 2018 (UTC)

Interface-protected edit request on 8 November 2018
See the "Punctuation syntax?" section immediately above: the information line generated by this script contains a comma followed by a capital letter F, which looks ugly. I suggest the following changes: in line 37  and line 44   replace the comma with a period. My only hesitation would be that I don't know if this script is used anywhere other than as a visual tag on articles, so I don't know if there would be deleterious side-effects. I hope someone with a better understanding in this area can be sure. David Brooks (talk) 18:47, 8 November 2018 (UTC)
 * ✅ Writ Keeper &#9863;&#9812; 23:53, 9 November 2018 (UTC)

Interface-protected edit request on 9 January 2019
For MediaWiki:Gadget-Page descriptions.js: Please change line 50 from:

to

For MediaWiki:Gadget-PageDescriptions: Please change the content from:
 * Show page description beneath the page title (not compatible with Page assessments gadget)

to
 * Show page description beneath the page title


 * Explanation:
 * This would move short descriptions from the same line as from Wikipedia, the free encyclopedia to a line below it
 * This would make the gadget compatible with page assessments. It was inspired by User:Galobtter/Shortdesc helper.js, which, unlike this gadget currently, is compatible with page assessments
 * To test this without affecting site-wide javascript, you can import User:DannyS712 test/shortdesc.js. If you look in the history, the only thing I did was copy the current gadget, and then make the change I requested for the gadget
 * To test this with page assessments, I have included some examples below
 * If you agree that this new version no longer conflicts with Page assessments, the second edit (the edit to the description) would remove that disclaimer


 * FA - 7 World Trade Center
 * A - Battle of Nam River
 * GA - Bomber Mafia
 * B - Mosaic (web browser)
 * C - The Hague
 * Start - An Evening with Adele
 * Stub - All India Institute of Medical Sciences, Mangalagiri
 * FL - List of Hot Country Singles & Tracks number ones of 2003
 * List - List of ATP number 1 ranked doubles tennis players
 * Dab - Ginebra
 * Current - 2018–19 South Pacific cyclone season
 * Future - Bundelkhand Expressway

Thanks, --DannyS712 (talk) 02:38, 9 January 2019 (UTC)
 * Styling aside, what is the incompatibility? Enabling both seems to work fine for me in both vector and modern, issues with coords aside. ~  Amory  (u • t • c) 16:20, 9 January 2019 (UTC)
 * If you have both page assessments and the current short description gadget, they show up on the same line (like "West African intergovernmental organization (Wikidata). A stub-class article from Wikipedia, the free encyclopedia" for Conseil de l'Entente). I assumed that, when the gadget says that it is "not compatible with Page assessments gadget", it was refering to them showing up on the same line, and/or the page description not showing up immediately. --DannyS712 (talk) 17:56, 9 January 2019 (UTC)
 * Huh, I always thought that was intentional? I use Modern, so that seems to make the most sense to me there. ~  Amory  (u • t • c) 15:49, 11 January 2019 (UTC)
 * My memory is a bit hazy, but IIRC not compatible was put as it was not working at all with page assessments, i.e the page assessments gadget overwrote the short description or something like that (depending on the order of execution). Galobtter (pingó mió) 09:00, 28 January 2019 (UTC)
 * Courtesy ping to ; IIRC some people prefer it in be siteSub rather than contentSub? I think there needs to be a little discussion of this before the change is made. Galobtter (pingó mió) 07:38, 11 January 2019 (UTC)
 * TheDJ's last edit was almost 3 weeks ago, and all it said was that they had no time to wiki (edit). Also, if it makes sense in modern, could it be changed just for vector users? --DannyS712 (talk) 08:09, 28 January 2019 (UTC)
 * The original reason I forked this gadget was compatibility with page assessments (the editing functionality came a tad later), and I remember suggesting people back in April/May 2018 to use Shortdesc helper for compatibility with pageassesments (or something like that) and I believe some people preferred that the description be in #siteSub, thus my asking for discussion. Galobtter (pingó mió) 09:00, 28 January 2019 (UTC)
 * please continue the discussion, when (if) a consensus for the change is reached feel free to reactivate the edit request tag above. — xaosflux  Talk 02:08, 30 January 2019 (UTC)

The reason I chose sitesub is because it is always present. As such, it doesn't increase 'jumping' of the page which tends to be very annoying and should be avoided whenever possible. But only one tool can modify an existing piece of HTML. Or you need to modify both tools, so they are aware of each other and can deal with each others changes (because there is no order, so both need to be able to be the first and the second in the execution). Personally I don't think this minor issue is worth my very limited amount of time right now. But do what you want. —Th e DJ (talk • contribs) 16:06, 2 February 2019 (UTC)