Remove classic edit toolbar from core
Closed, ResolvedPublic

Tokens
"Dislike" token, awarded by Wang_Qiliang."Like" token, awarded by Liuxinyu970226."Mountain of Wealth" token, awarded by Elitre."Dislike" token, awarded by Man77."Evil Spooky Haunted Tree" token, awarded by Krenair."Dislike" token, awarded by AS."Like" token, awarded by stjn."Love" token, awarded by MichaelSchoenitzer."Heartbreak" token, awarded by NickK."Heartbreak" token, awarded by Kghbln."Heartbreak" token, awarded by Nemo_bis."Dislike" token, awarded by Thibaut120094."Y So Serious" token, awarded by matej_suchanek."Piece of Eight" token, awarded by RandomDSdevel."Like" token, awarded by waldyrious."Like" token, awarded by Ricordisamoa."Like" token, awarded by He7d3r.
Assigned To
Authored By
Krinkle, May 6 2011

Description

Move the 'classic' editor (<div id=toolbar> on EditPage and mediawiki.toolbar JS) out of MediaWiki core (potentially into an extension), leaving just a plain <textarea> in MediaWiki itself.

Details

Reference
bz28856

Related Objects

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

As a user of the 2006 editor,¹ I would like to echo what Legoktm asked more than a year ago on T30856#3629674, regarding removing from core vs removing from wikimedia sites (where I expect many people will be using it, some of them as an informed decision).

Personally, I would probably recreate it with javascript, but that's not an option for everyone.

¹ Basically, I find it works better for me than the alternatives. Both in features and time to load.

I understand that the main point is that WMF staff will not be supporting it any longer, and that a controlled removal makes more sense than waiting until it breaks and trying to make decisions during a crisis.

You are always free to create a user script that adds whatever toolbar you want for your own editing. @Platonides, if you're interested in doing that, then I recommend talking to @Arkanosis, since I believe that he already has some ideas about how to adapt a French Wikipedia gadget to do that. I would be very happy if the result was a single well-written, community-maintained script/gadget that was used by everyone who preferred it. I know that there are some editors at WikiProject Mathematics and at the Wikisources who personally prefer this toolbar, so I think it would be a valuable contribution to the movement.

@Johan I think that this wants to be in Tech News soon (#42 or #43). The main message is "The 2006 wikitext editor is no longer supported and will be removed from Special:Preferences". The project page is at https://www.mediawiki.org/wiki/Contributors/Projects/Removal_of_the_2006_wikitext_editor

If it's mentioned in #43, then we might (if all goes well – we should know by the translation deadline) be able to add "A similar toolbar may be available to you as a volunteer-supported user script or gadget", with a link to the script(s).

Johan moved this task from Archive to To Triage on the User-notice board.Oct 13 2018, 11:51 PM
TheDJ added a comment.Oct 16 2018, 5:40 PM

P.S. for people that intend on copying this code from core, please note that it's likely GPL licensed, so you should add that license to that gadget/userscript and refer back to a git revision or something that you took it from.

I don't think this is ready for announcing yet - what I asked in T30856#3629674 is still unresolved. If we're going to tell people to just copy/fork the code into a gadget, we haven't really fixed the maintenance problem - we've just pushed it onto other people and given them less resources to do it well by moving it out of MediaWiki.

My proposal would be to split the toolbar into a separate extension, abstracting out toolbar support in core. If we can recruit maintainers (@Platonides maybe? :)) then the extension will continue to be deployed in Wikimedia production, subject to the standard code stewardship process. Otherwise it'll get dropped, but at least we've given people an opportunity to support this properly.

Uhh, is someone planning to work on this in that timeline?

Also other places. And last year. And, yes, everyone who has offered to help is ready to do their bit on the schedule that we agreed to two months ago.

@Legoktm, if you wish to file tasks for the two ideas you describe in that comment –

  1. Make a pluggable toolbar system.
  2. Turn this old toolbar into an extension.

– then you are welcome to do so.

