Merge "New table of contents icon, prepare for arrow->expand rename"

This commit is contained in:
jenkins-bot 2019-09-09 19:25:29 +00:00 committed by Gerrit Code Review
commit 53ad4bac32
5 changed files with 18 additions and 4 deletions

View file

@ -124,7 +124,10 @@ class MinervaTemplate extends BaseTemplate {
$args = [
'clockIconClass' => MinervaUI::iconClass( 'clock', 'before' ),
'arrowIconClass' => MinervaUI::iconClass(
'arrow-gray', 'element', 'mw-ui-icon-small mf-mw-ui-icon-rotate-anti-clockwise indicator',
'expand-gray', 'element',
// FIXME: `mw-ui-icon-mf-arrow-gray` can be removed from list of classes
// when Ibbc706146710a9e31a72b3c2cd4e247d7a227488 lands.
'mw-ui-icon-small mf-mw-ui-icon-rotate-anti-clockwise indicator mw-ui-icon-mf-arrow-gray',
// Uses icon in MobileFrontend so must be prefixed mf.
// Without MobileFrontend it will not render.
// Rather than maintain 2 versions (and variants) of the arrow icon which can conflict

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>table of contents</title><path d="M19 5H1V3h18v2zm0 10H1v2h18v-2zm-4-6H1v2h14V9z" fill-rule="evenodd" clip-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 257 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>table of contents</title><path d="M1 3h18v2H1V3zm0 14h18v-2H1v2zm4-6h14V9H5v2z" fill-rule="evenodd" clip-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 255 B

View file

@ -152,7 +152,7 @@
$bar = $lastModifiedLink.closest( '.last-modified-bar' );
$bar.addClass( 'active' );
$bar.find( '.mw-ui-icon-minerva-clock' ).addClass( 'mw-ui-icon-minerva-clock-invert' );
$bar.find( '.mw-ui-icon-mf-arrow-gray' ).addClass( 'mw-ui-icon-mf-arrow-invert' );
$bar.find( '.mw-ui-icon-mf-expand-gray' ).addClass( 'mw-ui-icon-mf-expand-invert' );
}
msg = time.getLastModifiedMessage( ts, username, gender, historyUrl );
$lastModifiedLink.replaceWith( msg );
@ -348,12 +348,15 @@
// setup toc icons
new Icon( {
glyphPrefix: 'mf',
glyphPrefix: 'minerva',
name: 'toc'
} ).$el.prependTo( '.toctitle' );
new Icon( {
glyphPrefix: 'mf',
name: 'arrow',
name: 'expand',
// FIXME: `additionalClassNames` for backwards compatibility.
// Can be removed when Ibbc706146710a9e31a72b3c2cd4e247d7a227488 lands.
additionalClassNames: 'mw-ui-icon-mf-arrow',
isSmall: true
} ).$el.appendTo( '.toctitle' );
} );

View file

@ -316,6 +316,12 @@
}
},
"images": {
"toc": {
"file": {
"ltr": "resources/skins.minerva.icons.images/toc-ltr.svg",
"rtl": "resources/skins.minerva.icons.images/toc-rtl.svg"
}
},
"watch": "resources/skins.minerva.icons.images/watch.svg",
"watched": "resources/skins.minerva.icons.images/watched.svg",
"warning": "resources/skins.minerva.icons.images/warning.svg",