On Mon, Jul 22, 2013 at 6:49 PM, Brian Wolff bawolff@gmail.com wrote:
Really? Given the number of inane preferences in Special:Preferences (I'm looking at you preference to disable sending 304 status codes), this is where we're going to draw the line?
A preference for this seems fairly reasonable in my opinion. Especially given that visual editor is not at a fully feature complete state yet (For example, its not enabled in the project namespace as far as I understand)
This.
I'm usually the first person in line to kill preferences, but I agree with Brian and Tim here and I think you're making a huge mistake here. This isn't a preference that changes absolutely anything, it just &disables* functionality. So everyone is aware of how much code is required to support this, I'll reproduce it below:
<<< VisualEditor.hooks.php // User has the 'visualeditor-enable' preference set $skin->getUser()->getOption( 'visualeditor-enable', /*default=*/ false, // HACK: Allows us to suppress the option in preferences when it's on for all. /*ignoreHidden=*/ true ) && [snip] public static function onGetPreferences( $user, &$preferences ) { $preferences['visualeditor-enable'] = array( 'type' => 'toggle', 'label-message' => 'visualeditor-preference-enable', 'section' => 'editing/beta' ); return true; } VisualEditor.hooks.php;
That's it. There's nothing complex about this....the first part is included in a large if block that already checks for browser support and so forth, and looks pretty simple. The latter is boilerplate preference stuff.
Considering we've never made any plans to kill the source editor (or is that all a farce as well?), then there's no other functionality that VE has to take care of. If a user doesn't want the preference, let them turn it off and then VE can go about its business.
Again, I'm usually the first to say "yes, kill the preference" but really we've got a dozen more screwed up preferences and this one is completely sane. I'll also mention it seems to have overwhelming support from both the community as well as some other developers.
-Chad