Page MenuHomePhabricator

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

Subscribers
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.
Assigned To
None
Authored By
Jdforrester-WMF, May 8 2013

Details

Reference
bz48274

Related Objects

Event Timeline

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

(In reply to comment #3)

Browser's autosuggestion/complete is the most used function during editing
Wikipedia, especially when I do similar edits. Every time I test the VE is
miss this function because the field is a textarea instead of an input field.
It's really annoying to type every time the summary instead of selecting out of
previous summaries.

Sure, but this functionality isn't possible for proper editable surfaces with rich text, links and other HTML items that these fields will allow.

Rephrased bug summary. "textbox" doesn't exist. There is "input" and "textarea" both are "form fields".

(In reply to comment #1)

...or implement our own autocomplete?

It depends what the use-case is. Personally, I like the current multi-line input and my browser stopped remembering my inputs for <input>s long ago (perhaps when I switched from Firefox to Chrome).

However, just brainstorming, to address Raimond's use-case in comment 3, it may be possible to query the most recent X edit summaries a user has used and implement a suggestion feature based on those. That might cover the repeated edits use-case.

(In reply to comment #6)

(In reply to comment #1)
> ...or implement our own autocomplete?

However, just brainstorming, to address Raimond's use-case in comment 3, it
may
be possible to query the most recent X edit summaries a user has used and
implement a suggestion feature based on those. That might cover the repeated
edits use-case.

That's pretty much what I meant. The autocomplete would populate from recent commit messages, or they would just be shown in a dropdown.

A suggested list populated with recent edit summaries will be really useful when VE is extended to talk namespace. Almost every time I close an RfD as something other than delete, I make an edit to the redirect's talk page with the summary "Noting old RFD" or "Note old RFD and tag for relevant WikiProjects" (depending whether they are already tagged or not).

(In reply to comment #8)

A suggested list populated with recent edit summaries will be really useful
when VE is extended to talk namespace.

We're not planning to make VisualEditor work with talk pages, but instead this will be done by Flow (which will use VisualEditor for editing content).

That said, we still think this would be valuable, and it's definitely in our plans.

The main threads in VE/F:
https://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback/Archive_2013_05#Edit_summaries_have_no_.27memory.27
and
https://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback/Archive_2013_06#Predictive_texting_in_edit_summaries
and
https://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback/Archive_2013_06#Edit_summaries_-_menu_of_recently-used.3F
and
https://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback/Archive_2013_07#Speed.2C_Edit_Summary.2C_and_Limitations

Closely related are:

Bug 42139 ("There is no preview of edit summaries") - Wanted, so that we can test WP:shortcut links etc are correctly-targeted.

Bug 50961 ("Provide simultaneous access to editor and edit summary") - So that we don't have to remember everything we did, after a multitask edit.

I think this should be low priority. Only power users need quick access to commonly used edit summaries, and these power users will by definition know OS-wide tools like autohotkey or ditto which can do the job much more comfortably.

matmarex updated the task description. (Show Details)Jul 20 2015, 11:22 AM
matmarex set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 20 2015, 11:22 AM
Catrope removed a subscriber: Catrope.Jan 13 2016, 9:26 PM
Krinkle removed a subscriber: Krinkle.Mar 15 2016, 12:25 AM
Qgil removed a subscriber: Qgil.Mar 15 2016, 2:21 PM

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 Normal.
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.
Dvorapa added a comment.EditedDec 18 2016, 3:37 PM

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.

Deskana moved this task from TR1: Releases to Freezer on the VisualEditor board.Oct 27 2017, 3:18 PM

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.

Izno added a subscriber: Izno.Nov 3 2018, 3:44 AM

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

Izno added a comment.Mar 9 2019, 5:15 PM

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

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

greg removed a subscriber: greg.Thu, Apr 4, 9:40 PM
Esanders moved this task from Inbox to Low Priority on the Editing QA board.Tue, Apr 9, 12:46 PM
ToBeFree added a subscriber: ToBeFree.

Wonderful and seems to be done

Trizek added a subscriber: Trizek.Fri, Apr 12, 8:56 AM

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

Izno added a comment.EditedFri, Apr 12, 2:51 PM

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.)

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.

Whatamidoing-WMF added a comment.EditedFri, Apr 12, 6:43 PM

@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.)

Izno added a comment.EditedFri, Apr 12, 7:51 PM

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

(And then hit Ctrl + Enter again.)

TheDJ added a subscriber: TheDJ.Mon, Apr 15, 1:23 PM

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. :/