Page MenuHomePhabricator

Rename generic classes in WikiEditor classes to use a common prefix
Open, MediumPublic

Description

Various classes of WikiEditor are poorely named.

There are classes with way too general names like "label", "tool", "group" etc. which obviously interact with site/user defined styles elsewhere.

There was a consensus that all MediaWiki user interface classes will be prefixed with mw- or mwe- to prevent this.

From these two reasons all these classes must be renamed.

Details

Reference
bz42190

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:11 AM
bzimport added a project: WikiEditor.
bzimport set Reference to bz42190.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

Various classes of WikiEditor are poorely named.

Which ones? List welcome, otherwise it's impossible to define when this bug report has been fixed.

(In reply to comment #1)

(In reply to comment #0)

Various classes of WikiEditor are poorely named.

Which ones? List welcome, otherwise it's impossible to define when this bug
report has been fixed.

The example list is just one line lower ;-)

And I'm pretty sure devs will know all of them.

Another solution would be to define explicitely all commonly used properties for these generally named classes to ensure nothing is inherited.

(In reply to comment #2)

pretty sure devs will know all of them.

This makes it unnecessarly complicated for patch contributors that are not devs (yet).

(In reply to comment #4)

(In reply to comment #2)

pretty sure devs will know all of them.

This makes it unnecessarly complicated for patch contributors that are not devs
(yet).

As I stated above - the example list of those I found while debugging another bug, is there. And I don't know the full list either, there is no documentation I would be aware of including such list, so anybody would have to dive into the code to find all of them.

Krinkle set Security to None.
Krinkle removed a subscriber: Unknown Object (MLST).

Is it still worth it to rename the jQuery UI-based classes, or should this just be handled by porting the toolbar to OOUI?

Krinkle renamed this task from Rename WikiEditor classes with generic names to use mw- or mwe- prefixes or redefine them more complexly to Rename generic classes in WikiEditor classes to use a common prefix.Apr 13 2022, 2:01 PM
Krinkle updated the task description. (Show Details)