https://bugzilla.wikimedia.org/show_bug.cgi?id=65575

            Bug ID: 65575
           Summary: Make hidden "usecodeeditor" preference visible, and do
                    serve the CodeEditor on the relevant pages if switched
                    on
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: CodeEditor
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
       Web browser: ---
   Mobile Platform: ---

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to