Page MenuHomePhabricator

Style of links added by mw.util.addPortletLink is not consistent with other links on Vector skin
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

var x = mw.util.addPortlet('foo');
$(x).insertAfter( '#p-navigation' );
mw.util.addPortletLink('foo', '#', 'New portlet link');
mw.util.addPortletLink('foo', '#', 'New portlet link 2');

What happens?:
The style of the new links is different from the existing ones:

actual.png (885×554 px, 115 KB)

What should have happened instead?:
New and existing links should have the same style:

expected.png (885×554 px, 118 KB)

Event Timeline

Thank you! This worked:

const p = mw.util.addPortlet( 'foo', 'Foo portlet', '#p-interaction' );
mw.util.addPortletLink('foo', '#', 'New portlet link');
mw.util.addPortletLink('foo', '#', 'New portlet link 2');
if ( p ) { p.parentNode.appendChild(p); }