Neither of those tasks need to block this work. My main reasons why these tasks should not block this work are:

  • Nobody wants to write that extension. The possibility of turning this into an extension has been discussed in multiple forums for at least the last two years, and nobody has shown any interest in writing the extension. If people were interested in doing that work, I assume that they would have said something by now.
  • The extension probably won't be used. I believe that any resulting extension will not be deployed on WMF wikis. It might be welcome on a few third-party wikis; however, this change was announced to third-party users more than a year ago, and I do not recall seeing even a single third-party user request for an extension to replace this toolbar. I'm certain that a user script will get used, but creating an extension might be a waste of your time.

Uhh, is someone planning to work on this in that timeline?

Yes.

Also other places. And last year. And, yes, everyone who has offered to help is ready to do their bit on the schedule that we agreed to two months ago.

Ack, I missed T30856#4539731 it seems.

@Legoktm, if you wish to file tasks for the two ideas you describe in that comment –

  1. Make a pluggable toolbar system.

T28918 ish, but the toolbar part is a smaller aspect.

  1. Turn this old toolbar into an extension.

That's this task. It's mentioned in the task description.

Neither of those tasks need to block this work. My main reasons why these tasks should not block this work are:

  • Nobody wants to write that extension. The possibility of turning this into an extension has been discussed in multiple forums for at least the last two years, and nobody has shown any interest in writing the extension. If people were interested in doing that work, I assume that they would have said something by now.

I did in T30856#3629674. I think there's significant value in refactoring it into an extension. But my questions were never answered, and still haven't been.

  • The extension probably won't be used. I believe that any resulting extension will not be deployed on WMF wikis. It might be welcome on a few third-party wikis; however, this change was announced to third-party users more than a year ago, and I do not recall seeing even a single third-party user request for an extension to replace this toolbar. I'm certain that a user script will get used, but creating an extension might be a waste of your time.

If there are active and willing maintainers, and users who want to use it, why wouldn't it be deployed to Wikimedia wikis? Anyways, my point is that I expect the maintenance required to keep a user script going higher than maintaining it as an extension.

Third party users commented directly in this ticket, see T30856#3335611 for example.

After this toolbar was removed MediaWiki core will come without any editing interface. An idea I do not really fancy. Isn't it time to merge WikiEditor into core now that it was stripped from unmaintainable code? Yeah, it is to easy to install and invoke WikiEdior but this is not my point.

Third party users commented directly in this ticket, see T30856#3335611 for example.

Oh, this was my own rant. Did not read this before I posted.

  1. Turn this old toolbar into an extension.

That's this task. It's mentioned in the task description.

No. "potentially" is a nice-to-have. If you want to do the work, that's fab, but it isn't part of this committed work.

Neither of those tasks need to block this work. My main reasons why these tasks should not block this work are:

  • Nobody wants to write that extension. The possibility of turning this into an extension has been discussed in multiple forums for at least the last two years, and nobody has shown any interest in writing the extension. If people were interested in doing that work, I assume that they would have said something by now.

I did in T30856#3629674. I think there's significant value in refactoring it into an extension. But my questions were never answered, and still haven't been.

Sorry, they seemed rhetorical? "Both".

After this toolbar was removed MediaWiki core will come without any editing interface. An idea I do not really fancy. Isn't it time to merge WikiEditor into core now that it was stripped from unmaintainable code? Yeah, it is to easy to install and invoke WikiEdior but this is not my point.

It's been shipped in the tarball for six(?) years now.

It's been shipped in the tarball for six(?) years now.

Yeah, it is to easy to install and invoke WikiEdior but this is not my point.

It's been shipped in the tarball for six(?) years now.

Yeah, it is to easy to install and invoke WikiEdior but this is not my point.

No, it's mine. It's installed and enabled by default.

Bye! To whatever you like. You do it anyways.

Kghbln removed a subscriber: Kghbln.Oct 16 2018, 7:33 PM

@Whatamidoing-WMF : Hi! I've been willing to test the upcoming deployment to make sure that the gadgets currently used by many on the French Wikipedia still work if the classic edit toolbar is disabled. So, following the information on the page you linked to from my user talk page, I went today to the English Wikipedia on the beta cluster which is currently running 1.33.0-alpha (26665a6). Unfortunately, it looks like the classic edit toolbar has not been disabled there, so I'm unable to test the gadgets from the French Wikipedia as planned.

Has the removal plan changed in the meantime? Am I not testing on the right wiki?

Thanks!

