Page MenuHomePhabricator

With VisualEditor beta-disabled, pipes are missing on other extensions using SkinEditSectionLinks
Open, LowPublic1 Estimated Story Points


So basically I wrote this using the SkinEditSectionLinks hook, which adds "hide" next to the edit link:

Without VE, or with VE turned on, everything works great. But if VE is marked as a beta feature and disabled by the user, the edit section looks like:

Header name [ edithidehide all]

It still works, but the lack of spacing between the words is less than awesome.

Apparently this is the offending CSS rule...

.ve-not-available .mw-editsection-divider {
    display: none;

Can you rewrite VE so it can play nicely with other extensions please? Thanks.

Event Timeline

Jdforrester-WMF changed the task status from Open to Stalled.Oct 4 2016, 7:11 PM
Jdforrester-WMF subscribed.

I don't understand. mw-editsection-divider is an internal CSS class for use by VE, it's not designed to be an API on which you can rely. You want us to alter VE's behaviour so you can alter it in a different way? What do you think we should do instead?

(All this code is going to be upstreamed into MediaWiki eventually, at which point it'll work rather differently; see T120414.)

labster changed the task status from Stalled to Open.Oct 5 2016, 2:52 AM

I don't understand. How is mw-editsection-divider an internal class for VE if it's in includes/skins/Skin.php? And if SkinEditSectionLinks is not a public API, why is it mentioned in docs/hooks.txt as replacement for a different public API?

The change I want is really simple: Don't assign that CSS rule I mentioned in the first post. That's it. I suspect that it's entirely unnecessary under MW 1.27 anyway, given VisualEditor.hooks.php line 434 -- there's no reason to hide dividers if they're never inserted into the document.

Err yeah, we should just be able to remove that CSS rule - it shouldn't be needed after the introduction of the SkinEditSectionLinks hook in 1.25.

Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.

Ah, interesting, we upstreamed that CSS class a little prematurely. Let's fix that.

Is there any progress on this task? There are some cases in which adding dividers with common, default styles should be very helpful to end-users (user scripts etc.), so why is .mw-editsection-divider 1) an internal class of VisualEditor, 2) doesn’t have any styles and is hidden by default if VisualEditor is turned off?

I had come across the need to display two links in mw-editsection and there is no current way to use this class outside of working with VE. I mean, it’s not even VE-specific thing to have two links in mw-editsection.