mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-13 17:57:06 +00:00
9f2ca0d072
To complete the refactor, the Portal is also refactored as a Menu using the getMenu function. An old code path supporting portals outputted by hooks with strings is marked as deprecated to simplify this code in future. array-portals-first -> data-portals-first (the value is not an array) Changes: * $this->getLanguages and $this->getToolbox() always returns an array (see BaseTemplate) but we previously supported portals made using raw HTML. Let's move away from that behaviour and deprecate it. * Hooks are moved into buildSidebarProps and marked as deprecated where possible (SkinTemplateToolboxEnd). SidebarBeforeOutput can be used instead. Bug: T249372 Change-Id: I2549af3e24e5d51c09e9a88ca50a0d9b2e154c3f
27 lines
908 B
JavaScript
27 lines
908 B
JavaScript
import mustache from 'mustache';
|
|
import '../.storybook/common.less';
|
|
import '../resources/skins.vector.styles/Sidebar.less';
|
|
import '../resources/skins.vector.styles/SidebarLogo.less';
|
|
import '../resources/skins.vector.styles/MenuPortal.less';
|
|
import { sidebarTemplate, SIDEBAR_DATA, SIDEBAR_TEMPLATE_PARTIALS } from './Sidebar.stories.data';
|
|
|
|
export default {
|
|
title: 'Sidebar'
|
|
};
|
|
|
|
export const sidebarWithNoPortals = () => mustache.render(
|
|
sidebarTemplate, SIDEBAR_DATA.withNoPortals, SIDEBAR_TEMPLATE_PARTIALS
|
|
);
|
|
|
|
export const sidebarWithoutLogo = () => mustache.render(
|
|
sidebarTemplate, SIDEBAR_DATA.withoutLogo, SIDEBAR_TEMPLATE_PARTIALS
|
|
);
|
|
|
|
export const sidebarWithPortals = () => mustache.render(
|
|
sidebarTemplate, SIDEBAR_DATA.withPortals, SIDEBAR_TEMPLATE_PARTIALS
|
|
);
|
|
|
|
export const sidebarThirdParty = () => mustache.render(
|
|
sidebarTemplate, SIDEBAR_DATA.thirdParty, SIDEBAR_TEMPLATE_PARTIALS
|
|
);
|