Change 317079 merged by jenkins-bot:
[mediawiki/core@master] Remove old "bulletin board style toolbar" from core

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

@Jdforrester-WMF : Hi! It looks like the toolbar is now gone on the beta cluster, but not on the English Wikipedia (I can't really tell for the French Wikipedia as it has been much hacked there). Does it mean that the timeline on this page has been postponed by one week and that I still have seven days to make sure the gadgets are working?

@Jdforrester-WMF : Hi! It looks like the toolbar is now gone on the beta cluster, but not on the English Wikipedia (I can't really tell for the French Wikipedia as it has been much hacked there). Does it mean that the timeline on this page has been postponed by one week and that I still have seven days to make sure the gadgets are working?

Yes, sorry, you have one week to test.

@Jdforrester-WMF : Hi! It looks like the toolbar is now gone on the beta cluster, but not on the English Wikipedia (I can't really tell for the French Wikipedia as it has been much hacked there). Does it mean that the timeline on this page has been postponed by one week and that I still have seven days to make sure the gadgets are working?

Yes, sorry, you have one week to test.

That's fine, thank you! :)

Change 469777 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@REL1_32] Remove old "bulletin board style toolbar" from core

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

Hi everyone,

If there's any interest on your local wiki to provide extended support for the the classic edit toolbar, you can port it as a local gadget.

I've documented this approach on mediawiki.org. It has been successfully tested on both the beta cluster and the French Wikipedia.

Best regards

I've documented this approach on mediawiki.org. It has been successfully tested on both the beta cluster and the French Wikipedia.

Thank you! (I appreciate the example ;-))

I note that you suggest to import the whole code to the local wiki.

import fr:MediaWiki:Gadget-mediawiki.toolbar.js on your local wiki;

Don't you think it would be safer to suggest to create a link that would link directly to the ressource on fr?
mw.loader.load("//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-mediawiki.toolbar.js
That solution would ease overall maintenance and avoid code depreciation, no?

Don't you think it would be safer to suggest to create a link that would link directly to the ressource on fr?
mw.loader.load("//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-mediawiki.toolbar.js
That solution would ease overall maintenance and avoid code depreciation, no?

I have mixed feelings about the mw.load approach. Sure, it lowers the burden on the maintainers, but it always costs an additional HTTP request (or at least it did the last time I checked) for all the users of the script.

Feel free to change it if you want. As I won't update other wikis anyway, that might be indeed better :)

I've made the change.

Concerning the HTTP request, I've seen that loading practice commonly used. I don't know if that's a good practice but I've never read the same comment as yours elsewhere. I literally have no idea.

mw.loader.load has two major disadvantages:

  1. Code that uses mw.toolbar.addButton must not run before the code is loaded. While this is trivial if you imported and load the code as gadget, it is not so easy if you plainly load the code from elsewhere. Global gadgets (T22153) would solve this.
  2. If used outside WMF wikis, loading directly from fr.wikipedia might break on that other wiki, if some code changes were made that are only compatible with master, but not with the version that runs on the external wiki.

I reverted your change. Apart from my above concerns, your code doesn't work at all, since:

  1. This tries to load https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-mediawiki.toolbar.js (yes, exactly that HTML page) as JS.
  2. You left in the line "add this line in your local MediaWiki:Gadgets-definition: mediawiki.toolbar [ResourceLoader|hidden] | mediawiki.toolbar.js.", which has to be replaced with whatever solution you have for dependency management, as explained in my previous comment.

I've made the change.

Thanks!

Concerning the HTTP request, I've seen that loading practice commonly used. I don't know if that's a good practice but I've never read the same comment as yours elsewhere. I literally have no idea.

People didn't talk much about that the last time I checked either. That's because:

  • developers care about their Internet access, so they have fast Internet and most of them never use poor connections ''for real'';
  • non-developers don't understand why everything is slow — at best they complain, but most of the time, they live with it;
  • automated tests don't test what's is not builtin (again, the last time I checked).

Is it not better to place this gadget on Meta!?

Concerning the HTTP request, I've seen that loading practice commonly used. I don't know if that's a good practice but I've never read the same comment as yours elsewhere. I literally have no idea.

Unfortunately, it is the recommended practice (per mw:ResourceLoader/Migration guide (users)#Keep gadgets central), at least until we get Gadgets 3.0' global repository (T22153)

matmarex added a subscriber: tomasz.EditedOct 31 2018, 11:20 PM

@tomasz noticed that the function mw.toolbar.insertTags (and its deprecated global alias insertTags) has also been removed in this change. I think this might have been unintentional? The function doesn't really have anything to do with the toolbar (it inserts text into the editing textarea), it was just unfortunately in the same namespace. Perhaps it could be restored, and then renamed (maybe under mw.util)?

In the meantime, if any important gadgets are failing with errors like "ReferenceError: insertTags is not defined.", they can be fixed with a change like this: https://pl.wikisource.org/w/index.php?title=MediaWiki:Gadget-shortcuts.js&diff=2107359&oldid=293638

The most common gadget across wikis that hasn't been generally upgraded to use jquery.textSelection directly is charinsert, which looks to be outdated on 34 wikis: arwiki, arwikiquote, aswiki, azbwiki, bhwiki, bnwikisource, bswiki, cawikiquote, cawiktionary, ckbwiki, eswikinews, fowiki, glwiki, glwikibooks, glwikiquote, glwikisource, gomwiki, kuwiki, kuwiktionary, mwlwiki, orwiki, pnbwiki, pswiki, ptwikisource, simplewiki, srwikibooks, srwikiquote, srwikisource, srwiktionary, tawikisource, tewiki, viwikiquote, viwikisource, zh_yuewiki. As Arabic Wikipedia is the biggest of these, I made a quick localised version of the current enwiki version and pinged them on https://ar.wikipedia.org/wiki/%D9%86%D9%82%D8%A7%D8%B4_%D9%85%D9%8A%D8%AF%D9%8A%D8%A7%D9%88%D9%8A%D9%83%D9%8A:Gadgets-definition.

charinsert

also known as edittools on some wikis, e.g. (currently broken on) https://www.mediawiki.org/wiki/MediaWiki:Gadget-Edittools.js

The most common gadget across wikis that hasn't been generally upgraded to use jquery.textSelection directly is charinsert, which looks to be outdated on 34 wikis: arwiki, arwikiquote, aswiki, azbwiki, bhwiki, bnwikisource......

@Jdforrester-WMF, I have upgraded the the charinsert gadget in bnwikisource as per your instruction in arwiki. It appeared again. But we would like to get it above the edit box as before, not below it. Your help is needed.

Jdforrester-WMF added a comment.EditedNov 5 2018, 4:25 PM

But we would like to get it above the edit box as before, not below it. Your help is needed.

Right now the controls (held in the editpage-specialchars element) are put into the document just before mw-editTools, which is below the textarea. This is done by the line:

placeholder = $( '<div id="editpage-specialchars"> </div>' ).prependTo( '.mw-editTools' )[0];

If you want to move it to above the text area, you can change this line to suit. The most reliable part of the document to put it next to is wpUnicodeCheck, which is right at the top. Hope this works! However, re-designing the gadget is a bit off-topic for this task. :-)

Change 469777 merged by jenkins-bot:
[mediawiki/core@REL1_32] Remove old "bulletin board style toolbar" from core

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

Jdforrester-WMF closed this task as Resolved.Nov 6 2018, 1:41 AM
Jdforrester-WMF edited projects, added MW-1.32-notes; removed Patch-For-Review.
gh87 removed a subscriber: gh87.Nov 6 2018, 2:08 AM
Dalba added a subscriber: Dalba.Nov 6 2018, 8:05 AM
Ghilt added a subscriber: Ghilt.Nov 6 2018, 4:21 PM
Man77 awarded a token.Nov 6 2018, 5:34 PM
TheDJ added a comment.Nov 6 2018, 5:58 PM

@Stryn you need to fix fi.wp.org JavaScript that adds those elements below the edit field to make use of jquery.textselection instead of insertTags. An example is linked higher up in this thread.

Cirdan added a subscriber: Cirdan.Nov 6 2018, 6:06 PM
stjn added a subscriber: stjn.Nov 6 2018, 6:44 PM

It appears that the German Wikipedia has a broken gadget that is interfering with CharInsert/EditTools. If you are looking for this:

and not finding it, you don't need the 2006WTE back. Instead, you need to find and fix your broken local gadget.

TheDJ added a comment.EditedNov 7 2018, 1:41 PM

I had a minute to spare. It seems that the original 'char insert' modification that de.wikipedia.org was running, was:
https://de.wikipedia.org/w/index.php?title=MediaWiki:Onlyifediting.js
This was disabled (because of the errors) in
https://de.wikipedia.org/w/index.php?diff=182493539&oldid=175658964&title=MediaWiki:Common.js
Because of that, there were still no char insert tools.

Since, someone reinstated the 'vanilla' char insert Edittools
https://de.wikipedia.org/w/index.php?diff=182517410&oldid=58236364&title=MediaWiki:Edittools&diffmode=source

Because this doesn't provide all functionality, some people are of course not satisfied. This can be solved by repairing onlyifediting.js:
https://de.wikipedia.org/w/index.php?diff=182544916&oldid=182542209&title=Benutzer%3ATheDJ%2Fonlyifediting.js&type=revision
seems to do the trick. [edit: diff was updated]

I would however advise the community to checkout the english version:
https://en.wikipedia.org/wiki/MediaWiki:Gadget-charinsert-core.js
which helpfully remembers the last selection of the dropdown. I must say that the array style definition of the de.wp version is nicer than what is currently in the English wikipedia version however.

Elitre awarded a token.Nov 7 2018, 5:51 PM
stjn added a comment.Nov 7 2018, 9:14 PM

Are statistics on toolbar usage still available for wikis not included in previous batches? Maybe in the form of ‘who doesn’t have any toolbar enabled’? Some people in ruwiki are making quite a big deal out of feature that seemingly wasn’t used that much, but previous analysis here wasn’t made for us.

Are statistics on toolbar usage still available for wikis not included in previous batches? Maybe in the form of ‘who doesn’t have any toolbar enabled’? Some people in ruwiki are making quite a big deal out of feature that seemingly wasn’t used that much, but previous analysis here wasn’t made for us.

Sadly, no. Because we removed the preference, any statistics I pull from the database will be incomplete – any user that has touched their preferences (e.g. enabled a gadget) since the code went live on Thursday and again on Monday will have normalised their settings to drop this option. I can generate some quick numbers if you want, but every user that's noticed, is unhappy, and has done something to fix it for themselves will not be counted, which will be misleading.

In the other direction, counting users who have the 2010 wikitext editor disabled will inflate the numbers quite a lot (from memory, on wikis I looked at, there were lots more users who opted out of both the 2010 and 2006 editors than who opted out of the 2010 one but were using the 2006 one).

TheDJ added a comment.EditedNov 8 2018, 8:46 AM

Discussion was moved from tech wishlist to https://meta.wikimedia.org/wiki/Wikimedia_Forum#mw.toolbar_zurück in an attempt to stop the disruption of that process.

Elitre removed a subscriber: Elitre.Nov 8 2018, 4:40 PM
TheDJ removed a subscriber: TheDJ.Nov 8 2018, 8:55 PM

After this toolbar was removed MediaWiki core will come without any editing interface. An idea I do not really fancy. Isn't it time to merge WikiEditor into core now that it was stripped from unmaintainable code? Yeah, it is to easy to install and invoke WikiEdior but this is not my point.

I agree with this comment. Having no edit toolbar without installing an extension is weird.

Stryn removed a subscriber: Stryn.Nov 9 2018, 5:54 AM
GeoffreyT2000 added a subscriber: GeoffreyT2000.

After this toolbar was removed MediaWiki core will come without any editing interface. An idea I do not really fancy. Isn't it time to merge WikiEditor into core now that it was stripped from unmaintainable code? Yeah, it is to easy to install and invoke WikiEdior but this is not my point.

I agree with this comment. Having no edit toolbar without installing an extension is weird.

This request is now available at T209217.

Liuxinyu970226 awarded a token.
Liuxinyu970226 added a subscriber: TheDJ.EditedNov 17 2018, 8:06 AM

@TheDJ

Discussion was moved from tech wishlist to https://meta.wikimedia.org/wiki/Wikimedia_Forum#mw.toolbar_zurück in an attempt to stop the disruption of that process.

It's now re-added to another wishlist: https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2019/Editing/Put_mw.toolbar_back, which is now the 6TH wishlist item.