dokuwiki / dokuwiki

The DokuWiki Open Source Wiki Engine
http://www.dokuwiki.org
GNU General Public License v2.0
4.19k stars 856 forks source link

Unique identifiers for Editor toolbar buttons #4335

Open saschaleib opened 3 weeks ago

saschaleib commented 3 weeks ago

The editor toolbar is a dynamic set of buttons (some of them with sub-menus) that can be extended by plugins, and that are essential for the user-experience when editing the wiki pages.

To customize the experience, template authors, but also site admins, may want to customize the existing buttons, e.g. by hiding certain options (e.g. the underline format may not be compatible with some organizations' accessibility guidelines), or they want to replace the images with other ones that fit the look and feel of the template, etc.

At the moment, this is rather clumsy to do, and may lead to unexpected side effects (see e.g. this issue), mostly because there is no reliably way to address the various buttons for modification.

To remedy this, I suggest to simply use the already-existing possibility to give each button an id attribute. A pull request for this change is already in preparation.

saschaleib commented 3 weeks ago

A proposed change has been created as a pull-request. See above for the code.

As a bonus, I have also modified the CSS of the default template to create "groups" of similar buttons by adding extra space between some of them (along with adapted rounded corners). This will certainly help to improve usability of these buttons.

And for good measure I have also added a small amount of extra padding to the buttons, to make the buttons easier to use on today's larger screens. This is a subtle change as to not break the general look and feel, but should also work to improve usability here.