Page MenuHomePhabricator

VisualEditor: For edit summary field, give users an auto-fill drop-down (or similar) of recent edit summaries they've used
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
Jdforrester-WMF
May 8 2013, 9:31 PM
Referenced Files
F28628688: image.png
Apr 12 2019, 2:51 PM
F28629206: image.png
Apr 12 2019, 2:51 PM
F28628692: image.png
Apr 12 2019, 2:51 PM
Tokens
"Yellow Medal" token, awarded by ToBeFree."Like" token, awarded by Omotecho."Like" token, awarded by Liuxinyu970226."Like" token, awarded by Elitre."Like" token, awarded by CennoxX."Piece of Eight" token, awarded by Nemo_bis.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

I have a (very hackish) user script for providing access to previous edit summaries: https://de.wikipedia.org/wiki/Benutzer:Schnark/js/veSummary.js If anybody wants to use code from there to fix this in VE itself, feel free to do so.

Esanders raised the priority of this task from Low to Medium.Dec 14 2016, 10:17 PM
Esanders added a subscriber: Dvorapa.

Raising priority now that we have the same problem in VE source mode (NWE).

How plausible would it be to use input but magically make it word wrap, even though the HTML spec says it mustn't?

Bartosz had a go at this a few years ago, but then I pointed out some IME issues and he gave up. I think my API approach is probably the simplest.

(That was https://gerrit.wikimedia.org/r/#/c/212795/, it tried to dynamically swap between <input type=text> and <textarea>.)

It's not possible to make <input> wrap. If anything, it could be possible to make <textarea> have autocomplete (nothing in the spec prohibits it, the attribute is valid on textarea and the new 'autocomplete' values include one that is only valid on multiline content). But no browser seems to actually support this.

(Actually, Chrome does support autocomplete="street-address", huh. But that doesn't really help us here, it doesn't remember and autocomplete values in textareas on its own and there doesn't seem to be a way to make it do that.)

Jdforrester-WMF set the point value for this task to 8.

A solution could also be HTML5 contenteditable, at least its support in browsers is acceptable. (see StackOverflow question about this topic)

Fetch and filter recent commit messages:

https://gist.github.com/edg2s/f7db01d240ad3c83d183

I don't think that list: 'recentchanges' is the best approach, as it will only give you summaries from the last month. When you are not very active, these are very few, so won't help much. In my script https://de.wikipedia.org/wiki/Benutzer:Schnark/js/veSummary.js, I instead decided to use list: 'usercontribs' instead.
But neither will give results for users not logged in. Even if they have a static IP, mw.user.getName() will only return null.

But neither will give results for users not logged in. Even if they have a static IP, mw.user.getName() will only return null.

There are a bunch of features that don't work for logged-out users; I'd not worry too much about that.

According to https://developer.mozilla.org/en-US/Firefox/Releases/59#HTML Firefox now supports autocompletion of textareas, so it should actually be possible to have native autocomplete suggestions, at least in Firefox.

Change 495451 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Edit summary autocomplete

https://gerrit.wikimedia.org/r/495451

Change 495451 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Edit summary autocomplete

https://gerrit.wikimedia.org/r/495451

Why doesn't this make use of T50274#4048873 ? It looks like Firefox, Webkit, and Chromium all support autocomplete (even though Mozilla.org indicates otherwise, the link to the Chromium indicates the bug is fixed since Jan 2018)...

It doesn't appear to work yet in Chrome/FF: https://codepen.io/edg2s/pen/eXGdVM

Nor in Safari.

Change 495451 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Edit summary autocomplete

https://gerrit.wikimedia.org/r/495451

ToBeFree subscribed.

Wonderful and seems to be done

Great feature. <3
Can we have a way to delete misspelled sentences? Thanks!

I agree, this is well done.

My only problem: when I have entered a summary, the drop down appears. When I hit the hotkeys for save, the system will complete the summary with the top item whatever the value of my original summary was. (This is not how it works in old WTE.)

The particular issue was that I wanted a summary of "clean table", but after having entered the entire thing in it removed the exact match and attempted to add the lengthier summary after hitting cntrl + enter, and then chose not to save. (The biggest win for me is that the hotkeys should always save regardless of the current value of the dropdown.)

image.png (299×597 px, 22 KB)

image.png (304×586 px, 25 KB)

image.png (305×513 px, 29 KB)

Happy to split this to a different task if it seems like a significant chunk of additional work...

Great feature. <3
Can we have a way to delete misspelled sentences? Thanks!

No. But if you make 200 more edits, it'll automagically go away. The tool only looks back at your most recent 200 edit summaries.

@Esanders, Izno's problem is going to drive me nuts. When there's an exact match, it needs to use that exact match, and not suggest something longer. If I've typed r, and the options it finds are 35 instances of r and one of Re-ping in my last 200 edit summaries, then it should definitely be suggesting r and not the other longer one.

(In the meantime, the workaround is to hit the Escape key.)

(In the meantime, the workaround is to hit the Escape key.)

(And then hit Ctrl + Enter again.)

Great feature. <3
Can we have a way to delete misspelled sentences? Thanks!

No. But if you make 200 more edits, it'll automagically go away. The tool only looks back at your most recent 200 edit summaries.

So I have to be patient. And be careful: I've already accidentally entered some bad summaries while editing. :/

My only problem: when I have entered a summary, the drop down appears. When I hit the hotkeys for save, the system will complete the summary with the top item whatever the value of my original summary was. (This is not how it works in old WTE.)

This is a big problem for me as well. My most common summary on talk pages or project discussion pages is just “reply”, but the first suggestions are all like “reply (something something)”, “reply, something else”, etc. When I press Ctrl+Enter out of habit – for years, VisualEditor has trained me that Ctrl+Enter in the summary field means “save” – then it will “complete” my edit summary with some gibberish that makes no sense in the current context, and if I don’t notice it I’ll save an edit with a nonsense summary.

Is it possible to opt out of this feature until that’s fixed?

Great feature. <3
Can we have a way to delete misspelled sentences? Thanks!

The edit summaries are pulled from the API and old edit summaries are immutable so I don't see an easy fix for this without using another storage system. Suggestions welcome.

Is it possible to opt out of this feature until that’s fixed?

No, but it shouldn't be too hard to fix. In the meantime you can press escape before ctrl+enter.

Change 506191 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] EditSummaryWidget: Don't highlight first automatically

https://gerrit.wikimedia.org/r/506191

The above patch stops the first item being highlighted automatically. You can test the effect on live by pasting ve.init.target.saveDialog.editSummaryInput.lookupHighlightFirstItem = false; into the console after the save dialog has opened.

Change 506191 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] EditSummaryWidget: Don't highlight first automatically

