Page MenuHomePhabricator

Minerva does not have rules for .mw-editsection-like
Open, LowPublicBUG REPORT

Assigned To
None
Authored By
Izno
Sep 26 2025, 9:16 PM
Project Tags
Referenced Files
F105864204: Screenshot 2026-10-02 at 11.38.46 AM.png
Fri, Oct 2, 6:57 PM
F66702075: image.png
Sep 26 2025, 9:16 PM
F66702079: image.png
Sep 26 2025, 9:16 PM

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Vector 2022 and most other skins display with padding left of the "edit section" links. Minerva does not.

Vector 2022:

image.png (562×290 px, 29 KB)

Minerva:

image.png (564×467 px, 52 KB)

(Ignore that the footer is in the "wrong place", I have some order for that box that puts it above the main documentation.)

What should have happened instead?:
Minerva should.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Most other skins seem to import or have directly something like mediawiki.skinning/interface-edit-section-links.less#23. Minerva probably doesn't for any of a number of reasonable reasons. On wiki the documentation module (and other places) use the mw-editsection-like class to style things similarly to how edit section links are styled in skins that aren't Minerva (without being the core section edit link, which is mw-editsection).

Event Timeline

Jdlrobson-WMF moved this task from Incoming to Backlog on the Reader Experience Team board.

Now that Module:Documentation was changed to fix the issues arising from T268900, this became more important to fix. (Tbh consistency between skins seems like a better solution than avoiding to include a fairly small Less file.)

I don't think this is going to be a popular answer (sorry in advance!) but I don't see this as a stable interface for templates to use. Given the few use cases, I think it would be better if this had its own styling in the template and it's only class.

I don't see the value in shipping styles for .mw-editsection-like for all mobile users, for a skin that doesn't use those styles just for a few template files. Most pages it will go unused...

Feel free to convince me I'm wrong with a compelling argument.

https://en.wikipedia.org/w/index.php?search=insource%3A%2Fmw-editsection-like%2F&title=Special%3ASearch&profile=advanced&fulltext=1&ns10=1&ns828=1
https://global-search.toolforge.org/?q=mw-editsection-like&regex=1&namespaces=10&title=

It is there precisely to be a "stable interface" for users who want to mark up things that look like an edit button. That's why it's in many skins *and* core *and* extensions. Minerva is the odd one out here.

It is really something how the advent of stable interface policy just introduced the way for the WMF to refuse to make common-sense changes or not to break things unnecessarily with no advance notice. This is, of course, a stable interface in every sense of the term, and it should be supported by all skins in some form.

It is there precisely to be a "stable interface" for users who want to mark up things that look like an edit button. That's why it's in many skins *and* core *and* extensions. Minerva is the odd one out here.

Most of the usages here seem to be test cases or skins implementing styling? TemplateData and DiscussionTools seems to be the only extension using it like a stable API. In the case of the latter it intentionally makes the feature desktop only. This actually supports the idea that this shouldn't be considered a stable interface IMO.

On the other hand we have https://www.mediawiki.org/wiki/Manual:Hooks/SkinEditSectionLinks which specifically encourages changing the markup which is why Minerva is the "odd one out" - it specifically converts any child of mw-editsection to a button icon. That's why there is no equivalent

Minerva is the majority of our traffic. We are not going to load CSS for all page views that would be unused for the majority of our page views and it doesn't make sense to tie implementation to skins built over 10 years ago.

So my question to you is what solution here can we land on that doesn't involve Minerva adding CSS that's unused for every other page view?

Some options as I see it are:

  1. Drop the mw-editsection-like class and hardcode [ and | characters so these look identical in desktop and mobile. Why do these need to be done in CSS and tied to MediaWiki core if the look and feel is important?
  1. Recognize that icons would be better for the look and feel of Minerva and add markup that adds those icons (and hide corresponding labels with CSS). Perhaps this could involve some kind of parser function that generates edit links and runs the https://www.mediawiki.org/wiki/Manual:Hooks/SkinEditSectionLinks hook for mobile to turn them into icon buttons? This seems like it would be much more stable than relying on a class?

Example (quickly hacked together - would need to update icon margins)

Screenshot 2026-10-02 at 11.38.46 AM.png (1,736×1,150 px, 289 KB)