Last modified: 2014-07-21 10:52:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67575, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65575 - Make hidden "usecodeeditor" preference visible, and do serve the CodeEditor on the relevant pages if switched on
Make hidden "usecodeeditor" preference visible, and do serve the CodeEditor o...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
CodeEditor (Other open bugs)
master
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-21 09:18 UTC by Lupo
Modified: 2014-07-21 10:52 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lupo 2014-05-21 09:18:21 UTC
Since https://git.wikimedia.org/commit/mediawiki%2Fextensions%2FCodeEditor/0c172d6359d1aaeacb0648c93932e736e02efdb2 it is no longer possible to switch on *only* CodeEditor, without switching on WikiEditor ("enhanced toolbar") on all other pages.

Related: bug 45850, bug 46779, bug 55936

There's a new hidden user preference "usecodeeditor", tied to the "enhanced toolbar" preference. The current behavior is that unless "enhanced toolbar" is enabled, the CodeEditor will not be active.

However, there's absolutely no reason for this. I have "enhanced toolbar" OFF, but I do want to use the CodeEditor. Although the MediaWiki UI (via Special:Preferences) gives me no way of doing that, I can actually get this by

1. Switching on the hidden preference by running the following once, for instance from my browser's console:

  api.postWithToken('options', {action: 'options', optionname: 'usecodeeditor',
optionvalue: 1});

2. Loading the CodeEditor myself in common.js through mw.loader.load('ext.codeEditor'); if I'm editing a JS/CSS/Module page

That works: I do not get the "enhanced toolbar" on normal article editing (as desired), but I do get the CodeEditor on code pages (also as desired).

This shows that there is absolutely no functional reason not to allow this.

Therefore, I ask that:

* In Special:Preferences the now hidden preference "usecodeeditor" be made visible and settable independently from the "enhanced toolbar" preference. (Possibly default-enabled when the user enables the "enhanced toolbar".) In any case, it must be possibly to set "enhanced toolbar" to OFF and "usecodeeditor" to ON. 

* The CodeEditor JS is served automatically on relevant pages (JS/CSS/LUA modules) if that "usecodeeditor" preference is switched on.

Note that I don't care whether the CodeEditor uses the enhanced toolbar or not. It does, and for me, that's fine. "usecodeeditor" just means "use the code editor on code pages, including whatever it needs to work, including the enhanced toolbar if it needs that", while the "enhanced toolbar" pref just means "use the enhanced toolbar for normal editing".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links