https://gerrit.wikimedia.org/r/506191

The above patch stops the first item being highlighted automatically. You can test the effect on live by pasting ve.init.target.saveDialog.editSummaryInput.lookupHighlightFirstItem = false; into the console after the save dialog has opened.

BTW since you're in the area there's a TODO there that was waiting on what is now a task that you closed a week or two ago.

BTW since you're in the area there's a TODO there that was waiting on what is now a task that you closed a week or two ago.

Sorry, I'm not sure what you're referring to, can you provide a link?

BTW since you're in the area there's a TODO there that was waiting on what is now a task that you closed a week or two ago.

Sorry, I'm not sure what you're referring to, can you provide a link?

	// HACK: Disable pending animation. Should be made an upstream option (T220204)
	// Parent method

T220204: Make pushPending optional on OO.ui.mixin.RequestManager / OO.ui.mixin.LookupElement widgets

@Izno Now done in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/VisualEditor/+/512227. I think we were still waiting for MediaWiki to be updated to use the new version of OOUI of something.

The above patch stops the first item being highlighted automatically. You can test the effect on live by pasting ve.init.target.saveDialog.editSummaryInput.lookupHighlightFirstItem = false; into the console after the save dialog has opened.

This worked nicely. Thanks much!

@Izno Now done in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/VisualEditor/+/512227. I think we were still waiting for MediaWiki to be updated to use the new version of OOUI of something.

Coolio.

Do we consider this fixed now then ?

ppelberg claimed this task.