Jump to content

MediaWiki talk:Gadget-defaultsummaries.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Three screenshots of the gadget in action.

Edits to code

[edit]

I've reformatted and edited parts of the code. Please change the current code to the code found at User:MC10/defaultsummaries.js:

Cheers, mc10 (t/c) 04:48, 5 October 2011 (UTC)[reply]

Could you please explain the changes you have made and confirm whether you have fully tested the code. Thanks — Martin (MSGJ · talk) 14:03, 6 October 2011 (UTC)[reply]
I've tested the code in IE 7+ and Firefox 7.0.1. All that it does is switch addOnloadHook with the jQuery $, which does the same thing without using deprecated code, and used some more commonly-used code ("" instead of new String(), functionname instead of new Function("functionname()"), etc.). Note that I've changed the code to link to my local copy, which I am testing with. mc10 (t/c) 19:31, 6 October 2011 (UTC)[reply]
Okay, I've deployed. — Martin (MSGJ · talk) 11:59, 7 October 2011 (UTC)[reply]
One minor change; I've let the "Common edit summaries" message be default, so users are more aware of what the two dropdown boxes are (if they accidentally turn on the gadget). Again, tested in the previously mentioned browsers, as well as Google Chrome 14. mc10 (t/c) 21:12, 7 October 2011 (UTC)[reply]
You seem to have made a few changes since making this request. Can you confirm that the latest version of User:MC10/defaultsummaries.js is good to go? — Martin (MSGJ · talk) 16:22, 10 October 2011 (UTC)[reply]
Yes, it is working fine. I made a few bug fixes with using the "new section" tab (which actually doesn't have a edit summary box). Cheers, mc10 (t/c) 21:38, 10 October 2011 (UTC)[reply]
 updated — Martin (MSGJ · talk) 22:11, 10 October 2011 (UTC)[reply]

New edits

[edit]

Please sync with User:MC10/defaultsummaries.js. I've made a few changes to the script—namely, when an edit summary already ends with a space, the script doesn't add an additional space. Tested in IE 7+, Firefox 8, and Chrome 15. mc10 (t/c) 19:49, 24 November 2011 (UTC)[reply]

Done Looks straightforward. Anomie 01:18, 25 November 2011 (UTC)[reply]

Installation on Wikivoyage

[edit]

How could this gadget be made available on Wikivoyage? Different standard summaries would be preferable, but I assume that would just be a matter of adjusting the code to suit. • • • Peter (Southwood) (talk): 17:43, 11 February 2013 (UTC)[reply]

Request for Gadget modification

[edit]

Could the two lists be taken out of the gadget itself and a generic version be placed in MediaWiki:Gadget-defaultsummaries/standard and MediaWiki:Gadget-defaultsummaries/minor if User:<username>/Gadget-defaultsummaries/standard and/or User:<username>/Gadget-defaultsummaries/minor do not exist. Also, selecting a minor summary should also check the minor edit checkbox. User:Technical 13   ( C • M • Click to learn how to view this signature as intended ) 16:43, 27 March 2013 (UTC)[reply]

Removing unsourced content

[edit]

(Copied from en:Help_talk:Preferences#Quick_edit_summaries, to proper place here. Sorry about that. — TransporterMan (TALK) 16:14, 10 July 2013 (UTC))[reply]

At Preferences:Gadgets:Editing there is a checkoff preference for "Add two new dropdown boxes below the edit summary box with some useful default summaries". When enabled, one of the quick preference selections is: "Removing unsourced content". Due to a change in WP:BURDEN back around October, 2012, this summary is inadequate and its use would be, arguably, a violation of policy, which says, "When tagging or removing material for not having an inline citation, please state your concern that there may not be a published reliable source for the content, and therefore it may not be verifiable.[1]"

References

  1. ^ When tagging or removing such material, please keep in mind that such edits can be easily misunderstood. Some editors object to others making chronic, frequent, and large-scale deletions of unsourced information, especially if unaccompanied by other efforts to improve the material. Do not concentrate only on material of a particular POV, as that may result in accusations that you are in violation of WP:NPOV. Also check to see whether the material is sourced to a citation elsewhere on the page. For all of these reasons, it is advisable to communicate clearly that you have a considered reason to believe that the material in question cannot be verified.

Could it be changed to read "Removing unsourced content, no published reliable source may exist, thus perhaps not verifiable", which would now seem to be the minimum statement allowable for this particular edit summary? (Just for the record, let me note that I am on the record at the WP:V talk page as feeling that this requirement is ridiculous, a position which I still maintain, but I'm not trying to be pointy by making this request, but truly only trying to help editors avoid stepping into a pitfall by using the tools provided by WP.) Regards, TransporterMan (TALK) 14:05, 10 July 2013 (UTC)[reply]

Perhaps it would be simpler for it to be removed instead? To save anyone else having to do the search: the list is hard-coded in MediaWiki talk:Gadget-defaultsummaries.js, so that's where the edit would be needed. -- John of Reading (talk) 14:54, 10 July 2013 (UTC)[reply]

VE support

[edit]

I changed the gadget code to support both the classic editing and visual editor interface. For the regular editing this change doesn't affects anything, and for VE editing it adds summaries dropdown boxes near summary box. Please sync the code with User:ערן/defaultsummaries.js (the change was tested in both VE and classic editing in FF). Thanks, Eran (talk) 10:00, 12 October 2013 (UTC)[reply]

I would think something like this would need a little more extensive testing across a wider array of browsers instead of "just" FireFox... I'm homeless and working on getting my life together right now, but if no one beats me to it I'll test your version in all major browsers across all skins in multiple settings and return my results. Technical 13 (talk) 02:35, 14 October 2013 (UTC)[reply]
Thanks Technical 13. I have disabled the request, pending further testing. — Martin (MSGJ · talk) 09:51, 14 October 2013 (UTC)[reply]
Please don't. This prevents other people from testing and looking at the code. Legoktm (talk) 17:40, 14 October 2013 (UTC)[reply]
The {{editprotected}} template is not designed to be used to "attract attention". Per Wikipedia:Edit requests, once it is clear there is consensus for the change, and any final details have been worked out, put a template on the talk page along with a short, clear explanation. Otherwise we have lots of these requests stuck in CAT:EP when there is not actually anything that the responding administrator can do with them. If you would like to propose to change the purpose of the template, perhaps you could start a thread on that talk page. — Martin (MSGJ · talk) 08:32, 15 October 2013 (UTC)[reply]
Per Martin; please get the code fully tested and when everyone is happy please place the edit request so an administrator can enact it. If you need wider input then WP:RFC is a useful venue :D--Errant (chat!) 11:12, 15 October 2013 (UTC)[reply]
The JS looks fine to me, I'll try and test it later on today. Legoktm (talk) 17:40, 14 October 2013 (UTC)[reply]
It was tested on Chromium and Firefox. It is very simple script and should work in IE, though I don't have access to IE and test it. Can anyone with access to IE test it? Eran (talk) 19:23, 16 October 2013 (UTC)[reply]
Tested in IE too (though VE isn't support in IE). Eran (talk) 10:59, 26 October 2013 (UTC)[reply]
Done Given Legoktm's ok, and Eran's further testing in IE, I have enacted the request. Please let me know if any issues turn up. — Mr. Stradivarius ♪ talk ♪ 03:40, 27 October 2013 (UTC)[reply]
Please update the script again from here: User:ערן/defaultsummaries.js. The VE team have broken their interface, and the save dialog is now opened in a new window and outside the document (in iframe). (Testing:  Done) thanks, Eran (talk) 19:37, 28 October 2013 (UTC)[reply]
Done. — Martin (MSGJ · talk) 09:07, 29 October 2013 (UTC)[reply]
Thanks. Eran (talk) 17:27, 29 October 2013 (UTC)[reply]

update

[edit]
Please replace mw.hook( 've.activationComplete' ) to mw.hook( 've.saveDialog.stateChanged' ). This change is required in order to make it work after some changes that have been made in VE (it creates the save dialog in lazy evaluation method for better performance). Thanks, Eran (talk) 18:32, 22 February 2014 (UTC)[reply]
Eran, this request is taking longer than I expected to be carried out. Could you link to the documentation for the ve hook you want it to use please? Thanks. — {{U|Technical 13}} (tec) 14:13, 27 February 2014 (UTC)[reply]
I'm not aware to any "real" public documentation of VE, except automatic documentation[1]. But I'm referring to ve.saveDialog.stateChanged hook. Eran (talk) 15:59, 27 February 2014 (UTC)[reply]
Done. Eran, please confirm that it's what you wanted. Nyttend (talk) 13:36, 4 March 2014 (UTC)[reply]
Yes. Thanks, Eran (talk) 18:51, 4 March 2014 (UTC)[reply]

More VisualEditor support

[edit]

We've found two bugs related to this gadget in VisualEditor. They're described at Wikipedia:VisualEditor/Feedback#Default summaries don't work with VisualEditor. Whatamidoing (WMF) (talk) 20:37, 31 March 2014 (UTC)[reply]

66314 is fixed by triggering a change event on the textarea. ed g2stalk 15:58, 28 June 2014 (UTC)[reply]
Gadget bugs aren't tracked in bugzilla. --MarkAHershberger(talk) 21:46, 22 October 2014 (UTC)[reply]
That's generally true, but it's also true that a bug related to a gadget is not always a bug in the gadget. Whatamidoing (WMF) (talk) 19:47, 24 October 2014 (UTC)[reply]

Bug with VE : summaries displayed several times

[edit]

Hi, see discussion on VE feedback page, there's a problem with default summaries appearing several times (one more each time you open the save dialog). --NicoV (Talk on frwiki) 12:04, 7 May 2014 (UTC)[reply]

It's bugzilla 63316 described above. --NicoV (Talk on frwiki) 12:04, 7 May 2014 (UTC)[reply]
Gadget bugs aren't tracked in Bugzilla. --MarkAHershberger(talk) 21:47, 22 October 2014 (UTC)[reply]
Bumping as this hasen't been fixed after two years. --TerraCodes (talk to me) 01:41, 8 January 2017 (UTC)[reply]

API issue

[edit]

It appears that this isn't using the "correct" API at the moment. There's more information at T69236. Whatamidoing (WMF) (talk) 03:05, 29 June 2014 (UTC)[reply]

Fixed. ed g2stalk 20:43, 30 June 2014 (UTC)[reply]

Protected edit request on 16 February 2017

[edit]

The gadget is broken with VE (shows multiple dropdowns). Edit requested is:

Add

if ( $( 'body' ).data( 'wppresent' ) ) { return; }

$( 'body' ).data( 'wppresent', 'true' );

below

mw.hook( 've.saveDialog.stateChanged' ).add(function(){

//.ve-init-mw-viewPageTarget-saveDialog-checkboxes NKohli (WMF) (talk) 14:05, 16 February 2017 (UTC)[reply]

 Done - any admin should revert on site if this broke something worse. — xaosflux Talk 00:42, 17 February 2017 (UTC)[reply]

Change requested

[edit]

I’d like to have the line “Spelling/grammar correction” changed to “Spelling/grammar/punctuation correction”. Punctuation is at least as important than spelling, arguably more important (see Eats, Shoots and Leaves), and I make a lot of punctuation corrections. Thanks. deisenbe (talk) 19:18, 13 November 2017 (UTC)[reply]

In case it's not clear, since there's been no response, I mean the line on the drop-down menu "Common minor edit summaries - click to use" that appears on edit pages, at least in the interface I use. deisenbe (talk) 14:09, 11 January 2019 (UTC)[reply]
Present text: Spelling/grammar correction
Desired text: Spelling/grammar/punctuation correction
deisenbe (talk) 14:45, 11 January 2019 (UTC)[reply]
Deisenbe, isn't punctuation correction already covered by grammar correction? Enterprisey (talk!) 21:56, 11 January 2019 (UTC)[reply]
I think most English teachers would say they are separate. Grammar only deals with punctuation in a very gross way: a sentence should end with . ? or ! ; independent clauses are joined by ; not , . But misuse of commas, which is the biggest item, lies outside grammar:
He eats, shoots and leaves.
Compared with
He eats shoots and leaves.
That's not grammar, and this sort of problem is very common. deisenbe (talk) 07:21, 12 January 2019 (UTC)[reply]
Indeed, I believe punctuation and spelling are technically part of orthography rather than grammar. That doesn't seem helpful to list, though. That being said, I think Copyedit (minor) and even Fixing style/layout errors would cover punctuation and capitalization changes just fine, no? ~ Amory (utc) 17:32, 13 January 2019 (UTC)[reply]

You’re right on orthography, though it’s not a widely-used word. Style/layout errors does not cover punctuation errors, as I understand it. “Style” there means, or seems to mean, things like use of italic or putting commas inside or outside of quotes, not language use. I could live with Copyedit (minor). However, I think punctuation’s importance should be made visible. Maybe editors will pay it more attention. How about spelling/punctuation/grammar, in addition to Copyedit (minor), which covers more things? deisenbe (talk) 17:44, 13 January 2019 (UTC)[reply]

I'm fine with Spelling/grammar/punctuation correction but I'll leave this open for another day or so in case anyone else has thoughts. ~ Amory (utc) 15:38, 15 January 2019 (UTC)[reply]
@Amorymeltzer: that one seems fine to me. — xaosflux Talk 18:59, 15 January 2019 (UTC)[reply]

 Done ~ Amory (utc) 15:28, 18 January 2019 (UTC)[reply]

Many thanks. deisenbe (talk) 15:13, 21 January 2019 (UTC)[reply]

Interface-protected edit request on 11 January 2019

[edit]

Please copy over User:Enterprisey/Gadget-defaultsummaries.js onto this version (diff). There is a current VPT thread in which people are reporting that when Enter is pressed in the summary field, one of the dropdowns produced by this script opens (instead of the expected result, which is the page saving). I have added a keydown handler in the edit summary field that manually triggers the save button. This fix is supposed to be temporary; I suspect the fix for this might be subtle; OOUI was updated to v0.30.0 on Thursday and it might take a while to track down the issue. Enterprisey (talk!) 07:28, 11 January 2019 (UTC)[reply]

 Done agree this appears to be a bigger issue, but this does restore functionality. — xaosflux Talk 12:03, 11 January 2019 (UTC)[reply]

Change requested 2

[edit]

On the menu "Common minor edit summaries — click to use" I would like to have "Typo" as an item on that list, as it comes up so frequently. "Typo" is short for "typographical error" – an error in typing. For example, writing 2219 instead of 2019. It isn't covered by any of the items on the menu now, it's not a spelling mistake, and it's a very common type of minor correction, at least in my experience. Thank you. deisenbe (talk) 19:36, 3 June 2019 (UTC)[reply]

Since there has been no comment in seven months I'm making this change. deisenbe (talk)
Correction. Since I do not have privileges to do so, I've submitted a request. deisenbe (talk) 13:02, 15 January 2020 (UTC)[reply]

Interface-protected edit request on 15 January 2020

[edit]

Minor menu:

  1. Add " typographical error" after "

Major menu :

  1. Add "Adding information" and "Adding detail" (two items) after "Expanding article"
  2. Move the line "Adding/removing wikilink(s)" up, to follow "Adding/improving reference(s)"
  3. Delete "Adding/removing categories"
  4. Remove the word "major" from "Copyedit (major)" and combine it with "Cleanup", so two lines would be reduced to the single line "Cleanup/copyedit"

See talk page for discussion. deisenbe (talk) 14:01, 15 January 2020 (UTC)[reply]

@Deisenbe: which talk page? — xaosflux Talk 14:14, 15 January 2020 (UTC)[reply]
I can't find it, I suppose I must not have saved it. So I'll redo it:

Some errors do not fit into "Spelling/grammar/punctuation". For example, writing 2220 instead of 2020 is an error, what editors (non-WP) call typographical.

"Expanding article" is too big for details and small bits of information. So propose adding "Adding information" and "Adding detail", which I use often but have to write out.

"Adding/removing Wikilinks" I use, and I suppose others would to, much more often than the two above it (one of which I'm proposing deleting).

Category edits are done through Hotcat. Those few instances when they can't they can be entered manually. So delete it.

Most copyedits are too small for major and too big for minor. And Clean-up means the same. So combine them, deleting "major".

I use these menus multiple times every day. "All the time." Thanks. deisenbe (talk) 15:02, 15 January 2020 (UTC)[reply]

I think you mean this talkpage itself, at #Change requested? I don't know that clarifying "typo" adds much, maybe just saying Typographical/grammar/punctuation correction? Four-in-one seems a lot. I think combining "cleanup" and "copyedit" in the major list is fine. HotCat is not universal, so I wouldn't want to remove the category item. I don't know that "Adding information" and "Adding detail" are particularly helpful in addition to "Expanding article" and would just clutter the menu with barely-distinguishable options. Maybe you'd want to consider something like User:Enterprisey/CustomSummaryPresets or User:BrandonXLF/EasySummary? They seem to do what you might want. ~ Amory (utc) 16:00, 15 January 2020 (UTC)[reply]
So you'll change cleanup/copyedit, removing "major"?
Instead of "Expanding article", how about changing it to "Adding information"? That seems the most inclusive of the three (Expanding article/adding information/adding detail).
Here's how major changes would read, if all of this discussion were implemented, and putting them in approxinate frequency of use:
Adding/removing information
Adding/improving reference(s)
Adding/removing wikilink(s)
Clean up/copyedit
Removing unsourced content
Adding/removing external link(s)
Adding/removing category/ies
deisenbe (talk) 12:14, 16 January 2020 (UTC)[reply]
Isn't #6 and #8 above the same? — xaosflux Talk 18:58, 17 January 2020 (UTC)[reply]
Yes. I didn't pay attention since that's not something I work on.deisenbe (talk) 10:01, 18 January 2020 (UTC)[reply]


@Xaosflux: @Amory: So will anything at all be done? deisenbe (talk) 14:04, 21 January 2020 (UTC)[reply]

@Deisenbe: this is open on the backlog right now, someone will get to it and either do it, or ask more questions. In the example above, you agreeded 6 and 8 are the same, but how you want to resolve it for example. — xaosflux Talk 15:34, 21 January 2020 (UTC)[reply]
My recommendation is to eliminate "Removing linkspam per WP:EL" altogether, as "Adding/removing external links" covers it.

SUMMARY

[edit]

These are the changes which seem to have emerged from the above discussion:

  • Minor menu:
    • Change "Spelling/grammar/punctuation correction" to "Spelling/grammar/punctuation/typographical error"
  • Major menu:
    • Move the line "Adding/removing wikilinks" up so it is third.
    • Combine "Cleanup" and "Copyedit (major)" (two lines) into "Cleanup/copyedit" (one line), and make it fourth.
    • Delete the item "Removing linkspam per WP:EL".
    • Result is that 9-item menu has 7 items.

deisenbe (talk) 16:28, 21 January 2020 (UTC)[reply]

@Deisenbe: sorry for the long delay. If you could make the agreed changes at User:Deisenbe/Gadget-defaultsummaries.js then I will copy them over — Martin (MSGJ · talk) 11:16, 11 February 2020 (UTC)[reply]
I'm sorry but I don't understand what I am being asked to do. deisenbe (talk) 11:53, 11 February 2020 (UTC)[reply]
Please edit User:Deisenbe/Gadget-defaultsummaries.js and make the required changes. Then let me know and I will copy to the live version — Martin (MSGJ · talk) 12:02, 11 February 2020 (UTC)[reply]
I have disabled the request. Please reactivate when the code is ready — Martin (MSGJ · talk) 11:43, 13 February 2020 (UTC)[reply]
@MSGJ:I have done this although since I've never done it before and can't figure out how to see the result I don't know if I've done it correctly. I don't know what you mean by reactivate. deisenbe (talk) 12:53, 13 February 2020 (UTC)[reply]
I've reactivated so me or someone else will be around shortly — Martin (MSGJ · talk) 21:15, 13 February 2020 (UTC)[reply]
 Done. Let me know of any problems — Martin (MSGJ · talk) 12:57, 14 February 2020 (UTC)[reply]
Looks great. Thanks! deisenbe (talk) 18:38, 18 February 2020 (UTC)[reply]

Padding?

[edit]

Could some padding (like 6px) please be added to the bottom of the dropdowns when editing via the wikitext editor (not the new wikitext editor/VE) so that theres some space between the dropdowns and the checkboxes? I'd have a diff to show, but I'm not really fimilar with OOUI's JS, but it seems like it should be something that could be simply added. --Terra (talk) 09:41, 10 September 2019 (UTC)[reply]

 Not done as to the immediate edit request, lacking "specify what text should be removed and a verbatim copy of the text that should replace it". Certainly can be discussed further here and once an edit is ready it can be reviewed and made. Ping to ESanders (WMF) who has worked on this recently for any insight as well. — xaosflux Talk 11:26, 10 September 2019 (UTC)[reply]
 Done Added 1em bottom padding to WikiEditor version. ESanders (WMF) (talk) 15:27, 10 September 2019 (UTC)[reply]
Yeah I didn't have a diff because I'm not all that familiar with OOUI, but thanks for the ping, and for the edit, tho. --Terra (talk) 21:36, 10 September 2019 (UTC)[reply]

Add WP:COPYWITHIN summaries

[edit]

Add to articleSummaries choices from WP:COPYWITHIN:

  • "Copied content from [[<page name>]]; see that page's history for attribution."
  • "Content in this edit is translated from the existing <language> Wikipedia article at [[:<langcode>:<Exact title of <language> article>]]; see its history for attribution."

Opinions? Just these two or all of them? — Preceding unsigned comment added by Inteloff (talkcontribs) 02:59, 3 February 2020 (UTC)[reply]

Interface-protected edit request on 18 April 2022

[edit]

Per Wikipedia:Village pump (technical)#Edit summary, drafts should get both the non-article summaries (since comments are placed on the tops of drafts) plus the article summaries (since they are essentially articles).

Change

			if ( namespace % 2 !== 0 && namespace !== 3 ) {
				addOptionsToDropdown( dropdown, talkPageSummaries );
			}

to

			if ( namespace % 2 !== 0 && namespace !== 3 ) {
				addOptionsToDropdown( dropdown, talkPageSummaries );
			} else if (namespace === 118 ) {
				addOptionsToDropdown( dropdown, articleSummaries );
			}

--Ahecht (TALK
PAGE
) 14:16, 18 April 2022 (UTC)[reply]

 Donexaosflux Talk 14:02, 20 April 2022 (UTC)[reply]

 You are invited to join the discussion at Wikipedia:Village pump (technical) § "Default summary" gadget bugs. --Ahecht (TALK
PAGE
) 19:58, 23 June 2023 (UTC)[reply]


Proposal: add user-defined Common edit summaries

[edit]

 Courtesy link: WP:VPW § Proposal: add user-defined Common edit summaries to Preferences

A user at WP:Village pump (WMF) responded to a proposal there to add user-defined Common edit summaries to Preferences, by indicating that implementation of such an idea might be better located in this gadget. In brief, the original, Preferences-based idea was this:

I'd like to propose an enhancement to Preferences to add a feature enabling a user to enter a list of their own commonly used edit summary phrases, and then present them in the "Common edit summaries" dropdown that appears in Preview mode below the Edit summary input field.

Perhaps, as SD0001 said, this might work better here. The original discussion is at WP:VPW#Proposal: add user-defined Common edit summaries to Preferences. Thanks, Mathglot (talk) 01:41, 3 December 2023 (UTC)[reply]