Page MenuHomePhabricator

Unable to remove certain defer-loaded booklet class of index/page components from the WikiEditor toolbar
Open, LowPublicBUG REPORT


In an attempt to whittle down the number of language-specific character-sets listed under the 'Special characters' tab of WikiEditor, I've come to the conclusion the only way to modify the default is remove the entire booklet and rebuild it with only the desired language-specific sets [Ughhh... ]

Using 'greek' as an example for removal from the toolbar, I've tried various combinations of parameter(s) and their value(s) to try and achieve this using, among many others...

  • { 'section': 'characters', 'group': 'greek', 'tool': 'greek' }
  • { 'section': 'characters', 'group': 'greek', 'page': 'greek' }
  • { 'section': 'characters', 'group': 'greek', 'pages': 'greek' }
  • { 'section': 'characters', 'index': 'greek', 'tool': 'greek' }
  • { 'section': 'characters', 'index': 'greek', 'page': 'greek' }
  • { 'section': 'characters', 'index': 'greek', 'pages': 'greek' }
  • { 'section': 'characters', 'group': 'index', 'tool': 'greek' }
  • { 'section': 'characters', 'group': 'index', 'page': 'greek' }
  • { 'section': 'characters', 'group': 'index', 'pages': 'greek' }
  • { 'section': 'characters', 'page': 'greek' }
  • { 'section': 'characters', 'pages': 'greek' }
  • ... and anything else I could think of along those lines or based on proven examples of manipulating non-booklet toolbar types...

... with no luck. I can remove the entire booklet and "rebuild" it with only the wanted sets, but that doesn't seem right, does it?

In short, is there a current inability to remove single language-sets that are built on 'index' & 'page' -like parameters from an exisiting booklet even possible (i.e. this is a real Bug),


... is it just a matter of exactly how-to-do-it being undocumented (well 'undocumented' to the best of my searching around that is)?

Version: master
Severity: major

related: T126138

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:31 AM
bzimport added a project: WikiEditor.
bzimport set Reference to bz68791.
bzimport added a subscriber: Unknown Object (MLST).

I got it to work in my master checkout (with Firefox web developer tools) with ($textarea was the name I gave to the textbox jQuery object):

$textarea.wikiEditor("removeFromToolbar", {"section": "characters", "page": "greek"});

The API documentation for WikiEditor is definitely a mess. The only reason I knew how to do it was that I just wrote a QUnit test for the toolbar.

Odd; I had tried that particular variant before (listed above) and again just now with no such luck -- the Greek character set is still being generated here.

Curious; I'm wondering if 'deferLoad': true, line -- found in the part that builds the character booklet in jquery.wikiEditor.toolbar.config.js -- is somehow screwing-up or superseding my local User: common.js' load order maybe?

... And as an aside to your poor documentation comment -- there has got to be a better way to customizing the WikiEditor toolbar in general than allowing it to completely build itself using all the defaults first only to remove/manipulate those defaults afterwards locally. Developers need to realize the ease of such abilities is key to projects other than Wikipedia -- where the fundamental mission & tasks are frequently completely the opposite of theirs.

deferLoad, from what I can tell, defers the generation of the controls until they are needed on the page. There's no page to delete!

PS I neglected to mention that I got it to work with Firefox's developer tools after loading the page. The user-script method fails for me as well.

Now that the language-character sets no longer "reside" in the WikiEditor extension (see T91608), any chance that it is somehow now possible to prevent the loading of unwanted or specific [booklet]sets or is deferLoad=true still the crux of the problem here?

Change 226676 had a related patch set uploaded (by Gerrit Patch Uploader):
Wikieditor: Rework deferred building of toolbar

Change 226676 merged by jenkins-bot:
Wikieditor: Rework deferred building of toolbar

TheDJ assigned this task to Schnark.
TheDJ removed a project: Patch-For-Review.
TheDJ set Security to None.

@TheDJ , have you tried to remove a booklet page or prevent one from loading successfully? I'm still not able to pull this off.

If you can, please share with us how to remove the Greek character set as an example per the task description.

If you can't, please re-open this task.

GOIII renamed this task from Unable to remove individual booklet-pages from loading to the toolbar to Unable to remove certain defer-loaded booklet class of index/page components from the WikiEditor toolbar.Apr 3 2016, 8:37 AM
GOIII reopened this task as Stalled.
GOIII updated the task description. (Show Details)
GOIII added a subscriber: Krinkle.

Change 268968 had a related patch set uploaded (by GOIII):
Remove deferred loading of the toolbar

Aklapper changed the task status from Stalled to Open.May 10 2020, 9:00 AM

@GOIII: The previous comments don't explain what/who exactly this task is stalled on ("If a report is waiting for further input (e.g. from its reporter or a third party) and can currently not be acted on"). Hence resetting task status to "Open".

Aklapper added a subscriber: Schnark.

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See for tips how to best manage your individual work in Phabricator.)

Aklapper triaged this task as Low priority.Feb 4 2022, 8:07 PM
Aklapper changed the subtype of this task from "Task" to "Bug Report".