Page MenuHomePhabricator

Remove "Enable section editing via [edit] links" user preference from MediaWiki core
Closed, ResolvedPublic

Description

The "Enable section editing via [edit] links" user preference should be removed from MediaWiki core.

Users interested in hiding section-edit links can use per-user (or site-wide) CSS.

This should be an easy bug to resolve; marking it with the Bugzilla keyword
accordingly.


Version: 1.22.0
Severity: enhancement

Details

Reference
bz52811

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:12 AM
bzimport set Reference to bz52811.

I would like to prepare a patch for this bug. Please assign it to me.

Change 99171 had a related patch set uploaded by 01tonythomas:
Removed "Enable section editing via [edit] links" from Mediawiki Preference.

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

Just for the record:

<jorm> Can we just agree from this day forward that "put it in your user css" is not an acceptable solution for any problem, ever?

From https://bugzilla.wikimedia.org/quips.cgi?action=show

Maybe the relevant code form the parser itself can also be removed?

(In reply to comment #3)

Maybe the relevant code form the parser itself can also be removed?

I'm not sure what you mean here.

Brian's caution (asking some up to date stats) makes sense, however it should be noted that AFAIK this preference is mainly a relic of the ancient past when section editing was the last new thing. :) Maybe we'll need this preference again if VisualEditor ever finds some magic to allow section editing again. :P

Change 99171 abandoned by 01tonythomas:
Removed "Enable section editing via [edit] links" from preferences

Reason:
Rebase errors persistant :(

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

Change 108673 had a related patch set uploaded by 01tonythomas:
Removed "Enable section editing via [edit] links" from preferences

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

Change 99171 restored by 01tonythomas:
Removed "Enable section editing via [edit] links" from preferences

Reason:
Errors in Rebasing.
Restoring for further tests..

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

Change 108673 abandoned by 01tonythomas:
Removed "Enable section editing via [edit] links" from preferences

Reason:
Abandoned: Original patchset at :
https://gerrit.wikimedia.org/r/#/c/99171/

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

Change 99171 merged by jenkins-bot:
Removed "Enable section editing via [edit] links" from preferences

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

This is nonsense. It should not have been removed.

comment #0 says: "Users interested in hiding section-edit links can use per-user (or site-wide) CSS."

Exactly.

So there will be gadget created on sites to enable hiding. (because Jorm is totally true with 'Can we just agree from this day forward that "put it in your user css" is not an acceptable solution for any problem, ever?'

And gadgets are what? Saved in preferences. Hence we are where we were.

See comment 0 and comment 5 for reasoning, plus this request ("Remove ... user preference") is obviously FIXED as the code commit has been merged. :)

I don't think this specific bug report is the place for a generic "I want less popular ancient options to be removed from the user preferences to reduce UI clutter" vs. "I want less people to have to edit their custom CSS or write Gadgets to do X" discussion - should maybe happen on mediawiki-l instead if there is interest.

However I agree that statistics on how many users have enabled such a setting might be helpful for future evaluation when killing some preferences.

(In reply to Danny B. from comment #11)

This is nonsense. It should not have been removed.

Why's that?

So there will be gadget created on sites to enable hiding.

Out of curiosity, has this happened anywhere?

(In reply to MZMcBride from comment #13)

(In reply to Danny B. from comment #11)

This is nonsense. It should not have been removed.

Why's that?

Described in the last line of comment #11.

So there will be gadget created on sites to enable hiding.

Out of curiosity, has this happened anywhere?

Yes.

(In reply to Danny B. from comment #14)

Described in the last line of comment #11.

The last line of comment 11 is:

And gadgets are what? Saved in preferences. Hence we are where we were.

Sure, but most users and most wikis don't want or need an extra user preference for this. These links are automatically shown based on user permission and they're able to be hidden on a site-wide basis, on a per-page basis, and on a per-user basis. I don't see a need for a user preference here. What's the use-case, exactly? Why would a user want to hide these links for only their account?

Regarding gadgets specifically, a few wikis might create such a gadget, but I doubt it. The overall MediaWiki experience (including that of most Wikimedia wikis) will have less clutter. This seems like a win to me.

Out of curiosity, has this happened anywhere?

Yes.

Where? Links welcome. :-)

troyengel wrote:

I'm not a MediaWiki guru to be able to figure this out, but with the 1.23 release I can't figure out how to disable this again. It's referenced above:

"Users interested in hiding section-edit links can use per-user (or site-wide) CSS."

Great, but can someone update documentation on exactly *how* to do this? In my LocalSettings.php I have the old setting which is apparently ignored now:

$wgDefaultUserOptions ['editsection'] = false;

I've dumped the DB and grepped and find only one reference to 'noeditsection' in the data, and my user account still shows the [Edit] on sections. The wiki indicates nothing about this change yet:

http://www.mediawiki.org/wiki/Manual:$wgDefaultUserOptions

Can one of y'all please post exactly what needs to go where to disable site-wide this feature for anonymous, new and previous (logged in) users so that this change removing the feature can be put back into CSS?

I'd be happy to update the above wiki page if someone just tells me *how* to go about it as a low-speed wiki operator who doesn't live & breathe this code. Thanks!

(In reply to TE from comment #16)

Can one of y'all please post exactly what needs to go where to disable
site-wide this feature for anonymous, new and previous (logged in) users so
that this change removing the feature can be put back into CSS?

You can try adding the following code to the page "MediaWiki:Common.css" on your wiki (untested, but should work...):

.mw-editsection { display: none; }

troyengel wrote:

Got it -- I had to add !important, so this works:

.mw-editsection { display:none!important; }

I'll get the wiki page updated with the new method, thanks!