[MediaWiki-commits] [Gerrit] Remove font-size: 1em on body element. - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/206641 Change subject: Remove font-size: 1em on body element. .. Remove font-size: 1em on body element. It masks the 14px definition in bootstrap and would not do anything anyway because 1em = "the current font size" Change-Id: I41bbc993289402d43e160a776c9dbfd0a871b023 --- M resources/master.less 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/41/206641/1 diff --git a/resources/master.less b/resources/master.less index 8ac2287..5a6479c 100644 --- a/resources/master.less +++ b/resources/master.less @@ -2,7 +2,6 @@ body { color: #333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-size: 1em; -webkit-font-smoothing: antialiased; } -- To view, visit https://gerrit.wikimedia.org/r/206641 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41bbc993289402d43e160a776c9dbfd0a871b023 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Bootstrap FOUC - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/206635 Change subject: Fix Bootstrap FOUC .. Fix Bootstrap FOUC Change-Id: I7a4878450bd2416347f13787dfc913725674288b --- M Blueprint.php M src/SkinBlueprint.php 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/35/206635/1 diff --git a/Blueprint.php b/Blueprint.php index b884b20..cd6ba84 100644 --- a/Blueprint.php +++ b/Blueprint.php @@ -54,6 +54,11 @@ 'remoteSkinPath' => 'Blueprint/lib/bootstrap', 'group' => 'skin.blueprint', 'scripts' => 'bootstrap.min.js', + ), + 'ext.bootstrap.styles' => array( + 'localBasePath' => __DIR__ . "/lib/bootstrap", + 'remoteSkinPath' => 'Blueprint/lib/bootstrap', + 'group' => 'skin.blueprint', 'styles' => 'bootstrap.min.css', ), 'skin.blueprint.styles' => array( diff --git a/src/SkinBlueprint.php b/src/SkinBlueprint.php index 399585b..8ddc4b9 100755 --- a/src/SkinBlueprint.php +++ b/src/SkinBlueprint.php @@ -12,6 +12,6 @@ public function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles( array( 'skin.blueprint.styles' ) ); + $out->addModuleStyles( array( 'ext.bootstrap', 'skin.blueprint.styles' ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/206635 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a4878450bd2416347f13787dfc913725674288b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add #wikimedia-design configuration - change (labs...grrrit)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/205222 Change subject: Add #wikimedia-design configuration .. Add #wikimedia-design configuration Change-Id: I1e0a611e8cfcecd8a467224eb718577122400a13 --- M config.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/22/205222/1 diff --git a/config.yaml b/config.yaml index bd86264..df1820e 100644 --- a/config.yaml +++ b/config.yaml @@ -85,6 +85,12 @@ # These are sent to #brickimedia too "mediawiki/extensions/MediaWikiChat" } +"#wikimedia-design": { +"mediawiki/skins/Blueprint", +"mediawiki/extensions/OOUIPlayground", +"mediawiki/extensions/Popups", +"oojs/oojs-ui" +} "#wikimedia-fundraising": mediawiki/extensions/DonationInterface: mediawiki/extensions/CentralNotice: -- To view, visit https://gerrit.wikimedia.org/r/205222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e0a611e8cfcecd8a467224eb718577122400a13 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Blueprint skin to notify list for #wikimedia-design - change (labs...wikibugs2)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/205221 Change subject: Add Blueprint skin to notify list for #wikimedia-design .. Add Blueprint skin to notify list for #wikimedia-design Change-Id: I2d54eda3541c24b7ecd1d41e2fc761f7d8ee27e8 --- M channels.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikibugs2 refs/changes/21/205221/1 diff --git a/channels.yaml b/channels.yaml index b584314..0f7d16d 100644 --- a/channels.yaml +++ b/channels.yaml @@ -156,6 +156,7 @@ - WMF-Design - WMF-Design-Research - UI-Standardization +- mediawiki-skins-Blueprint "#xtools": - Tool-Labs-xTools -- To view, visit https://gerrit.wikimedia.org/r/205221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d54eda3541c24b7ecd1d41e2fc761f7d8ee27e8 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/wikibugs2 Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up blueprint left nav: make it configurable and fix di... - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/205217 Change subject: Clean up blueprint left nav: make it configurable and fix display when on a page not in the left nav .. Clean up blueprint left nav: make it configurable and fix display when on a page not in the left nav Change-Id: Icfd60fcb6f229f6c535121cc27cd88f6b4c5207e --- M Blueprint.php A i18n/en.json A i18n/qqq.json M resources/toc.js M src/BlueprintSkinTemplate.php 5 files changed, 46 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/17/205217/1 diff --git a/Blueprint.php b/Blueprint.php index b884b20..692dc0e 100644 --- a/Blueprint.php +++ b/Blueprint.php @@ -84,17 +84,4 @@ $wgValidSkinNames['blueprint'] = 'Blueprint'; -$wgBlueprintLeftNav = array( - 'Main Page', - 'Buttons', - 'Inputs', - 'Selects', - 'Checks, radios and toggles', - 'Guiders', - 'Progress and loading indicators', - 'Dialogs', - 'Form layouts', - 'Animation', - 'Content views', - 'FAQ', -); +$wgMessagesDirs['OOUIPlayground'] = __DIR__ . '/i18n'; diff --git a/i18n/en.json b/i18n/en.json new file mode 100644 index 000..e44a6d5 --- /dev/null +++ b/i18n/en.json @@ -0,0 +1,3 @@ +{ + "blueprint-left-nav": "* [[Main Page]]\n" +} diff --git a/i18n/qqq.json b/i18n/qqq.json new file mode 100644 index 000..b9e22a9 --- /dev/null +++ b/i18n/qqq.json @@ -0,0 +1,3 @@ +{ + "blueprint-left-nav": "List of links to show in the left navigation for the skin" +} diff --git a/resources/toc.js b/resources/toc.js index ad3b535..f99bfd7 100644 --- a/resources/toc.js +++ b/resources/toc.js @@ -7,5 +7,6 @@ $( '#toc' ) .detach() + .addClass( 'sidebar-toc' ) .appendTo( $appendTo ); } ); diff --git a/src/BlueprintSkinTemplate.php b/src/BlueprintSkinTemplate.php index 0ab7181..e301658 100755 --- a/src/BlueprintSkinTemplate.php +++ b/src/BlueprintSkinTemplate.php @@ -3,22 +3,47 @@ class BlueprintSkinTemplate extends LightNCandyTemplate { public function execute() { global $wgBlueprintLeftNav; - $this->data['left_nav_sections'] = array_map( - function($title) { - $title = Title::newFromText( $title ); - return array( - 'text' => $title->getPrefixedText(), - 'title' => $title, - 'url' => $title->getFullUrl(), - 'current' => $title->equals( Title::newFromText( $this->data['title'] ) ), - ); - }, - $wgBlueprintLeftNav - ); - // die( var_dump( $this->data['left_nav_sections'] ) ); + + $this->data['left_nav_sections'] = $this->getLeftNav(); + return parent::execute(); } + protected function getLeftNav() { + global $wgMemc; + + $cacheKey = wfMemcKey( 'blueprint', 'left-nav' ); + + $cacheVal = false; + // $cacheVal = $wgMemc->get( $cacheKey ); + if ( $cacheVal ) { + return $cacheVal; + } else { + $text = wfMessage( 'blueprint-left-nav' )->plain(); + $leftNav = array(); + $line_regex = '/^[#*]\s*\[\[([^\[\]\|]+)(?:\|([^\[\]\|]+))?\]\]$/'; + + foreach( explode( "\n", $text ) as $line ) { + $matches = null; + if ( preg_match( $line_regex, $line, $matches ) ) { + $title = Title::newFromText( $matches[1] ); + $text = isset( $matches[2] ) ? $matches[2] : $matches[1]; + + $leftNav[] = array( + 'text' => $text, + 'title' => $title, + 'url' => $title->getFullUrl(), + 'current' => $title->equals( Title::newFromText( $this->data['title'] ) ), + ); + } + } + + $wgMemc->set( $cacheKey, $leftNav, 300 ); // Cache for five minutes + + return $leftNav; + } + } + public function getTemplate() { $templating = new SimpleLightNCandy( __DIR__ . '/../templates' ); -- To view, visit https://gerrit.wikimedia.org/r/205217 To unsubscribe, visit https://gerrit.wikimedia.org/r/setting
[MediaWiki-commits] [Gerrit] Fix blue border for open menus - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/204813 Change subject: Fix blue border for open menus .. Fix blue border for open menus Change-Id: I5dc2113fab4d62a82e9278be9086ef1156431a06 --- M resources/master.less 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/13/204813/1 diff --git a/resources/master.less b/resources/master.less index 2cdabb1..8ac2287 100644 --- a/resources/master.less +++ b/resources/master.less @@ -271,3 +271,8 @@ margin-left: 0.75em; } } + +.nav li.open.open > a { + // Override bootstrap + border-color: @side-menu-border-color; +} -- To view, visit https://gerrit.wikimedia.org/r/204813 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5dc2113fab4d62a82e9278be9086ef1156431a06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a site-wide TOC and place the normal TOC inside it - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/204765 Change subject: Add a site-wide TOC and place the normal TOC inside it .. Add a site-wide TOC and place the normal TOC inside it Change-Id: I2bc60752ad9df4c6843cb1de0f801e990920cf4e --- M Blueprint.php M resources/toc.js M src/BlueprintSkinTemplate.php M templates/sidebar.template 4 files changed, 47 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/65/204765/1 diff --git a/Blueprint.php b/Blueprint.php index 469594a..6176aa0 100644 --- a/Blueprint.php +++ b/Blueprint.php @@ -83,3 +83,18 @@ require_once __DIR__."/vendor/autoload.php"; $wgValidSkinNames['blueprint'] = 'Blueprint'; + +$wgBlueprintLeftNav = array( + 'Introduction', + 'Buttons', + 'Inputs', + 'Selects', + 'Checks, radios and toggles', + 'Guiders', + 'Progress and loading indicators', + 'Dialogs', + 'Form layouts', + 'Animation', + 'Content views', + 'FAQ', +); diff --git a/resources/toc.js b/resources/toc.js index ee3aef0..c9ddcc9 100644 --- a/resources/toc.js +++ b/resources/toc.js @@ -1,5 +1,11 @@ $( function () { + var $appendTo = $( '#side-menu .left-nav-active' ); + + if ( ! $appendTo.length ) { + $appendTo = $( '#side-menu' ); + } + $( '#toc' ) .detach() - .appendTo( $( '#side-menu' ) ); + .appendTo( $appendTo ); } ); diff --git a/src/BlueprintSkinTemplate.php b/src/BlueprintSkinTemplate.php index eab3502..e798443 100755 --- a/src/BlueprintSkinTemplate.php +++ b/src/BlueprintSkinTemplate.php @@ -1,6 +1,22 @@ data['left_nav_sections'] = array_map( + function($title) { + $title = Title::newFromText( $title ); + return array( + 'text' => $title->getPrefixedText(), + 'title' => $title, + 'url' => $title->getFullUrl(), + 'current' => $title->equals( $this->data['title'] ), + ); + } + ); + parent::execute(); + } + public function getTemplate() { $templating = new SimpleLightNCandy( __DIR__ . '/../templates' ); diff --git a/templates/sidebar.template b/templates/sidebar.template index 0123057..b57aea1 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -23,3 +23,12 @@ + +{{#each left_nav_sections}} + + + {{text}} + + +{{/each}} + -- To view, visit https://gerrit.wikimedia.org/r/204765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bc60752ad9df4c6843cb1de0f801e990920cf4e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Adjust padding above TOC - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/204720 Change subject: Adjust padding above TOC .. Adjust padding above TOC Change-Id: I40d5d9bc7c85fb899a2f4dc1743f3107990cb88c --- M resources/master.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/20/204720/1 diff --git a/resources/master.less b/resources/master.less index 9b0e42e..1684bc2 100644 --- a/resources/master.less +++ b/resources/master.less @@ -137,7 +137,7 @@ #toc { font-weight: 200; font-size: 0.8em; - margin-top: 60px; + margin-top: 17px; // 32px - 10px (padding on ul) - 5px (padding on li) #toctitle { display: none; -- To view, visit https://gerrit.wikimedia.org/r/204720 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40d5d9bc7c85fb899a2f4dc1743f3107990cb88c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Styling updates after conversation with May - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/204325 Change subject: Styling updates after conversation with May .. Styling updates after conversation with May Change-Id: I26940c717ff5381dd3e6690f032d93a5423710e0 --- M resources/master.less 1 file changed, 22 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/25/204325/1 diff --git a/resources/master.less b/resources/master.less index 0102160..9b0e42e 100644 --- a/resources/master.less +++ b/resources/master.less @@ -6,25 +6,16 @@ } a { - color: #2B5ECF; + color: @side-menu-bg-color; } -h1 { - font: 3em 'Georgia', 'Times', serif; +h1.firstHeading { + font: 28px 'Georgia', 'Times', serif; font-weight: bold; line-height: 1.25; padding: 0; margin: 0; - margin-top: 1em; - - .content-actions { - float: right; - - a { - text-align: right; - font: 0.5em sans-serif; - } - } + margin-top: 32px; } h2 { @@ -53,6 +44,10 @@ margin-top: 50px; } +#content.container { + padding-left: 22px; // 32px minus 10px margin added in menu.js +} + .example_container { margin: 2em 0; padding: 1em; @@ -60,22 +55,25 @@ } /* Typography */ +@side-menu-border-color: #225196; +@side-menu-bg-color: #265bb2; + /* Offscreen Navigation */ #side-menu { width: 420px; height: 100%; position: fixed; overflow-y: auto; - border-top: 1px solid #2860B2; + border-top: 1px solid @side-menu-border-color; top: 50px; left: 0; z-index: 0; - background-color: #2B5ECF; + background-color: @side-menu-bg-color; display: none; color: #fff; h1 { - margin: 50px; + margin: 32px 50px; padding: 0; font-size: 2em; } @@ -101,17 +99,17 @@ ul.content-links { - padding: 0 50px 20px 50px; + padding: 0 50px 27px 50px; margin-top: 30px; - border-bottom: 1px solid #2860B2; + border-bottom: 1px solid @side-menu-border-color; li { padding: 5px 0; a { display: inline-block; - padding: 3px 0 3px 70px; - font-size: 0.8em; + padding-left: 70px; + font-size: 16px; background-repeat: no-repeat; background-position: center left; } @@ -176,7 +174,7 @@ border-bottom: 1px solid #eee; .navbar-brand { - background-color: #2B5ECF; + background-color: @side-menu-bg-color; color: #fff; text-transform: uppercase; font-size: 0.9em; @@ -226,18 +224,18 @@ /* Navbar */ #toc-toggle { - background-color: #2B5ECF; + background-color: @side-menu-bg-color; background-image: url( 'menu-clicked.svg' ); background-position: center center; background-repeat: no-repeat; padding: 25px; - border-right: 1px solid #2860B2; + border-right: 1px solid @side-menu-border-color; } #extra-space { width: 0; height: 50px; - background-color: #2B5ECF; + background-color: @side-menu-bg-color; } -- To view, visit https://gerrit.wikimedia.org/r/204325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26940c717ff5381dd3e6690f032d93a5423710e0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] OOUIPlayground display updates - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/204026 Change subject: OOUIPlayground display updates .. OOUIPlayground display updates * (T95660) Style code snippets. * Fix styling for language switch. Bug: T95660 Change-Id: I9c1c9c91c0b208b1848248efddaff2d0a111ef3a --- M resources/display.less 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/26/204026/1 diff --git a/resources/display.less b/resources/display.less index ec20db5..6ee93eb 100644 --- a/resources/display.less +++ b/resources/display.less @@ -11,5 +11,19 @@ .ooui-playground-language-selector { font-size: 80%; - line-height: 2em; + + .oo-ui-labelElement-label { + padding: 0 2px; + } + + .oo-ui-optionWidget-selected .oo-ui-labelElement-label { + border: 1px inset #f8f8f8; + } +} + +.ooui-playground-code .mw-geshi { + background-color: #f8f8f8; + font-size: 0.8em; + padding: 1.25em; + word-wrap: break-word; } -- To view, visit https://gerrit.wikimedia.org/r/204026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c1c9c91c0b208b1848248efddaff2d0a111ef3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix example script: - change (mediawiki...OAuth)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/204022 Change subject: Fix example script: .. Fix example script: * Needs namespace. * Needs CURLOPT_FOLLOWLOCATION Change-Id: I8fc893b22e693b7287154f1387a57a917e8fa02b --- M examples/testClient.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/22/204022/1 diff --git a/examples/testClient.php b/examples/testClient.php index b949257..511a948 100644 --- a/examples/testClient.php +++ b/examples/testClient.php @@ -1,5 +1,7 @@ https://gerrit.wikimedia.org/r/204022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8fc893b22e693b7287154f1387a57a917e8fa02b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Reimplement code rendering. - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/203816 Change subject: [WIP] Reimplement code rendering. .. [WIP] Reimplement code rendering. * Also includes wide-ranging fixes for tests. * Still needs the special handling for FieldLayouts. Bug: T88028 Change-Id: If76e4f152c9b21257649dc43b7732eaec51e3810 --- M autoload.php M composer.json M i18n/en.json M includes/CodeRenderer.php M includes/OOUILightNCandy.php M includes/ParserHooks.php M includes/WidgetInfo.php A includes/WidgetRepository.php A includes/code-printers/ExecutableCodePrinter.php A includes/code-printers/ICodePrinter.php A includes/code-printers/JavascriptCodePrinter.php A includes/code-printers/PHPCodePrinter.php A includes/code-printers/RecursiveCodePrinter.php A includes/code-printers/TemplateCodePrinter.php M includes/container.php M resources/Resources.php M resources/display.js A tests/phpunit/CodePrinterTest.php M tests/phpunit/CodeRendererTest.php M tests/phpunit/GroupElementFilterTest.php D tests/phpunit/TemplatingTest.php M tests/phpunit/WidgetDocumenterTest.php M tests/phpunit/WidgetFactoryTest.php M tests/phpunit/WidgetInfoTest.php M tests/phpunit/WidgetRepositoryTest.php 25 files changed, 648 insertions(+), 188 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/16/203816/1 diff --git a/autoload.php b/autoload.php index a1d165c..c25c5e9 100644 --- a/autoload.php +++ b/autoload.php @@ -1,19 +1,23 @@ __DIR__ . '/includes/argument-filters/ArgumentFilter.php', 'OOUIPlayground\\ArgumentFilterInterface' => __DIR__ . '/includes/argument-filters/ArgumentFilter.php', + 'OOUIPlayground\\CodeUnprintableException' => __DIR__ . '/includes/code-printers/ICodePrinter.php', 'OOUIPlayground\\ConfiguredCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\Container' => __DIR__ . '/includes/ContainerAccess.php', 'OOUIPlayground\\DeferredGroupElementFilter' => __DIR__ . '/includes/argument-filters/DeferredGroupElementFilter.php', + 'OOUIPlayground\\ExecutableCodePrinter' => __DIR__ . '/includes/code-printers/ExecutableCodePrinter.php', 'OOUIPlayground\\FlagsFilter' => __DIR__ . '/includes/argument-filters/FlagsFilter.php', 'OOUIPlayground\\GeSHICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\GroupElementFilter' => __DIR__ . '/includes/argument-filters/GroupElementFilter.php', + 'OOUIPlayground\\ICodePrinter' => __DIR__ . '/includes/code-printers/ICodePrinter.php', 'OOUIPlayground\\ICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\InvalidGroupElementItemException' => __DIR__ . '/includes/argument-filters/GroupElementFilter.php', + 'OOUIPlayground\\JavascriptCodePrinter' => __DIR__ . '/includes/code-printers/JavascriptCodePrinter.php', 'OOUIPlayground\\MockFilter' => __DIR__ . '/tests/phpunit/mocks/MockFilter.php', 'OOUIPlayground\\MultiCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\MultiGeSHICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', @@ -23,14 +27,17 @@ 'OOUIPlayground\\NullCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\OOUILightNCandy' => __DIR__ . '/includes/OOUILightNCandy.php', 'OOUIPlayground\\OOUIStatic' => __DIR__ . '/includes/OOUILightNCandy.php', + 'OOUIPlayground\\PHPCodePrinter' => __DIR__ . '/includes/code-printers/PHPCodePrinter.php', 'OOUIPlayground\\ParserHooks' => __DIR__ . '/includes/ParserHooks.php', 'OOUIPlayground\\PreCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\RecursiveArgumentFilter' => __DIR__ . '/includes/argument-filters/ArgumentFilter.php', + 'OOUIPlayground\\RecursiveCodePrinter' => __DIR__ . '/includes/code-printers/RecursiveCodePrinter.php', 'OOUIPlayground\\SubitemFilter' => __DIR__ . '/includes/argument-filters/SubitemFilter.php', + 'OOUIPlayground\\TemplateCodePrinter' => __DIR__ . '/includes/code-printers/TemplateCodePrinter.php', 'OOUIPlayground\\WidgetDocumenter' => __DIR__ . '/includes/WidgetDocumenter.php', 'OOUIPlayground\\WidgetFactory' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\WidgetInfo' => __DIR__ . '/includes/WidgetInfo.php', - 'OOUIPlayground\\WidgetRepository' => __DIR__ . '/includes/WidgetInfo.php', + 'OOUIPlayground\\WidgetRepository' => __DIR__ . '/includes/WidgetRepository.php', 'OOUI\\DeferredWidget' => __DIR__ . '/includes/DeferredWidget.php', 'OOUI\\MockGroupWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', 'OOUI\\MockWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', diff --git a/composer.json b/composer.json index 5a6e5de..e17d7e4 100644 --- a/composer.j
[MediaWiki-commits] [Gerrit] Make the location of sitematrix.json configurable - change (mediawiki...parsoid)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/202695 Change subject: Make the location of sitematrix.json configurable .. Make the location of sitematrix.json configurable Change-Id: I02b0c56fff8dbd396fa515b8b6711f61ec944c3f --- M api/localsettings.js.example M lib/mediawiki.ParsoidConfig.js 2 files changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/95/202695/1 diff --git a/api/localsettings.js.example b/api/localsettings.js.example index 99e3a54..a6679f0 100644 --- a/api/localsettings.js.example +++ b/api/localsettings.js.example @@ -18,6 +18,10 @@ // 'enwikivoyage' etc. (default true) //parsoidConfig.loadWMF = false; + // If you are using the above setting, you can also specify the path + // of the sitematrix.json file to load wikis from. + //parsoidConfig.wmfConfigPath = './sitematrix.json'; + // A default proxy to connect to the API endpoints. Default: undefined // (no proxying). Overridden by per-wiki proxy config in setInterwiki. //parsoidConfig.defaultAPIProxyURI = 'http://proxy.example.org:8080'; diff --git a/lib/mediawiki.ParsoidConfig.js b/lib/mediawiki.ParsoidConfig.js index 561db50..006fd4f 100644 --- a/lib/mediawiki.ParsoidConfig.js +++ b/lib/mediawiki.ParsoidConfig.js @@ -7,8 +7,7 @@ require('./core-upgrade.js'); var url = require('url'), Cite = require('./ext.Cite.js').Cite, - Util = require('./mediawiki.Util.js').Util, - sitematrix = require('./sitematrix.json').sitematrix; + Util = require('./mediawiki.Util.js').Util; /** @@ -28,10 +27,13 @@ this.reverseIWMap = new Map(); this.apiProxies = new Map(); this.interwikiRegexp = ""; + this.wmfConfigPath = './sitematrix.json'; if ( localSettings && localSettings.setup ) { localSettings.setup( this ); } + + this.sitematrix = require(this.wmfConfigPath); // Don't freak out! // This happily overwrites inherited properties. @@ -274,8 +276,8 @@ // of null / undefined in setInterwiki. var self = this; - Object.keys( sitematrix ).forEach(function( key ) { - var val = sitematrix[key]; + Object.keys( this.sitematrix ).forEach(function( key ) { + var val = this.sitematrix[key]; if ( !Number.isNaN( Number(key) ) ) { val.site.forEach(insertInMaps.bind(self, undefined)); } else if ( key === "specials" ) { -- To view, visit https://gerrit.wikimedia.org/r/202695 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02b0c56fff8dbd396fa515b8b6711f61ec944c3f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T93890: Allow intention flags for non-buttons - change (oojs/ui)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/201147 Change subject: T93890: Allow intention flags for non-buttons .. T93890: Allow intention flags for non-buttons Change-Id: I12f0a07b827692ce3c3fb4bec6a82e207b359255 --- M src/themes/mediawiki/MediaWikiTheme.js 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/47/201147/1 diff --git a/src/themes/mediawiki/MediaWikiTheme.js b/src/themes/mediawiki/MediaWikiTheme.js index e5b15b1..be2371b 100644 --- a/src/themes/mediawiki/MediaWikiTheme.js +++ b/src/themes/mediawiki/MediaWikiTheme.js @@ -29,10 +29,12 @@ destructive: false }, // Parent method - classes = OO.ui.MediaWikiTheme.super.prototype.getElementClasses.call( this, element ); + classes = OO.ui.MediaWikiTheme.super.prototype.getElementClasses.call( this, element ), + isFramed; - if ( element.supports( [ 'isFramed', 'isDisabled', 'hasFlag' ] ) ) { - if ( element.isFramed() && ( element.isDisabled() || element.hasFlag( 'primary' ) ) ) { + if ( element.supports( [ 'hasFlag' ] ) ) { + isFramed = element.supports( [ 'isFramed' ] ) && element.isFramed(); + if ( isFramed && ( element.isDisabled() || element.hasFlag( 'primary' ) ) ) { variants.invert = true; } else { variants.progressive = element.hasFlag( 'progressive' ); -- To view, visit https://gerrit.wikimedia.org/r/201147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12f0a07b827692ce3c3fb4bec6a82e207b359255 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable VisualEditor for Blueprint skin - change (mediawiki...VisualEditor)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199904 Change subject: Enable VisualEditor for Blueprint skin .. Enable VisualEditor for Blueprint skin Change-Id: I72df35a440ec382befc03f18f41d47ced8f01079 --- M VisualEditor.php M extension.json 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/04/199904/1 diff --git a/VisualEditor.php b/VisualEditor.php index f23170d..bb78cea 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -1611,7 +1611,7 @@ $wgVisualEditorEnableTocWidget = false; // List of skins VisualEditor integration supports -$wgVisualEditorSupportedSkins = array( 'vector', 'apex', 'monobook', 'minerva' ); +$wgVisualEditorSupportedSkins = array( 'vector', 'apex', 'monobook', 'minerva', 'blueprint' ); // List of browsers VisualEditor is incompatibe with // See jQuery.client for specification diff --git a/extension.json b/extension.json index 68af33f..2f1838f 100644 --- a/extension.json +++ b/extension.json @@ -30,7 +30,8 @@ "vector", "apex", "monobook", - "minerva" + "minerva", + "blueprint" ], "VisualEditorParsoidPrefix": "localhost", "VisualEditorDisableForAnons": false, -- To view, visit https://gerrit.wikimedia.org/r/199904 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I72df35a440ec382befc03f18f41d47ced8f01079 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Complete renaming of LSG skin to Blueprint - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199890 Change subject: Complete renaming of LSG skin to Blueprint .. Complete renaming of LSG skin to Blueprint Change-Id: I2d8c441b77dc97dcb68a72cf15e211ff6d91ea4e --- A Blueprint.php M LivingStyleGuide.php M README.md M autoload.php R src/BlueprintSkinTemplate.php A src/SkinBlueprint.php D src/SkinLivingStyleGuide.php 7 files changed, 103 insertions(+), 99 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/90/199890/1 diff --git a/Blueprint.php b/Blueprint.php new file mode 100644 index 000..cc17dac --- /dev/null +++ b/Blueprint.php @@ -0,0 +1,74 @@ + __FILE__, + 'name' => 'Blueprint', + 'url' => 'http://gerrit.wikimedia.org/r/p/mediawiki/skins/Blueprint', + 'author' => array( + 'Andrew Garrett', + 'Prateek Saxena', + ), +); + +$styleguideSkinResourceTemplate = array( + 'localBasePath' => __DIR__ . "/resources", + 'remoteSkinPath' => 'Blueprint/resources', + 'group' => 'skin.blueprint', +); + +$wgResourceModules += array( + 'skin.blueprint.styles' => array( + 'styles' => 'master.less', + 'position' => 'top', + ) + $styleguideSkinResourceTemplate, + 'skin.blueprint' => array( + 'scripts' => 'menu.js', + ) + $styleguideSkinResourceTemplate, +); + +$wgResourceModuleSkinStyles['blueprint'] = array( + // Apply original Tipsy styles + 'jquery.tipsy' => array( + 'tipsy.original.less', + 'tipsy.override.less', + ), + 'remoteSkinPath' => 'Blueprint/skinStyles', + 'localBasePath' => __DIR__ . '/skinStyles', +); + +require_once __DIR__."/autoload.php"; +require_once __DIR__."/vendor/autoload.php"; + +$wgValidSkinNames['blueprint'] = 'Blueprint'; diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index d392861..d6f0788 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -1,73 +1,3 @@ __FILE__, - 'name' => 'LivingStyleGuideSkin', - 'url' => 'URL to extension information', - 'author' => array( - 'Andrew Garrett', - ), -); - -$styleguideSkinResourceTemplate = array( - 'localBasePath' => __DIR__ . "/resources", - 'remoteSkinPath' => 'LivingStyleGuide/resources', - 'group' => 'skin.livingstyleguide', -); - -$wgResourceModules += array( - 'skin.styleguide.styles' => array( - 'styles' => 'master.less', - 'position' => 'top', - ) + $styleguideSkinResourceTemplate, - 'skin.styleguide' => array( - 'scripts' => 'menu.js', - ) + $styleguideSkinResourceTemplate, -); - -$wgResourceModuleSkinStyles['livingstyleguide'] = array( - // Apply original Tipsy styles - 'jquery.tipsy' => array( - 'tipsy.original.less', - 'tipsy.override.less', - ), - 'remoteSkinPath' => 'LivingStyleGuide/skinStyles', - 'localBasePath' => __DIR__ . '/skinStyles', -); - -require_once __DIR__."/autoload.php"; -require_once __DIR__."/vendor/autoload.php"; - -$wgValidSkinNames['livingstyleguide'] = 'LivingStyleGuide'; +die( "LivingStyleGuide skin has been renamed to Blueprint. Please update your configuration" ); diff --git a/README.md b/README.md index 29cc0a3..435d9d6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# LivingStyleGuideSkin +# Blueprint MediaWiki skin for the the living styleguide. @@ -6,14 +6,14 @@ Clone the skin in `mediawiki/skins/` and install dependencies: ``` -$ git clone g...@github.com:werdnum/LivingStyleGuideSkin.git LivingStyleGuide -$ cd LivingStyleGuide +$ git clone https://gerrit.wikimedia.org/r/mediawiki/skins/Blueprint Blueprint +$ cd Blueprint $ composer install $ bower install ``` Enable and set the skin as default, add this to `LocalSettings.php`: ```php -require_once "$IP/skins/LivingStyleGuide/LivingStyleGuide.php"; -$wgDefaultSkin = "LivingStyleGuide"; -``` \ No newline at end of file +require_once "$IP/skins/Blueprint/Blueprint.php"; +$wgDefaultSkin = "blueprint"; +``` diff --git a/autoload.php b/autoload.php index fed42cd..245c206 100644 --- a/autoload.php +++ b/autoload.php @@ -1,9 +1,9 @@ __DIR__ . '/src/LivingStyleGuideSkinTemplate.php', - 'SkinLivingStyleGuide' => __DIR__ . '/src/SkinLivingStyleGuide.php', + 'BlueprintSkinTemplate' => __DIR__ . '/src/BlueprintSkinTemplate.php', + 'SkinBlueprint' => __DIR__ . '/src/SkinBlueprint.php', ); diff --git a/src/LivingStyleGuideSkinTemplate.php b/src/BlueprintSkinTemplate.php similarity index 84% rename from src/LivingStyleGuideSkinTemplate.php rename to src/BlueprintSkinTemplate.php index de9bef8..eab3502 100755 --- a/src/LivingStyleGuideSkinTemplate.php +++ b/src/BlueprintSkinTemplate.php @@ -1,6 +1,6 @@ addModules( array( 'skin.blueprint' )
[MediaWiki-commits] [Gerrit] Return to default tipsy styles in Blueprint - change (mediawiki...Blueprint)
Werdna has submitted this change and it was merged. Change subject: Return to default tipsy styles in Blueprint .. Return to default tipsy styles in Blueprint Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d --- M LivingStyleGuide.php A skinStyles/tipsy.original.less A skinStyles/tipsy.override.less 3 files changed, 51 insertions(+), 0 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 7f70eb7..d392861 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -57,6 +57,16 @@ ) + $styleguideSkinResourceTemplate, ); +$wgResourceModuleSkinStyles['livingstyleguide'] = array( + // Apply original Tipsy styles + 'jquery.tipsy' => array( + 'tipsy.original.less', + 'tipsy.override.less', + ), + 'remoteSkinPath' => 'LivingStyleGuide/skinStyles', + 'localBasePath' => __DIR__ . '/skinStyles', +); + require_once __DIR__."/autoload.php"; require_once __DIR__."/vendor/autoload.php"; diff --git a/skinStyles/tipsy.original.less b/skinStyles/tipsy.original.less new file mode 100644 index 000..14a31f5 --- /dev/null +++ b/skinStyles/tipsy.original.less @@ -0,0 +1,34 @@ +// Copied from https://raw.githubusercontent.com/jaz303/tipsy/master/src/stylesheets/tipsy.css +// And modified for additional specificity + +@tooltip-color: #333; + +body { + .tipsy { +font-size: 10px; position: absolute; padding: 5px; z-index: 10; +.tipsy-inner { background-color: @tooltip-color; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; } + +/* Rounded corners */ +.tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } + +/* Uncomment for shadow */ +/*.tipsy-inner { box-shadow: 0 0 5px #00; -webkit-box-shadow: 0 0 5px #00; -moz-box-shadow: 0 0 5px #00; }*/ + +.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed @tooltip-color; } + +/* Rules to colour arrows */ +.tipsy-arrow-n { border-bottom-color: @tooltip-color; } +.tipsy-arrow-s { border-top-color: @tooltip-color; } +.tipsy-arrow-e { border-left-color: @tooltip-color; } +.tipsy-arrow-w { border-right-color: @tooltip-color; } + + &.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} + &.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} +&.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } +&.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; } +&.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; } + } +} diff --git a/skinStyles/tipsy.override.less b/skinStyles/tipsy.override.less new file mode 100644 index 000..39d3f8c --- /dev/null +++ b/skinStyles/tipsy.override.less @@ -0,0 +1,7 @@ +body .tipsy { + font-size: 14px; + + .tipsy-inner { + border: none; + } +} -- To view, visit https://gerrit.wikimedia.org/r/199871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move navigation from sidebar to the navbar - change (mediawiki...Blueprint)
Werdna has submitted this change and it was merged. Change subject: Move navigation from sidebar to the navbar .. Move navigation from sidebar to the navbar Change-Id: Ia6b2cdba1b47f82c54c449cd6fdef5756dbad76e --- M resources/master.less M templates/Skin.php M templates/Skin.template M templates/sidebar.template 4 files changed, 29 insertions(+), 29 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/master.less b/resources/master.less index 2103e3b..aadce38 100644 --- a/resources/master.less +++ b/resources/master.less @@ -230,6 +230,21 @@ background-repeat: no-repeat, no-repeat; } + .navigation-menu { + border-right: 2px solid #eee; + min-width: 80px; + padding-left: 30px; + font-size: 0.9em; + background-image: url(caret-down.svg); + background-position: center right 10px; + background-repeat: no-repeat; + + span { + font-weight: bold; + text-transform: uppercase; + } + } + .dropdown-menu { border-left: 2px solid #eee; padding: 17px 30px; @@ -283,17 +298,6 @@ } } } - } - - a.navbar-brand { - border-right: 2px solid #eee; - display: inline-block; - height: 100%; - line-height: 50px; - padding: 0 20px; - color: #333; - text-transform: uppercase; - font-weight: bold; } } /* Navbar */ diff --git a/templates/Skin.php b/templates/Skin.php index 5d0f912..6e22787 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -221,18 +221,16 @@ - - Navigation - -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' - -';}).' '.' - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('sitename')), ENT_QUOTES, 'UTF-8').' + + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('sitename')), ENT_QUOTES, 'UTF-8').' + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' +';}).' + - {{sitename}} + + {{sitename}} + + {{#each sidebar.navigation}} + {{text}} + {{/each}} + + - -Navigation - - {{#each sidebar.navigation}} - - {{text}} - - {{/each}} - -- To view, visit https://gerrit.wikimedia.org/r/199880 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6b2cdba1b47f82c54c449cd6fdef5756dbad76e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add #bodyContent element, fixes VisualEditor - change (mediawiki...Blueprint)
Werdna has submitted this change and it was merged. Change subject: Add #bodyContent element, fixes VisualEditor .. Add #bodyContent element, fixes VisualEditor Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 --- M templates/Skin.php M templates/Skin.template 2 files changed, 8 insertions(+), 4 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/templates/Skin.php b/templates/Skin.php index 5d0f912..4874899 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -253,7 +253,7 @@ - Desktop + Desktop Mobile @@ -280,7 +280,9 @@ '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('undelete' ? ''.$cx['funcs']['v']($cx, $in, array('undelete')).' ' : '').''.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('newtalk' ? ''.htmlentities((string)$cx['funcs']['v']($cx, $in, array('newtalk')), ENT_QUOTES, 'UTF-8').' -' : '').' '.$cx['funcs']['v']($cx, $in, array('bodytext')).' +' : '').' + '.$cx['funcs']['v']($cx, $in, array('bodytext')).' + '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('printfooter' ? ' '.$cx['funcs']['v']($cx, $in, array('printfooter')).' @@ -293,4 +295,4 @@ '; } -?> +?> \ No newline at end of file diff --git a/templates/Skin.template b/templates/Skin.template index 8124965..fd46d99 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -70,7 +70,9 @@ {{#if newtalk}} {{newtalk}} {{/if}} - {{{bodytext}}} + + {{{bodytext}}} + {{#if printfooter}} {{{printfooter}}} -- To view, visit https://gerrit.wikimedia.org/r/199869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move navigation from sidebar to the navbar - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199880 Change subject: Move navigation from sidebar to the navbar .. Move navigation from sidebar to the navbar Change-Id: Ia6b2cdba1b47f82c54c449cd6fdef5756dbad76e --- M resources/master.less M templates/Skin.php M templates/Skin.template M templates/sidebar.template 4 files changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/80/199880/1 diff --git a/resources/master.less b/resources/master.less index 2103e3b..aadce38 100644 --- a/resources/master.less +++ b/resources/master.less @@ -230,6 +230,21 @@ background-repeat: no-repeat, no-repeat; } + .navigation-menu { + border-right: 2px solid #eee; + min-width: 80px; + padding-left: 30px; + font-size: 0.9em; + background-image: url(caret-down.svg); + background-position: center right 10px; + background-repeat: no-repeat; + + span { + font-weight: bold; + text-transform: uppercase; + } + } + .dropdown-menu { border-left: 2px solid #eee; padding: 17px 30px; @@ -283,17 +298,6 @@ } } } - } - - a.navbar-brand { - border-right: 2px solid #eee; - display: inline-block; - height: 100%; - line-height: 50px; - padding: 0 20px; - color: #333; - text-transform: uppercase; - font-weight: bold; } } /* Navbar */ diff --git a/templates/Skin.php b/templates/Skin.php index 5d0f912..6e22787 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -221,18 +221,16 @@ - - Navigation - -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' - -';}).' '.' - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('sitename')), ENT_QUOTES, 'UTF-8').' + + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('sitename')), ENT_QUOTES, 'UTF-8').' + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' +';}).' + - {{sitename}} + + {{sitename}} + + {{#each sidebar.navigation}} + {{text}} + {{/each}} + + - -Navigation - - {{#each sidebar.navigation}} - - {{text}} - - {{/each}} - -- To view, visit https://gerrit.wikimedia.org/r/199880 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6b2cdba1b47f82c54c449cd6fdef5756dbad76e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix height of ButtonOptionWidget from the theme - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199881 Change subject: Fix height of ButtonOptionWidget from the theme .. Fix height of ButtonOptionWidget from the theme In our current situation where we can't update the OOjs UI JavaScript code we are forcing the styling on the widget. This should be reverted soon! Change-Id: Idc64c849580857a6115ee2d55455b927c5d82ab5 --- M resources/master.less 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/81/199881/1 diff --git a/resources/master.less b/resources/master.less index 792fed9..1106dde 100644 --- a/resources/master.less +++ b/resources/master.less @@ -170,4 +170,10 @@ a { margin-left: 0.75em; } -} \ No newline at end of file +} + +/* HACK */ +.oo-ui-buttonOptionWidget .oo-ui-buttonElement-button { + height: auto !important; +} +/* HACK */ \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/199881 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc64c849580857a6115ee2d55455b927c5d82ab5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Return to default tipsy styles in Blueprint - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199871 Change subject: Return to default tipsy styles in Blueprint .. Return to default tipsy styles in Blueprint Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d --- M LivingStyleGuide.php A skinStyles/tipsy.original.less A skinStyles/tipsy.override.less 3 files changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/71/199871/1 diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 7f70eb7..d392861 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -57,6 +57,16 @@ ) + $styleguideSkinResourceTemplate, ); +$wgResourceModuleSkinStyles['livingstyleguide'] = array( + // Apply original Tipsy styles + 'jquery.tipsy' => array( + 'tipsy.original.less', + 'tipsy.override.less', + ), + 'remoteSkinPath' => 'LivingStyleGuide/skinStyles', + 'localBasePath' => __DIR__ . '/skinStyles', +); + require_once __DIR__."/autoload.php"; require_once __DIR__."/vendor/autoload.php"; diff --git a/skinStyles/tipsy.original.less b/skinStyles/tipsy.original.less new file mode 100644 index 000..14a31f5 --- /dev/null +++ b/skinStyles/tipsy.original.less @@ -0,0 +1,34 @@ +// Copied from https://raw.githubusercontent.com/jaz303/tipsy/master/src/stylesheets/tipsy.css +// And modified for additional specificity + +@tooltip-color: #333; + +body { + .tipsy { +font-size: 10px; position: absolute; padding: 5px; z-index: 10; +.tipsy-inner { background-color: @tooltip-color; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; } + +/* Rounded corners */ +.tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } + +/* Uncomment for shadow */ +/*.tipsy-inner { box-shadow: 0 0 5px #00; -webkit-box-shadow: 0 0 5px #00; -moz-box-shadow: 0 0 5px #00; }*/ + +.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed @tooltip-color; } + +/* Rules to colour arrows */ +.tipsy-arrow-n { border-bottom-color: @tooltip-color; } +.tipsy-arrow-s { border-top-color: @tooltip-color; } +.tipsy-arrow-e { border-left-color: @tooltip-color; } +.tipsy-arrow-w { border-right-color: @tooltip-color; } + + &.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} + &.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} +&.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } +&.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; } +&.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; } + } +} diff --git a/skinStyles/tipsy.override.less b/skinStyles/tipsy.override.less new file mode 100644 index 000..39d3f8c --- /dev/null +++ b/skinStyles/tipsy.override.less @@ -0,0 +1,7 @@ +body .tipsy { + font-size: 14px; + + .tipsy-inner { + border: none; + } +} -- To view, visit https://gerrit.wikimedia.org/r/199871 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add #bodyContent element, fixes VisualEditor - change (mediawiki...Blueprint)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199869 Change subject: Add #bodyContent element, fixes VisualEditor .. Add #bodyContent element, fixes VisualEditor Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 --- M templates/Skin.php M templates/Skin.template 2 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/69/199869/1 diff --git a/templates/Skin.php b/templates/Skin.php index 5d0f912..4874899 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -253,7 +253,7 @@ - Desktop + Desktop Mobile @@ -280,7 +280,9 @@ '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('undelete' ? ''.$cx['funcs']['v']($cx, $in, array('undelete')).' ' : '').''.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('newtalk' ? ''.htmlentities((string)$cx['funcs']['v']($cx, $in, array('newtalk')), ENT_QUOTES, 'UTF-8').' -' : '').' '.$cx['funcs']['v']($cx, $in, array('bodytext')).' +' : '').' + '.$cx['funcs']['v']($cx, $in, array('bodytext')).' + '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('printfooter' ? ' '.$cx['funcs']['v']($cx, $in, array('printfooter')).' @@ -293,4 +295,4 @@ '; } -?> +?> \ No newline at end of file diff --git a/templates/Skin.template b/templates/Skin.template index 8124965..fd46d99 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -70,7 +70,9 @@ {{#if newtalk}} {{newtalk}} {{/if}} - {{{bodytext}}} + + {{{bodytext}}} + {{#if printfooter}} {{{printfooter}}} -- To view, visit https://gerrit.wikimedia.org/r/199869 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add #bodyContent element, fixes VisualEditor - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199867 Change subject: Add #bodyContent element, fixes VisualEditor .. Add #bodyContent element, fixes VisualEditor Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 --- M templates/Skin.php M templates/Skin.template 2 files changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/67/199867/1 diff --git a/templates/Skin.php b/templates/Skin.php index 5d0f912..4874899 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -253,7 +253,7 @@ - Desktop + Desktop Mobile @@ -280,7 +280,9 @@ '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('undelete' ? ''.$cx['funcs']['v']($cx, $in, array('undelete')).' ' : '').''.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('newtalk' ? ''.htmlentities((string)$cx['funcs']['v']($cx, $in, array('newtalk')), ENT_QUOTES, 'UTF-8').' -' : '').' '.$cx['funcs']['v']($cx, $in, array('bodytext')).' +' : '').' + '.$cx['funcs']['v']($cx, $in, array('bodytext')).' + '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('printfooter' ? ' '.$cx['funcs']['v']($cx, $in, array('printfooter')).' @@ -293,4 +295,4 @@ '; } -?> +?> \ No newline at end of file diff --git a/templates/Skin.template b/templates/Skin.template index 8124965..fd46d99 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -70,7 +70,9 @@ {{#if newtalk}} {{newtalk}} {{/if}} - {{{bodytext}}} + + {{{bodytext}}} + {{#if printfooter}} {{{printfooter}}} -- To view, visit https://gerrit.wikimedia.org/r/199867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I705de99a2dc03ea97f2790b152570445490b6f06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make Parsoid work with multiwiki. - change (mediawiki/vagrant)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199591 Change subject: Make Parsoid work with multiwiki. .. Make Parsoid work with multiwiki. The implementation is not ideal: I could not figure out how to loop over defined wikis. But at least VisualEditor now works on multiwiki setups Change-Id: Ia553d4f8d7aa3cab53656755d119bd5d9d989295 --- M puppet/modules/mediawiki/templates/parsoid.localsettings.js.erb M puppet/modules/role/templates/ve-config.php.erb 2 files changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/91/199591/1 diff --git a/puppet/modules/mediawiki/templates/parsoid.localsettings.js.erb b/puppet/modules/mediawiki/templates/parsoid.localsettings.js.erb index ec668d2..a9f626d 100644 --- a/puppet/modules/mediawiki/templates/parsoid.localsettings.js.erb +++ b/puppet/modules/mediawiki/templates/parsoid.localsettings.js.erb @@ -3,7 +3,23 @@ * This file is managed by Puppet. */ exports.setup = function( parsoidConfig ) { -parsoidConfig.setInterwiki( 'localhost', '<%= scope["mediawiki::server_url"] %>/w/api.php' ); +<%- + # XXX: I wish I could think of a better way to do this + `alldbs`.split("\n").each do |db| +wikiname = db[0..-5] +if wikiname != '' then + # XXX I should be reading the resource config but I can't + # figure out how + server_url = 'http://' + +wikiname + +scope["mediawiki::multiwiki::base_domain"] + +scope["port_fragment"] +else + server_url = scope["mediawiki::server_url"] +end +-%> +parsoidConfig.setInterwiki( '<%=db%>', '<%=server_url%>/w/api.php' ); +<%- end %> parsoidConfig.usePHPPreProcessor = <%= @use_php_preprocessor %>; parsoidConfig.useSelser = <%= @use_selser %>; <%- if @allow_cors -%> diff --git a/puppet/modules/role/templates/ve-config.php.erb b/puppet/modules/role/templates/ve-config.php.erb index dac002b..74b6f6b 100644 --- a/puppet/modules/role/templates/ve-config.php.erb +++ b/puppet/modules/role/templates/ve-config.php.erb @@ -2,3 +2,4 @@ $wgVisualEditorNamespaces = array( NS_MAIN, NS_USER ); $wgDefaultUserOptions['visualeditor-enable'] = 1; $wgVisualEditorParsoidURL = 'http://localhost:<%= scope['mediawiki::parsoid::port'] %>'; +$wgVisualEditorParsoidPrefix = $wgDBname; -- To view, visit https://gerrit.wikimedia.org/r/199591 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia553d4f8d7aa3cab53656755d119bd5d9d989295 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change the ToC toggle button to a dedicated icon fixed to th... - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Change the ToC toggle button to a dedicated icon fixed to the side of the content .. Change the ToC toggle button to a dedicated icon fixed to the side of the content Design spec at M43 Change-Id: Iff766c43043131d6af8a33bc6bddc4fc4ff3bddd --- M resources/master.less A resources/menu-clicked.svg M resources/menu.js M resources/menu.svg M templates/Skin.php M templates/Skin.template 6 files changed, 37 insertions(+), 5 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/master.less b/resources/master.less index 51125cc..191886b 100644 --- a/resources/master.less +++ b/resources/master.less @@ -283,9 +283,6 @@ a.navbar-brand { border-right: 2px solid #eee; - background-image: url( 'menu.svg' ); - background-position: center left -10px; - background-repeat: no-repeat; display: inline-block; height: 100%; line-height: 50px; @@ -297,6 +294,25 @@ } /* Navbar */ +#toc-toggle { + display: block; + height: 24px; + width: 24px; + background-image: url( 'menu.svg' ); + background-position: center left; + background-repeat: no-repeat; + position: fixed; + top: 115px; + left: 110px; + transition: all 1s ease; + + &.clicked { + background-image: url( 'menu-clicked.svg' ); + top: 57px; + left: 20px; + } +} + /* MediaWiki Stuff */ @media screen { diff --git a/resources/menu-clicked.svg b/resources/menu-clicked.svg new file mode 100644 index 000..68bd648 --- /dev/null +++ b/resources/menu-clicked.svg @@ -0,0 +1,11 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> + + + + diff --git a/resources/menu.js b/resources/menu.js index 316af0a..b00224c 100644 --- a/resources/menu.js +++ b/resources/menu.js @@ -1,6 +1,7 @@ $( function () { - $( '.navbar-brand' ).click( function ( e ) { + $( '#toc-toggle' ).click( function ( e ) { e.preventDefault(); + $( this ).toggleClass( 'clicked' ); $( '#site-wrap' ).toggleClass( 'site-shift' ); } ); } ); diff --git a/resources/menu.svg b/resources/menu.svg index 5dbcb94..5b3bf26 100644 --- a/resources/menu.svg +++ b/resources/menu.svg @@ -4,7 +4,7 @@ http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> - diff --git a/templates/Skin.php b/templates/Skin.php index 5ee49f4..4a70dea 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -246,6 +246,8 @@ + + '.$cx['funcs']['v']($cx, $in, array('title')).' diff --git a/templates/Skin.template b/templates/Skin.template index 99a5b5a..5226fb8 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -40,6 +40,8 @@ + + {{{title}}} -- To view, visit https://gerrit.wikimedia.org/r/197501 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iff766c43043131d6af8a33bc6bddc4fc4ff3bddd Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Werdna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Copy content links (edit, history etc) to the sidebar - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Copy content links (edit, history etc) to the sidebar .. Copy content links (edit, history etc) to the sidebar Change-Id: Iebda84da6dbedce123276a24770fc06a8618be3b --- A resources/edit.svg A resources/history.svg M resources/master.less A resources/talk.svg A resources/view.svg M templates/Skin.php M templates/sidebar.template 7 files changed, 122 insertions(+), 1 deletion(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/edit.svg b/resources/edit.svg new file mode 100644 index 000..47a2e27 --- /dev/null +++ b/resources/edit.svg @@ -0,0 +1,11 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> + + + + diff --git a/resources/history.svg b/resources/history.svg new file mode 100644 index 000..9d740b3 --- /dev/null +++ b/resources/history.svg @@ -0,0 +1,14 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> + + + + diff --git a/resources/master.less b/resources/master.less index 96193cf..51125cc 100644 --- a/resources/master.less +++ b/resources/master.less @@ -105,6 +105,7 @@ z-index: 0; background-color: #2B5ECF; color: #fff; + padding: 50px; ul { list-style: none; @@ -119,6 +120,41 @@ } } } + + h1 { + margin: 0; + padding: 0; + font-size: 2em; + } + + ul.content-links { + padding: 0; + margin-top: 30px; + + li { + padding: 5px 0; + + a { + display: inline-block; + padding: 3px 0 3px 70px; + font-size: 0.8em; + background-repeat: no-repeat; + background-position: center left; + } + + #ca-view { + background-image: url(view.svg); + } + + #ca-edit { + background-image: url(edit.svg); + } + + #ca-history { + background-image: url(history.svg); + } + } + } } /* Offscreen Navigation */ diff --git a/resources/talk.svg b/resources/talk.svg new file mode 100644 index 000..19f5fcc --- /dev/null +++ b/resources/talk.svg @@ -0,0 +1,10 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> + + + + diff --git a/resources/view.svg b/resources/view.svg new file mode 100644 index 000..b9b863b --- /dev/null +++ b/resources/view.svg @@ -0,0 +1,18 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> + + + + diff --git a/templates/Skin.php b/templates/Skin.php index a75be41..5ee49f4 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -193,7 +193,22 @@ return ''.$cx['funcs']['v']($cx, $in, array('headelement')).' -'.'Navigation +'.''.htmlentities((string)$cx['funcs']['v']($cx, $in, array('title')), ENT_QUOTES, 'UTF-8').' + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('content_navigation','views')), $in, true, function($cx, $in) {return ' + + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' + + +';}).' + + + Navigation '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' diff --git a/templates/sidebar.template b/templates/sidebar.template index 9909ae2..18ddd5f 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -1,3 +1,20 @@ +{{t
[MediaWiki-commits] [Gerrit] Avoid name collision - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199229 Change subject: Avoid name collision .. Avoid name collision Change-Id: I2571caa2866821a2712c29b7ee984970a3c3a7fd --- M includes/container.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/29/199229/1 diff --git a/includes/container.php b/includes/container.php index 462fec9..055b711 100644 --- a/includes/container.php +++ b/includes/container.php @@ -3,10 +3,10 @@ namespace OOUIPlayground; use FormatJson; -use Pimple\Container; +use Pimple\Container as PimpleContainer; use SimpleLightNCandy; -$container = new Container; +$container = new PimpleContainer; $container['classMap'] = array( 'buttongroup' => array( -- To view, visit https://gerrit.wikimedia.org/r/199229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2571caa2866821a2712c29b7ee984970a3c3a7fd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change HTML comment to handlebars comment - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Change HTML comment to handlebars comment .. Change HTML comment to handlebars comment Change-Id: Ia5e3c3219656089da9d1769096f7fdd1a38b0cac --- M templates/Skin.php M templates/Skin.template 2 files changed, 23 insertions(+), 20 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/templates/Skin.php b/templates/Skin.php index a75be41..0083050 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -7,7 +7,6 @@ 'prop' => false, 'method' => false, 'mustlok' => true, -'mustsec' => true, 'echo' => false, 'debug' => $debugopt, ), @@ -28,7 +27,7 @@ 'blockhelpers' => array(), 'hbhelpers' => array(), 'partials' => array(), -'scopes' => array($in), +'scopes' => array(), 'sp_vars' => array('root' => $in), 'funcs' => array( 'v' => function ($cx, $base, $path) { @@ -60,10 +59,14 @@ return $v; } $count--; -if ($count >= 0) { -$base = $cx['scopes'][$count]; -} else { -return null; +switch ($count) { +case -1: +$base = $cx['sp_vars']['root']; +break; +case -2; +return null; +default: +$base = $cx['scopes'][$count]; } } }, @@ -76,7 +79,10 @@ $isObj = false; if ($isAry && $else !== null && count($v) === 0) { -return $else($cx, $in); +$cx['scopes'][] = $in; +$ret = $else($cx, $in); +array_pop($cx['scopes']); +return $ret; } // #var, detect input type is object or not @@ -140,13 +146,9 @@ return ''; } if ($isAry) { -if ($cx['flags']['mustsec']) { -$cx['scopes'][] = $v; -} +$cx['scopes'][] = $in; $ret = $cb($cx, $v); -if ($cx['flags']['mustsec']) { -array_pop($cx['scopes']); -} +array_pop($cx['scopes']); return $ret; } @@ -159,13 +161,16 @@ } if ($else !== null) { -return $else($cx, $in); +$cx['scopes'][] = $in; +$ret = $else($cx, $in); +array_pop($cx['scopes']); +return $ret; } return ''; }, 'ifvar' => function ($cx, $v) { -return !is_null($v) && ($v !== false) && ($v !== 0) && ($v !== '') && (is_array($v) ? (count($v) > 0) : true); +return !is_null($v) && ($v !== false) && ($v !== 0) && ($v !== 0.0) && ($v !== '') && (is_array($v) ? (count($v) > 0) : true); }, 'ch' => function ($cx, $ch, $vars, $op) { return $cx['funcs']['chret'](call_user_func_array($cx['helpers'][$ch], $vars), $op); @@ -217,10 +222,8 @@ - '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ''.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $cx['sp_vars'], array('first' ? ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' -' : '').'';}).' - +' : '').'';}).' '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' ';}).' diff --git a/templates/Skin.template b/templates/Skin.template index 99a5b5a..4a86cde 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -20,13 +20,13 @@ - + {{! HACK: personal_urls.0.text not working }} {{#each personal_urls}} {{#if @first}} {{text}} {{/if}} {{/each}} - + {{! /HACK }} {{#each personal_urls}} {{text}} -- To view, visit https://gerrit.wikimedia.org/r/199225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-M
[MediaWiki-commits] [Gerrit] Change HTML comment to handlebars comment - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199225 Change subject: Change HTML comment to handlebars comment .. Change HTML comment to handlebars comment Change-Id: Ia5e3c3219656089da9d1769096f7fdd1a38b0cac --- M templates/Skin.php M templates/Skin.template 2 files changed, 23 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/25/199225/1 diff --git a/templates/Skin.php b/templates/Skin.php index a75be41..0083050 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -7,7 +7,6 @@ 'prop' => false, 'method' => false, 'mustlok' => true, -'mustsec' => true, 'echo' => false, 'debug' => $debugopt, ), @@ -28,7 +27,7 @@ 'blockhelpers' => array(), 'hbhelpers' => array(), 'partials' => array(), -'scopes' => array($in), +'scopes' => array(), 'sp_vars' => array('root' => $in), 'funcs' => array( 'v' => function ($cx, $base, $path) { @@ -60,10 +59,14 @@ return $v; } $count--; -if ($count >= 0) { -$base = $cx['scopes'][$count]; -} else { -return null; +switch ($count) { +case -1: +$base = $cx['sp_vars']['root']; +break; +case -2; +return null; +default: +$base = $cx['scopes'][$count]; } } }, @@ -76,7 +79,10 @@ $isObj = false; if ($isAry && $else !== null && count($v) === 0) { -return $else($cx, $in); +$cx['scopes'][] = $in; +$ret = $else($cx, $in); +array_pop($cx['scopes']); +return $ret; } // #var, detect input type is object or not @@ -140,13 +146,9 @@ return ''; } if ($isAry) { -if ($cx['flags']['mustsec']) { -$cx['scopes'][] = $v; -} +$cx['scopes'][] = $in; $ret = $cb($cx, $v); -if ($cx['flags']['mustsec']) { -array_pop($cx['scopes']); -} +array_pop($cx['scopes']); return $ret; } @@ -159,13 +161,16 @@ } if ($else !== null) { -return $else($cx, $in); +$cx['scopes'][] = $in; +$ret = $else($cx, $in); +array_pop($cx['scopes']); +return $ret; } return ''; }, 'ifvar' => function ($cx, $v) { -return !is_null($v) && ($v !== false) && ($v !== 0) && ($v !== '') && (is_array($v) ? (count($v) > 0) : true); +return !is_null($v) && ($v !== false) && ($v !== 0) && ($v !== 0.0) && ($v !== '') && (is_array($v) ? (count($v) > 0) : true); }, 'ch' => function ($cx, $ch, $vars, $op) { return $cx['funcs']['chret'](call_user_func_array($cx['helpers'][$ch], $vars), $op); @@ -217,10 +222,8 @@ - '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ''.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $cx['sp_vars'], array('first' ? ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' -' : '').'';}).' - +' : '').'';}).' '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' ';}).' diff --git a/templates/Skin.template b/templates/Skin.template index 99a5b5a..4a86cde 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -20,13 +20,13 @@ - + {{! HACK: personal_urls.0.text not working }} {{#each personal_urls}} {{#if @first}} {{text}} {{/if}} {{/each}} - + {{! /HACK }} {{#each personal_urls}} {{text}} -- To view, visit https://gerrit.wikimedia.org/r/199225 To unsubscribe, vi
[MediaWiki-commits] [Gerrit] Move account menu from the sidebar to the navbar - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Move account menu from the sidebar to the navbar .. Move account menu from the sidebar to the navbar Change-Id: Ib318ccd28b21ecde504564738d45fd7414e3d1d8 --- A resources/caret-down.svg M resources/master.less A resources/user.svg M templates/Skin.php M templates/Skin.template M templates/sidebar.template 6 files changed, 117 insertions(+), 19 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/caret-down.svg b/resources/caret-down.svg new file mode 100644 index 000..e24f721 --- /dev/null +++ b/resources/caret-down.svg @@ -0,0 +1,11 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> + + + + diff --git a/resources/master.less b/resources/master.less index d74e8cb..96193cf 100644 --- a/resources/master.less +++ b/resources/master.less @@ -167,7 +167,7 @@ padding: 0; } - ul { + ul.navbar-nav { display: inline-block; height: 100%; margin: 0; @@ -180,6 +180,71 @@ } } + .account-menu { + width: 200px; + float: right; + color: #2B5ECF; + padding-left: 30px; + background-image: url(user.svg), url(caret-down.svg); + background-position: center left, center right; + background-repeat: no-repeat, no-repeat; + } + + .dropdown-menu { + border-left: 2px solid #eee; + padding: 17px 30px; + position: relative; + display: inline-block; + cursor: pointer; + outline: none; + } + + .dropdown-menu:focus { + /* clicking on label should toggle the menu */ + pointer-events: none; + } + + .dropdown-menu:focus .dropdown-menu-content { + /* opacity is 1 in opened state (see below) */ + opacity: 1; + visibility: visible; + + /* don't let pointer-events affect descendant elements */ + pointer-events: auto; + } + + .dropdown-menu-content { + position: absolute; + z-index: 1; + + /* use opacity to fake immediate toggle */ + opacity: 0; + visibility: hidden; + transition: visibility 0.5s; + + background: #fff; + border: 2px solid #eee; + border-top: none; + margin-left: -12px; + margin-top: 15px; + padding: 0; + + li { + list-style: none; + width: 200px; + + a { + color: #333; + padding: 5px 10px; + display: block; + + &:hover { + background: #eee; + } + } + } + } + a.navbar-brand { border-right: 2px solid #eee; background-image: url( 'menu.svg' ); diff --git a/resources/user.svg b/resources/user.svg new file mode 100644 index 000..06ea9ae --- /dev/null +++ b/resources/user.svg @@ -0,0 +1,13 @@ + + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> +http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" +width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> + + + + diff --git a/templates/Skin.php b/templates/Skin.php index 09c18fb..a75be41 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -3,7 +3,7 @@ 'flags' => array( 'jstrue' => false, 'jsobj' => false, -'spvar' => false, +'spvar' => true, 'prop' => false, 'method' => false, 'mustlok' => true, @@ -193,16 +193,7 @@ return ''.$cx['funcs']['v']($cx, $in, array('headelement')).' -'.' - - - - - -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' -';}).' - - Navigation +'.'Navigation '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return
[MediaWiki-commits] [Gerrit] Reduce attribute cache timeout to 1. - change (mediawiki/vagrant)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199223 Change subject: Reduce attribute cache timeout to 1. .. Reduce attribute cache timeout to 1. This fixes issues that I experience where files will not be updated when I save them in my editor. Change-Id: I35537daaeaeab50ada17532730cd344bb74cb58c --- M Vagrantfile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/23/199223/1 diff --git a/Vagrantfile b/Vagrantfile index 9f83a51..60a750f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -129,7 +129,7 @@ if settings[:nfs_shares] root_share_options[:type] = :nfs -root_share_options[:mount_options] = ['noatime','rsize=32767','wsize=32767','async'] +root_share_options[:mount_options] = ['noatime','rsize=32767','wsize=32767','async', 'actimeo=1'] config.nfs.map_uid = Process.uid config.nfs.map_gid = Process.gid else -- To view, visit https://gerrit.wikimedia.org/r/199223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35537daaeaeab50ada17532730cd344bb74cb58c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Add tag for iconography LSG page - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199221 Change subject: [WIP] Add tag for iconography LSG page .. [WIP] Add tag for iconography LSG page Change-Id: I009ae9aa049580322e0376b3ee8caa5ddf4ca6c5 --- M autoload.php M composer.json M i18n/en.json M includes/OOUILightNCandy.php M includes/ParserHooks.php M includes/WidgetFactory.php A includes/argument-filters/ArrayFilter.php D includes/argument-filters/FlagsFilter.php A includes/argument-filters/InfusableFilter.php M includes/container.php M resources/Resources.php M resources/defer.js A resources/iconography/iconography.js A resources/iconography/iconography.less A templates/iconography.template A templates/icons 16 files changed, 441 insertions(+), 48 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/21/199221/1 diff --git a/autoload.php b/autoload.php index a1d165c..0e59560 100644 --- a/autoload.php +++ b/autoload.php @@ -1,18 +1,19 @@ __DIR__ . '/includes/argument-filters/ArgumentFilter.php', 'OOUIPlayground\\ArgumentFilterInterface' => __DIR__ . '/includes/argument-filters/ArgumentFilter.php', + 'OOUIPlayground\\ArrayFilter' => __DIR__ . '/includes/argument-filters/ArrayFilter.php', 'OOUIPlayground\\ConfiguredCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\Container' => __DIR__ . '/includes/ContainerAccess.php', 'OOUIPlayground\\DeferredGroupElementFilter' => __DIR__ . '/includes/argument-filters/DeferredGroupElementFilter.php', - 'OOUIPlayground\\FlagsFilter' => __DIR__ . '/includes/argument-filters/FlagsFilter.php', 'OOUIPlayground\\GeSHICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\GroupElementFilter' => __DIR__ . '/includes/argument-filters/GroupElementFilter.php', 'OOUIPlayground\\ICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', + 'OOUIPlayground\\InfusableFilter' => __DIR__ . '/includes/argument-filters/InfusableFilter.php', 'OOUIPlayground\\InvalidGroupElementItemException' => __DIR__ . '/includes/argument-filters/GroupElementFilter.php', 'OOUIPlayground\\MockFilter' => __DIR__ . '/tests/phpunit/mocks/MockFilter.php', 'OOUIPlayground\\MultiCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', diff --git a/composer.json b/composer.json index 5a6e5de..b933a5e 100644 --- a/composer.json +++ b/composer.json @@ -2,9 +2,10 @@ "require": { "phpdocumentor/reflection-docblock": "~2.0", "sami/sami": "~2.0", -"oojs/oojs-ui": "0.4.*", +"oojs/oojs-ui": "~0.9.3", "pimple/pimple": "~2.1", -"werdnum/simple-lightncandy": "~0.1-dev" +"werdnum/simple-lightncandy": "~0.1-dev", +"zordius/lightncandy": "~0.20" }, "require-dev": { "mikey179/vfsStream": "~1.3" diff --git a/i18n/en.json b/i18n/en.json index c6ed97c..c15d0ad 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -6,5 +6,9 @@ "ooui-playground-language-javascript" : "JavaScript", "ooui-playground-error-no-type" : "You must specify a type", "ooui-playground-error-bad-type" : "There is no type called '$1'", - "ooui-playground-select-language" : "Show code:" + "ooui-playground-select-language" : "Show code:", + "lsg-icon-tooltip": "$1: $2", + "lsg-icon-filterbox-disabled": "Filtering is not yet possible", + "lsg-icon-mode-small": "Small view", + "lsg-icon-mode-detailed": "Detailed view" } diff --git a/includes/OOUILightNCandy.php b/includes/OOUILightNCandy.php index be16472..5b9e5e3 100644 --- a/includes/OOUILightNCandy.php +++ b/includes/OOUILightNCandy.php @@ -89,7 +89,7 @@ $widgetInfo = self::getRepo()->getInfo( $widgetName ); $params = self::getParams( $widgetInfo, $options ); - if ( isset( $options['old_ctx']['_ooui_mode'] ) ) { + if ( isset( $options['_this']['_ooui_mode'] ) ) { $params['type'] = $widgetInfo->getType(); $ret = array( FormatJson::encode( $params ) . ',', 'raw' ); } else { @@ -128,7 +128,7 @@ if ( $contentMode === 'var' ) { $params[$contentVar] = $options['fn']( array() ); } elseif ( $contentMode === 'group' ) { - $input = $options['fn']( array( '_ooui_mode' => 'groupelement' ) ); + $input = $options['fn']( array( '_ooui_mode' => 'groupelement' ) + $options['_this'] ); $input = trim( $input ); $input = rtrim( $input, ',' ); $input = "[$input]"; diff --git a/includes/ParserHooks.php b/includes/ParserHooks.php index f7f1172..bc71270 100755 ---
[MediaWiki-commits] [Gerrit] Return to default tipsy styles in Blueprint - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/199218 Change subject: Return to default tipsy styles in Blueprint .. Return to default tipsy styles in Blueprint Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d --- M LivingStyleGuide.php A skinStyles/tipsy.original.less A skinStyles/tipsy.override.less 3 files changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/18/199218/1 diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 7f70eb7..d392861 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -57,6 +57,16 @@ ) + $styleguideSkinResourceTemplate, ); +$wgResourceModuleSkinStyles['livingstyleguide'] = array( + // Apply original Tipsy styles + 'jquery.tipsy' => array( + 'tipsy.original.less', + 'tipsy.override.less', + ), + 'remoteSkinPath' => 'LivingStyleGuide/skinStyles', + 'localBasePath' => __DIR__ . '/skinStyles', +); + require_once __DIR__."/autoload.php"; require_once __DIR__."/vendor/autoload.php"; diff --git a/skinStyles/tipsy.original.less b/skinStyles/tipsy.original.less new file mode 100644 index 000..14a31f5 --- /dev/null +++ b/skinStyles/tipsy.original.less @@ -0,0 +1,34 @@ +// Copied from https://raw.githubusercontent.com/jaz303/tipsy/master/src/stylesheets/tipsy.css +// And modified for additional specificity + +@tooltip-color: #333; + +body { + .tipsy { +font-size: 10px; position: absolute; padding: 5px; z-index: 10; +.tipsy-inner { background-color: @tooltip-color; color: #FFF; max-width: 200px; padding: 5px 8px 4px 8px; text-align: center; } + +/* Rounded corners */ +.tipsy-inner { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } + +/* Uncomment for shadow */ +/*.tipsy-inner { box-shadow: 0 0 5px #00; -webkit-box-shadow: 0 0 5px #00; -moz-box-shadow: 0 0 5px #00; }*/ + +.tipsy-arrow { position: absolute; width: 0; height: 0; line-height: 0; border: 5px dashed @tooltip-color; } + +/* Rules to colour arrows */ +.tipsy-arrow-n { border-bottom-color: @tooltip-color; } +.tipsy-arrow-s { border-top-color: @tooltip-color; } +.tipsy-arrow-e { border-left-color: @tooltip-color; } +.tipsy-arrow-w { border-right-color: @tooltip-color; } + + &.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} + &.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;} +&.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } + &.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; } +&.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; } +&.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; } + } +} diff --git a/skinStyles/tipsy.override.less b/skinStyles/tipsy.override.less new file mode 100644 index 000..39d3f8c --- /dev/null +++ b/skinStyles/tipsy.override.less @@ -0,0 +1,7 @@ +body .tipsy { + font-size: 14px; + + .tipsy-inner { + border: none; + } +} -- To view, visit https://gerrit.wikimedia.org/r/199218 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8aa4e73d4dd629ac794446cf88a2669fdd34d1d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update sidebar and navbar - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Update sidebar and navbar .. Update sidebar and navbar According to the design spec at M43 Change-Id: I12b17c0f9b566337650ed8a9dd6b0a4961defae8 --- M resources/master.less 1 file changed, 15 insertions(+), 10 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/master.less b/resources/master.less index 5170f4c..d74e8cb 100644 --- a/resources/master.less +++ b/resources/master.less @@ -19,7 +19,7 @@ .container { width: 1140px; margin: 0 auto; - margin-top: 50px; + padding-top: 50px; } @@ -85,11 +85,12 @@ .site-shift { - left: 200px !important; - box-shadow: 0 0 20px 5px rgba(0,0,0,0.2); + left: 380px !important; + border-left: 1px solid #100F0D; .navbar { - left: 200px !important; + // An extra pixel to show the border till the top + left: 381px !important; } } @@ -102,8 +103,8 @@ bottom: 0; left: 0; z-index: 0; - background-color: #f9f9f9; - color: #333; + background-color: #2B5ECF; + color: #fff; ul { list-style: none; @@ -113,7 +114,8 @@ padding: 10px 0; a { - color: #333; + color: #fff; + text-decoration: none; } } } @@ -122,7 +124,7 @@ /* Navbar */ .navbar { - border: none; + border-bottom: 2px solid #eee; position: fixed !important; top: 0; left: 0; @@ -167,16 +169,19 @@ ul { display: inline-block; + height: 100%; + margin: 0; float: right; + border-left: 2px solid #eee; li { - margin-right: 30px; + margin: 15px 30px 10px 0; display: inline-block; } } a.navbar-brand { - background: #f9f9f9; + border-right: 2px solid #eee; background-image: url( 'menu.svg' ); background-position: center left -10px; background-repeat: no-repeat; -- To view, visit https://gerrit.wikimedia.org/r/197280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12b17c0f9b566337650ed8a9dd6b0a4961defae8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Werdna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove dependency on Bootstrap - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Remove dependency on Bootstrap .. Remove dependency on Bootstrap Bug: T91610 Change-Id: I85ff69eef145496dd1e07e300cc36a5dc1450302 --- M LivingStyleGuide.php D bower.json M resources/master.less M resources/menu.js M src/SkinLivingStyleGuide.php M templates/Skin.php M templates/Skin.template M templates/sidebar.template 8 files changed, 105 insertions(+), 124 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 4ea16d0..7f70eb7 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -48,20 +48,12 @@ ); $wgResourceModules += array( - 'ext.bootstrap' => array( - 'localBasePath' => __DIR__ . "/bower_components/bootstrap/dist", - 'remoteSkinPath' => 'LivingStyleGuide/bower_components/bootstrap/dist', - 'group' => 'skin.livingstyleguide', - 'scripts' => 'js/bootstrap.min.js', - 'styles' => 'css/bootstrap.min.css', - ), 'skin.styleguide.styles' => array( 'styles' => 'master.less', 'position' => 'top', ) + $styleguideSkinResourceTemplate, 'skin.styleguide' => array( 'scripts' => 'menu.js', - 'dependencies' => 'ext.bootstrap' ) + $styleguideSkinResourceTemplate, ); diff --git a/bower.json b/bower.json deleted file mode 100644 index 9bcfd56..000 --- a/bower.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "LightNCandySkin", - "version": "0.0.0", - "authors": [ -"Andrew Garrett " - ], - "description": "Demonstration of creating a skin using LightNCandy templates.", - "main": "LightNCandySkin.php", - "license": "MIT", - "private": true, - "ignore": [ -"**/.*", -"node_modules", -"bower_components", -"test", -"tests" - ], - "dependencies": { -"bootstrap": "~3.3.1" - } -} diff --git a/resources/master.less b/resources/master.less index c3bec48..5170f4c 100644 --- a/resources/master.less +++ b/resources/master.less @@ -1,11 +1,27 @@ /* Typography */ +html, body { + height: 100%; + margin: 0; + padding: 0; +} + + body { color: #333; - - .container { - font-size: 16px; - } + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-size: 1em; } + +a { + color: #2B5ECF; +} + +.container { + width: 1140px; + margin: 0 auto; + margin-top: 50px; +} + h1 { font: 3em 'Georgia', 'Times', serif; @@ -53,10 +69,6 @@ background: #f9f9f9; } /* Typography */ - -html, body { - height: 100%; -} /* Offscreen Navigation */ #site-wrap { @@ -120,6 +132,10 @@ height: 50px; transition: left 0.2s; + a { + text-decoration: none; + } + .search-input { background: transparent; border: none; @@ -130,6 +146,8 @@ background-position: center left; background-repeat: no-repeat; padding-left: 30px; + height: 30px; + font: 0.8em 'Helvetica Neue', Helvetica, Arial, sans-serif; &:focus { background-image: url( 'search_active.svg' ); @@ -140,25 +158,39 @@ } } - .navbar-header { + form { + display: inline-block; + height: 100%; + margin: 0; + padding: 0; + } + + ul { + display: inline-block; + float: right; + + li { + margin-right: 30px; + display: inline-block; + } + } + + a.navbar-brand { background: #f9f9f9; background-image: url( 'menu.svg' ); background-position: center left -10px; background-repeat: no-repeat; - - a { - color: #333; - text-transform: uppercase; - font-weight: bold; - } + display: inline-block; + height: 100%; + line-height: 50px; + padding: 0 20px; + color: #333; + text-transform: uppercase; + font-weight: bold; } } /* Navbar */ -.container { - // Don't hide under the navbar. - margin-top: 50px; -} /* MediaWiki Stuff */ @media screen { diff --git a/resources/menu.js b/resources/menu.js index 6ff8c82..316af0a 100644 --- a/resources/menu.js +++ b/resources/menu.js @@ -1,5 +1,5 @@ $( function () { - $( '.navbar-header' ).click( function ( e ) { + $( '.navbar-brand' ).click( function ( e ) { e.preventDefault(); $( '#site-wr
[MediaWiki-commits] [Gerrit] T88164: Make Hovercards default for Chinese, Catalan and Gre... - change (operations/mediawiki-config)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/197038 Change subject: T88164: Make Hovercards default for Chinese, Catalan and Greek WP. .. T88164: Make Hovercards default for Chinese, Catalan and Greek WP. Depends on change 197034. Change-Id: I6fa034f4a81e78e827b9996f50cd0909f2caacd1 --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/38/197038/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 83768fe..d208a60 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -1795,6 +1795,8 @@ if ( $wmgUsePopups ) { require_once( "$IP/extensions/Popups/Popups.php" ); + + $wgPopupsMode = $wmgPopupsMode; } if ( $wmgUseVectorBeta ) { diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 32c2c77..7c26f96 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10693,6 +10693,14 @@ 'votewiki' => false, ), +'wmgPopupsMode' => array( + 'default' => 'betafeature', + // T88164 + 'cawiki' => 'enabled', + 'elwiki' => 'enabled', + 'zhwiki' => 'enabled', +), + 'wmgUseVectorBeta' => array( 'default' => true, 'loginwiki' => false, -- To view, visit https://gerrit.wikimedia.org/r/197038 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6fa034f4a81e78e827b9996f50cd0909f2caacd1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow Popups to be switched between the following modes: - change (mediawiki...Popups)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/197034 Change subject: Allow Popups to be switched between the following modes: .. Allow Popups to be switched between the following modes: * On for all users. * Available in Beta Features. * Off for all users. Change-Id: Ie4cc455fa6379dbc8ef700e4773bedfb49fcf813 --- M Popups.hooks.php M Popups.php 2 files changed, 25 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/34/197034/1 diff --git a/Popups.hooks.php b/Popups.hooks.php index 5880f34..19909d0 100644 --- a/Popups.hooks.php +++ b/Popups.hooks.php @@ -105,7 +105,9 @@ public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin) { // Enable only if the user has turned it on in Beta Preferences, or BetaFeatures is not installed. // Will only be loaded if PageImages & TextExtracts extensions are installed. - if ( ( !class_exists( 'BetaFeatures' ) || BetaFeatures::isFeatureEnabled( $skin->getUser(), 'popups' ) ) + global $wgPopupsMode; + + if ( ( $wgPopupsMode === 'enabled' || BetaFeatures::isFeatureEnabled( $skin->getUser(), 'popups' ) ) && defined( 'TEXT_EXTRACTS_INSTALLED' ) && class_exists( 'ApiQueryPageImages' ) ) { diff --git a/Popups.php b/Popups.php index 730c91f..5e4c751 100644 --- a/Popups.php +++ b/Popups.php @@ -37,8 +37,28 @@ $wgMessagesDirs['Popups'] = __DIR__ . '/i18n'; $wgExtensionMessagesFiles['Popups'] = __DIR__ . '/Popups.i18n.php'; -$wgHooks['GetBetaFeaturePreferences'][] = 'PopupsHooks::getPreferences'; $wgHooks['BeforePageDisplay'][] = 'PopupsHooks::onBeforePageDisplay'; $wgHooks['ResourceLoaderTestModules'][] = 'PopupsHooks::onResourceLoaderTestModules'; $wgHooks['EventLoggingRegisterSchemas'][] = 'PopupsHooks::onEventLoggingRegisterSchemas'; -$wgHooks[ 'ResourceLoaderRegisterModules' ][] = 'PopupsHooks::onResourceLoaderRegisterModules'; \ No newline at end of file +$wgHooks['ResourceLoaderRegisterModules'][] = 'PopupsHooks::onResourceLoaderRegisterModules'; + +/* The mode of operation: + * enabled: On for all users. + * betafeature: Must be switched on in "Beta Features". + * If Beta Features is not enabled, then it will be enabled by default + * disabled: Off for all users. + * Default: betafeature if BetaFeatures is enabled, enabled otherwise. + */ +$wgPopupsMode = 'betafeature'; + +$wgExtensionFunctions[] = function() { + global $wgHooks, $wgPopupsMode; + + if ( $wgPopupsMode === 'betafeature' ) { + if ( class_exists( 'BetaFeatures' ) ) { + $wgHooks['GetBetaFeaturePreferences'][] = 'PopupsHooks::getPreferences'; + } else { + $wgPopupsMode = 'enabled'; + } + } +}; -- To view, visit https://gerrit.wikimedia.org/r/197034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4cc455fa6379dbc8ef700e4773bedfb49fcf813 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix warning from 341dfa2 - change (mediawiki/core)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/197031 Change subject: Fix warning from 341dfa2 .. Fix warning from 341dfa2 Change-Id: I8f3892208c4c2695f88386da11fcf75aae9b1e23 --- M includes/Import.php 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/197031/1 diff --git a/includes/Import.php b/includes/Import.php index eb2ca77..b5a324b 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -378,10 +378,13 @@ $editInfo = $page->prepareContentForEdit( $content ); $countable = $page->isCountable( $editInfo ); - $oldcountable = $this->countableCache['title_' . $title->getPrefixedText()]; - if ( isset( $oldcountable ) && $countable != $oldcountable ) { + $countableIndex = 'title_' . $title->getPrefixedText(); + if ( + isset( $this->countableCache[$countableIndex] ) + && $countable != $this->countableCache[$countableIndex] + ) { DeferredUpdates::addUpdate( SiteStatsUpdate::factory( array( - 'articles' => ( (int)$countable - (int)$oldcountable ) + 'articles' => ( (int)$countable - (int)$this->countableCache[$countableIndex] ) ) ) ); } -- To view, visit https://gerrit.wikimedia.org/r/197031 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f3892208c4c2695f88386da11fcf75aae9b1e23 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make ElasticSearch listen only locally. - change (mediawiki/vagrant)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/197020 Change subject: Make ElasticSearch listen only locally. .. Make ElasticSearch listen only locally. We are turning on Dynamic Scripting, which allows arbitrary remote code execution. My test server was compromised due to this setting. Change-Id: Ifb4253d86fe87472212b4b04fe5d30fb3bd685e8 --- M puppet/modules/elasticsearch/files/elasticsearch.yml 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/20/197020/1 diff --git a/puppet/modules/elasticsearch/files/elasticsearch.yml b/puppet/modules/elasticsearch/files/elasticsearch.yml index ad6188d..03b8fa3 100644 --- a/puppet/modules/elasticsearch/files/elasticsearch.yml +++ b/puppet/modules/elasticsearch/files/elasticsearch.yml @@ -6,6 +6,10 @@ # Cirrus will port to that when it is released, but for now, we use dynamic scripting. script.disable_dynamic: false +## But turning dynamic scripting on is a security vulnerability if the server +## is accessible to the world. Turn off global accessibility +network.host: "127.0.0.1" + # The default sandbox for Groovy is too restrictive for Cirrus. This adds a # few more allowed invocations. script.groovy.sandbox.class_whitelist: -- To view, visit https://gerrit.wikimedia.org/r/197020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb4253d86fe87472212b4b04fe5d30fb3bd685e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove prefix - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/196182 Change subject: Remove prefix .. Remove prefix Change-Id: I261e2bf3f1e361750418f50fe2385ec7e05747bd --- M LivingStyleGuide.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/82/196182/1 diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 4c1b37c..4ea16d0 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -68,4 +68,4 @@ require_once __DIR__."/autoload.php"; require_once __DIR__."/vendor/autoload.php"; -$wgValidSkinNames['livingstyleguide'] = 'SkinLivingStyleGuide'; +$wgValidSkinNames['livingstyleguide'] = 'LivingStyleGuide'; -- To view, visit https://gerrit.wikimedia.org/r/196182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I261e2bf3f1e361750418f50fe2385ec7e05747bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix skin registration - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/196181 Change subject: Fix skin registration .. Fix skin registration Change-Id: I1a44a965a36fe095bdcfcfd9b7497418a48d6345 --- M LivingStyleGuide.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/81/196181/1 diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index d93a712..4c1b37c 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -68,6 +68,4 @@ require_once __DIR__."/autoload.php"; require_once __DIR__."/vendor/autoload.php"; -SkinFactory::getDefaultInstance()->register( 'livingstyleguide', 'Living Style Guide', function(){ - return new SkinLivingStyleGuide; -} ); +$wgValidSkinNames['livingstyleguide'] = 'SkinLivingStyleGuide'; -- To view, visit https://gerrit.wikimedia.org/r/196181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a44a965a36fe095bdcfcfd9b7497418a48d6345 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove prefix - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Remove prefix .. Remove prefix Change-Id: I261e2bf3f1e361750418f50fe2385ec7e05747bd --- M LivingStyleGuide.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 4c1b37c..4ea16d0 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -68,4 +68,4 @@ require_once __DIR__."/autoload.php"; require_once __DIR__."/vendor/autoload.php"; -$wgValidSkinNames['livingstyleguide'] = 'SkinLivingStyleGuide'; +$wgValidSkinNames['livingstyleguide'] = 'LivingStyleGuide'; -- To view, visit https://gerrit.wikimedia.org/r/196182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I261e2bf3f1e361750418f50fe2385ec7e05747bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix skin registration - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Fix skin registration .. Fix skin registration Change-Id: I1a44a965a36fe095bdcfcfd9b7497418a48d6345 --- M LivingStyleGuide.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index d93a712..4c1b37c 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -68,6 +68,4 @@ require_once __DIR__."/autoload.php"; require_once __DIR__."/vendor/autoload.php"; -SkinFactory::getDefaultInstance()->register( 'livingstyleguide', 'Living Style Guide', function(){ - return new SkinLivingStyleGuide; -} ); +$wgValidSkinNames['livingstyleguide'] = 'SkinLivingStyleGuide'; -- To view, visit https://gerrit.wikimedia.org/r/196181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a44a965a36fe095bdcfcfd9b7497418a48d6345 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add "extrawikis" role. - change (mediawiki/vagrant)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/195576 Change subject: Add "extrawikis" role. .. Add "extrawikis" role. For situations when you want to be able to create lots of identical wikis straight in Hiera Change-Id: I1e3493554556288264007c8df65bccd1d8d7ffcb --- A puppet/modules/role/manifests/extrawikis.pp 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/76/195576/1 diff --git a/puppet/modules/role/manifests/extrawikis.pp b/puppet/modules/role/manifests/extrawikis.pp new file mode 100644 index 000..7c928ff --- /dev/null +++ b/puppet/modules/role/manifests/extrawikis.pp @@ -0,0 +1,14 @@ +/* Creates extra wikis from Hiera configuration */ +class role::extrawikis( $wikis = [] ) { + define extra_wiki { + $wikiname = $name + + mediawiki::wiki { $wikiname: + wiki_name => $wikiname, + db_name => $wikiname, + require => Class['::mediawiki::multiwiki'], + } + } + + extra_wiki { $wikis:; } +} -- To view, visit https://gerrit.wikimedia.org/r/195576 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1e3493554556288264007c8df65bccd1d8d7ffcb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] renderer.article: Bold the title no matter what the trailing... - change (mediawiki...Popups)
Werdna has submitted this change and it was merged. Change subject: renderer.article: Bold the title no matter what the trailing characters .. renderer.article: Bold the title no matter what the trailing characters Bug: T69229 Change-Id: I833c0dcae98010bc74b6b58ae8035aaac4e6465b --- M resources/ext.popups.renderer.article.js M tests/qunit/ext.popups.renderer.article.test.js 2 files changed, 14 insertions(+), 2 deletions(-) Approvals: Werdna: Looks good to me, approved diff --git a/resources/ext.popups.renderer.article.js b/resources/ext.popups.renderer.article.js index 895abea..7d100ba 100644 --- a/resources/ext.popups.renderer.article.js +++ b/resources/ext.popups.renderer.article.js @@ -155,7 +155,7 @@ title = title.replace( /([.?*+^$[\]\\(){}|-])/g, '\\$1' ); // Escape RegExp elements var elements = [], - regExp = new RegExp( '(^|\\s)(' + title + ')(\\s|$)', 'ig' ), + regExp = new RegExp( '(^|\\s)(' + title + ')(|$)', 'ig' ), boldIdentifier = '', snip = ''; diff --git a/tests/qunit/ext.popups.renderer.article.test.js b/tests/qunit/ext.popups.renderer.article.test.js index 6bca34e..81e58bd 100644 --- a/tests/qunit/ext.popups.renderer.article.test.js +++ b/tests/qunit/ext.popups.renderer.article.test.js @@ -2,7 +2,7 @@ QUnit.module( 'ext.popups' ); QUnit.test( 'render.article.getProcessedElements', function ( assert ) { - QUnit.expect( 9 ); + QUnit.expect( 11 ); function test ( extract, title, expected, msg ) { var $div = $( '' ).append( @@ -30,6 +30,12 @@ ); test( + 'Person, (was born in Location) is good', 'Person', + 'Person, is good', + 'Comma after title' + ); + + test( 'Person (was born in Location (at Time)) is good', 'Person', 'Person is good', 'Extract with nested parentheses' @@ -42,6 +48,12 @@ ); test( + 'I like trains', 'Train', + 'I like trains', + 'Make the simple plural bold' + ); + + test( 'Brackets ) are funny ( when not used properly', 'Brackets', 'Brackets ) are funny ( when not used properly', 'Extract with unbalanced parentheses' -- To view, visit https://gerrit.wikimedia.org/r/182446 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I833c0dcae98010bc74b6b58ae8035aaac4e6465b Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: GreenReaper Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: Werdna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix navigation bar. - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Fix navigation bar. .. Fix navigation bar. It was already fixed, but overridden by bootstrap Change-Id: I5abbc3d0e9aff6280477e56be5f289ac4ec66fdb --- M resources/master.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/master.less b/resources/master.less index 5693d00..c3bec48 100644 --- a/resources/master.less +++ b/resources/master.less @@ -111,7 +111,7 @@ /* Navbar */ .navbar { border: none; - position: fixed; + position: fixed !important; top: 0; left: 0; z-index: 1; -- To view, visit https://gerrit.wikimedia.org/r/194090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5abbc3d0e9aff6280477e56be5f289ac4ec66fdb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix navigation bar. - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/194090 Change subject: Fix navigation bar. .. Fix navigation bar. It was already fixed, but overridden by bootstrap Change-Id: I5abbc3d0e9aff6280477e56be5f289ac4ec66fdb --- M resources/master.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/90/194090/1 diff --git a/resources/master.less b/resources/master.less index 5693d00..c3bec48 100644 --- a/resources/master.less +++ b/resources/master.less @@ -111,7 +111,7 @@ /* Navbar */ .navbar { border: none; - position: fixed; + position: fixed !important; top: 0; left: 0; z-index: 1; -- To view, visit https://gerrit.wikimedia.org/r/194090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5abbc3d0e9aff6280477e56be5f289ac4ec66fdb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Kill the box around the widget and only keep the bottom border - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Kill the box around the widget and only keep the bottom border .. Kill the box around the widget and only keep the bottom border Change-Id: Id149a1c1bb614b9b7f797920495335a14b1e411b --- M resources/display.less 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/display.less b/resources/display.less index 49076f1..95b8856 100644 --- a/resources/display.less +++ b/resources/display.less @@ -3,9 +3,9 @@ } .ooui-playground-widget { - border: 1px solid #ccc; + border-bottom: 1px solid #ccc; display: inline-block; - padding: 0.25em; + padding-bottom: 0.25em; width: 100%; } -- To view, visit https://gerrit.wikimedia.org/r/193785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id149a1c1bb614b9b7f797920495335a14b1e411b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix font size regression. - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Fix font size regression. .. Fix font size regression. Bootstrap was overriding the font size. Change-Id: I82d6541d7428941219cf62317207d15453658f35 --- M resources/master.less 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/master.less b/resources/master.less index 792fed9..5693d00 100644 --- a/resources/master.less +++ b/resources/master.less @@ -1,7 +1,10 @@ /* Typography */ body { color: #333; - font-size: 16px; + + .container { + font-size: 16px; + } } h1 { @@ -40,7 +43,7 @@ p { margin-top: 1.2em; - font: 1em 'Helvetica', 'Arial', sans-serif; + font: 'Helvetica', 'Arial', sans-serif; line-height: 1.5; } @@ -170,4 +173,4 @@ a { margin-left: 0.75em; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/193089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82d6541d7428941219cf62317207d15453658f35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix font size regression. - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/193089 Change subject: Fix font size regression. .. Fix font size regression. Bootstrap was overriding the font size. Change-Id: I82d6541d7428941219cf62317207d15453658f35 --- M resources/master.less 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/89/193089/1 diff --git a/resources/master.less b/resources/master.less index 792fed9..5693d00 100644 --- a/resources/master.less +++ b/resources/master.less @@ -1,7 +1,10 @@ /* Typography */ body { color: #333; - font-size: 16px; + + .container { + font-size: 16px; + } } h1 { @@ -40,7 +43,7 @@ p { margin-top: 1.2em; - font: 1em 'Helvetica', 'Arial', sans-serif; + font: 'Helvetica', 'Arial', sans-serif; line-height: 1.5; } @@ -170,4 +173,4 @@ a { margin-left: 0.75em; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/193089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82d6541d7428941219cf62317207d15453658f35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add subitem argument filter. - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/192808 Change subject: Add subitem argument filter. .. Add subitem argument filter. Allows for correct preprocessing of parameters to subitems, such as dependent menus and popups Change-Id: I26fc9cced9bebe87e43fc156995495c46e6c5b5f --- M autoload.php M includes/argument-filters/ArgumentFilter.php A includes/argument-filters/SubitemFilter.php M includes/container.php 4 files changed, 49 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/08/192808/1 diff --git a/autoload.php b/autoload.php index de16af4..a1d165c 100644 --- a/autoload.php +++ b/autoload.php @@ -25,6 +25,8 @@ 'OOUIPlayground\\OOUIStatic' => __DIR__ . '/includes/OOUILightNCandy.php', 'OOUIPlayground\\ParserHooks' => __DIR__ . '/includes/ParserHooks.php', 'OOUIPlayground\\PreCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', + 'OOUIPlayground\\RecursiveArgumentFilter' => __DIR__ . '/includes/argument-filters/ArgumentFilter.php', + 'OOUIPlayground\\SubitemFilter' => __DIR__ . '/includes/argument-filters/SubitemFilter.php', 'OOUIPlayground\\WidgetDocumenter' => __DIR__ . '/includes/WidgetDocumenter.php', 'OOUIPlayground\\WidgetFactory' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\WidgetInfo' => __DIR__ . '/includes/WidgetInfo.php', diff --git a/includes/argument-filters/ArgumentFilter.php b/includes/argument-filters/ArgumentFilter.php index 3dc144f..0965ec4 100644 --- a/includes/argument-filters/ArgumentFilter.php +++ b/includes/argument-filters/ArgumentFilter.php @@ -5,7 +5,15 @@ function filter( WidgetInfo $widget, array &$args ); } -class ArgumentFilterGroup implements ArgumentFilterInterface { +abstract class RecursiveArgumentFilter implements ArgumentFilterInterface { + protected $parentArgumentFilter = false; + + public function setParentFilter( ArgumentFilterInterface $parent ) { + $this->parentArgumentFilter = $parent; + } +} + +class ArgumentFilterGroup extends RecursiveArgumentFilter { /** @var array[ArgumentFilterInterface] */ protected $filters; @@ -24,5 +32,9 @@ public function addFilter( ArgumentFilterInterface $filter ) { $this->filters[] = $filter; + + if ( $filter instanceof RecursiveArgumentFilter ) { + $filter->setParentFilter( $this->parentArgumentFilter ?: $this ); + } } } diff --git a/includes/argument-filters/SubitemFilter.php b/includes/argument-filters/SubitemFilter.php new file mode 100644 index 000..ae9c72d --- /dev/null +++ b/includes/argument-filters/SubitemFilter.php @@ -0,0 +1,26 @@ +subitemNames = $subitemNames; + } + + public function filter( WidgetInfo $widget, array &$args ) { + foreach( $this->subitemNames as $name => $widgetInfo ) { + if ( isset( $args[$name] ) && is_array( $args[$name] ) ) { + $this->filterSubitem( $widgetInfo, $args[$name] ); + } + } + } + + protected function filterSubitem( WidgetInfo $widget, array &$config ) { + if ( $this->parentArgumentFilter ) { + $this->parentArgumentFilter->filter( $widget, $config ); + } + } +} diff --git a/includes/container.php b/includes/container.php index 02a6858..fba605b 100644 --- a/includes/container.php +++ b/includes/container.php @@ -238,6 +238,14 @@ $factory->addFilter( new GroupElementFilter( $factory ) ); $factory->addFilter( new DeferredGroupElementFilter( $factory ), true ); + $subitemFilterConfig = + array( + 'menu' => $c['widgetRepository']->getInfo( 'menuselect' ), + 'popup' => $c['widgetRepository']->getInfo( 'popup' ), + ); + $factory->addFilter( new SubitemFilter( $subitemFilterConfig ), true ); + $factory->addFilter( new SubitemFilter( $subitemFilterConfig ), false ); + return $factory; }; -- To view, visit https://gerrit.wikimedia.org/r/192808 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I26fc9cced9bebe87e43fc156995495c46e6c5b5f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix exception class name - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Fix exception class name .. Fix exception class name Change-Id: I789a99b8bfdfc51661af6e261f5fb4ab16aaf39b --- M autoload.php M includes/WidgetFactory.php 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/autoload.php b/autoload.php index 6ee40ca..68d8c8f 100644 --- a/autoload.php +++ b/autoload.php @@ -16,7 +16,7 @@ 'OOUIPlayground\\MultiGeSHICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\MultiPreCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\NoSuchWidgetException' => __DIR__ . '/includes/WidgetInfo.php', - 'OOUIPlayground\\NoTypeGiven' => __DIR__ . '/includes/WidgetFactory.php', + 'OOUIPlayground\\NoTypeGivenException' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\NullCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\ParserHooks' => __DIR__ . '/includes/ParserHooks.php', 'OOUIPlayground\\PreCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', diff --git a/includes/WidgetFactory.php b/includes/WidgetFactory.php index 5bff766..26ac7b2 100644 --- a/includes/WidgetFactory.php +++ b/includes/WidgetFactory.php @@ -49,7 +49,7 @@ } } -class NoTypeGiven extends MWException { +class NoTypeGivenException extends MWException { function __construct() { parent::__construct( "No widget name was provided in the configuration." ); } -- To view, visit https://gerrit.wikimedia.org/r/192804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I789a99b8bfdfc51661af6e261f5fb4ab16aaf39b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix exception class name - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/192804 Change subject: Fix exception class name .. Fix exception class name Change-Id: I789a99b8bfdfc51661af6e261f5fb4ab16aaf39b --- M autoload.php M includes/WidgetFactory.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/04/192804/1 diff --git a/autoload.php b/autoload.php index 9725d95..de16af4 100644 --- a/autoload.php +++ b/autoload.php @@ -19,7 +19,7 @@ 'OOUIPlayground\\MultiGeSHICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\MultiPreCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\NoSuchWidgetException' => __DIR__ . '/includes/WidgetInfo.php', - 'OOUIPlayground\\NoTypeGiven' => __DIR__ . '/includes/WidgetFactory.php', + 'OOUIPlayground\\NoTypeGivenException' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\NullCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\OOUILightNCandy' => __DIR__ . '/includes/OOUILightNCandy.php', 'OOUIPlayground\\OOUIStatic' => __DIR__ . '/includes/OOUILightNCandy.php', diff --git a/includes/WidgetFactory.php b/includes/WidgetFactory.php index ed42a10..287340a 100644 --- a/includes/WidgetFactory.php +++ b/includes/WidgetFactory.php @@ -72,7 +72,7 @@ } } -class NoTypeGiven extends MWException { +class NoTypeGivenException extends MWException { function __construct() { parent::__construct( "No widget name was provided in the configuration." ); } -- To view, visit https://gerrit.wikimedia.org/r/192804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I789a99b8bfdfc51661af6e261f5fb4ab16aaf39b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix issue with deferred object config preprocessing, it woul... - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/192799 Change subject: Fix issue with deferred object config preprocessing, it would also dig into jQuery objects .. Fix issue with deferred object config preprocessing, it would also dig into jQuery objects Change-Id: Idcb8e4e3025f639e3bf1f50aa2eb5a0ad0d9b713 --- M resources/defer.js 1 file changed, 9 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/99/192799/1 diff --git a/resources/defer.js b/resources/defer.js index 88b0e03..0c50403 100644 --- a/resources/defer.js +++ b/resources/defer.js @@ -3,7 +3,6 @@ $( function() { function instantiateFromParameters( config ) { var className = config['class'], - error = false, newItems; if ( typeof OO.ui[className] === 'undefined' ) { @@ -11,7 +10,7 @@ .text( 'Unable to load ' + className ); } - preprocessConfig( config ); + error = preprocessConfig( config ); // Pass out errors if ( error ) { @@ -26,6 +25,9 @@ } function preprocessConfig( config ) { + var error = false, + newItems = []; + if ( config.items ) { newItems = []; $.each( config.items, function( index, item ) { @@ -45,12 +47,14 @@ $.each( config, function( name, value ) { if ( String(name).substr( 0, 1 ) === '$' ) { config[name] = $( value ); - } - - if ( typeof value === 'object' ) { + } else if ( typeof value === 'object' && $.isPlainObject( value ) ) { preprocessConfig( value ); } } ); + + if ( error ) { + return error; + } } $( '.ooui-deferred' ).each( function() { -- To view, visit https://gerrit.wikimedia.org/r/192799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idcb8e4e3025f639e3bf1f50aa2eb5a0ad0d9b713 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix issue with deferred object config preprocessing, it woul... - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Fix issue with deferred object config preprocessing, it would also dig into jQuery objects .. Fix issue with deferred object config preprocessing, it would also dig into jQuery objects Change-Id: Idcb8e4e3025f639e3bf1f50aa2eb5a0ad0d9b713 --- M resources/defer.js 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/defer.js b/resources/defer.js index 88b0e03..0c50403 100644 --- a/resources/defer.js +++ b/resources/defer.js @@ -3,7 +3,6 @@ $( function() { function instantiateFromParameters( config ) { var className = config['class'], - error = false, newItems; if ( typeof OO.ui[className] === 'undefined' ) { @@ -11,7 +10,7 @@ .text( 'Unable to load ' + className ); } - preprocessConfig( config ); + error = preprocessConfig( config ); // Pass out errors if ( error ) { @@ -26,6 +25,9 @@ } function preprocessConfig( config ) { + var error = false, + newItems = []; + if ( config.items ) { newItems = []; $.each( config.items, function( index, item ) { @@ -45,12 +47,14 @@ $.each( config, function( name, value ) { if ( String(name).substr( 0, 1 ) === '$' ) { config[name] = $( value ); - } - - if ( typeof value === 'object' ) { + } else if ( typeof value === 'object' && $.isPlainObject( value ) ) { preprocessConfig( value ); } } ); + + if ( error ) { + return error; + } } $( '.ooui-deferred' ).each( function() { -- To view, visit https://gerrit.wikimedia.org/r/192799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idcb8e4e3025f639e3bf1f50aa2eb5a0ad0d9b713 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New layout for LSG - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: New layout for LSG .. New layout for LSG * Hide code by default, and move the code display selector to display on each element rather than once at the top of the page. * Put demo and code together, layout is thus up to the wiki in question. Bug: T88036 Change-Id: I0778c443b276a2c98264346511adb3aa57a4e724 --- M i18n/en.json M includes/ParserHooks.php M resources/Resources.php M resources/display.js M resources/display.less A resources/interactive.less 6 files changed, 33 insertions(+), 31 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/i18n/en.json b/i18n/en.json index 86b239f..c6ed97c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -5,5 +5,6 @@ "ooui-playground-language-php" : "PHP", "ooui-playground-language-javascript" : "JavaScript", "ooui-playground-error-no-type" : "You must specify a type", - "ooui-playground-error-bad-type" : "There is no type called '$1'" -} \ No newline at end of file + "ooui-playground-error-bad-type" : "There is no type called '$1'", + "ooui-playground-select-language" : "Show code:" +} diff --git a/includes/ParserHooks.php b/includes/ParserHooks.php index 8bf03d9..b81eb25 100755 --- a/includes/ParserHooks.php +++ b/includes/ParserHooks.php @@ -157,13 +157,14 @@ $code = $codeRenderer->render( $class, $args ); - return $code . + return Html::rawElement( 'div', array( 'class' => 'ooui-playground-widget' ), - $output ); + $output ) . + $code; } /** diff --git a/resources/Resources.php b/resources/Resources.php index 25b7327..31f2c34 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -8,10 +8,12 @@ $wgResourceModules['ext.ooui-playground'] = array( 'scripts' => array( 'display.js', 'defer.js' ), + 'styles' => 'interactive.less', 'dependencies' => array( 'oojs-ui' ), 'messages' => array( "ooui-playground-language-php", "ooui-playground-language-javascript", + 'ooui-playground-select-language', ), ) + $oouiPlaygroundResourceTemplate; diff --git a/resources/display.js b/resources/display.js index 89b5050..f7ddbcc 100644 --- a/resources/display.js +++ b/resources/display.js @@ -2,17 +2,20 @@ (function( $, mw, OO ) { $( function() { var $codeGroups = $( '.ooui-playground-code-group' ); - if ( $codeGroups.length ) { + $codeGroups.each( function() { var $selector = $( '' ) .addClass( 'ooui-playground-language-selector' ), options = [], - selector; + selector, + $codeGroup = $( this ); // XXX: Hardcoded $.each( ['javascript', 'php'], function( i, language ) { options.push( new OO.ui.ButtonOptionWidget( { data : language, - label : mw.msg( 'ooui-playground-language-' + language ) + label : mw.msg( 'ooui-playground-language-' + language ), + framed : false, + flags : ["quiet"] } ) ); } ); @@ -20,17 +23,17 @@ 'items' : options } ); - $selector.append( selector.$element ); - $selector.prependTo( $( '#mw-content-text' ) ); + $selector + .text( mw.msg( 'ooui-playground-select-language' ) ) + .append( selector.$element ) + .prependTo( $codeGroup ); selector.on( 'select', function( item ) { var selectedLanguage = item.getData(); - $( '.ooui-playground-code' ).hide(); - $( '.ooui-playground-code-' + selectedLanguage ).show(); + $codeGroup.children( '.ooui-playground-code' ).hide(); + $codeGroup.children( '.ooui-playground-code-' + selectedLanguage ).show(); } ); - - selector.selectItem( options[0] ); - } + } ); } ); })( jQuery, mediaWiki, OO ); diff --git a/resources/display.less b/resources/display.less index 88c3fd2..49076f1 100644 --- a/resources/display.less +++ b/resources/display.less @@ -1,22 +1,14 @@ .ooui-playground-demo { - display: flex; - justify-content: space-between; - width: 100%; margin-bottom: 1.5e
[MediaWiki-commits] [Gerrit] Turn config variables starting with $ into jQuery objects on... - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Turn config variables starting with $ into jQuery objects on the client side .. Turn config variables starting with $ into jQuery objects on the client side Change-Id: Idf0495e79c904945b6f0c8f7e635f70c07434c5b --- M resources/defer.js 1 file changed, 23 insertions(+), 9 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/defer.js b/resources/defer.js index a2476ae..88b0e03 100644 --- a/resources/defer.js +++ b/resources/defer.js @@ -11,6 +11,21 @@ .text( 'Unable to load ' + className ); } + preprocessConfig( config ); + + // Pass out errors + if ( error ) { + return error; + } + + if ( className === 'FieldLayout' ) { + return new OO.ui[className]( config.items.shift(), config ); + } else { + return new OO.ui[className]( config ); + } + } + + function preprocessConfig( config ) { if ( config.items ) { newItems = []; $.each( config.items, function( index, item ) { @@ -27,16 +42,15 @@ config.items = newItems; } - // Pass out errors - if ( error ) { - return error; - } + $.each( config, function( name, value ) { + if ( String(name).substr( 0, 1 ) === '$' ) { + config[name] = $( value ); + } - if ( className === 'FieldLayout' ) { - return new OO.ui[className]( config.items.shift(), config ); - } else { - return new OO.ui[className]( config ); - } + if ( typeof value === 'object' ) { + preprocessConfig( value ); + } + } ); } $( '.ooui-deferred' ).each( function() { -- To view, visit https://gerrit.wikimedia.org/r/192794 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idf0495e79c904945b6f0c8f7e635f70c07434c5b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Turn config variables starting with $ into jQuery objects on... - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/192794 Change subject: Turn config variables starting with $ into jQuery objects on the client side .. Turn config variables starting with $ into jQuery objects on the client side Change-Id: Idf0495e79c904945b6f0c8f7e635f70c07434c5b --- M resources/defer.js 1 file changed, 23 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/94/192794/1 diff --git a/resources/defer.js b/resources/defer.js index a2476ae..88b0e03 100644 --- a/resources/defer.js +++ b/resources/defer.js @@ -11,6 +11,21 @@ .text( 'Unable to load ' + className ); } + preprocessConfig( config ); + + // Pass out errors + if ( error ) { + return error; + } + + if ( className === 'FieldLayout' ) { + return new OO.ui[className]( config.items.shift(), config ); + } else { + return new OO.ui[className]( config ); + } + } + + function preprocessConfig( config ) { if ( config.items ) { newItems = []; $.each( config.items, function( index, item ) { @@ -27,16 +42,15 @@ config.items = newItems; } - // Pass out errors - if ( error ) { - return error; - } + $.each( config, function( name, value ) { + if ( String(name).substr( 0, 1 ) === '$' ) { + config[name] = $( value ); + } - if ( className === 'FieldLayout' ) { - return new OO.ui[className]( config.items.shift(), config ); - } else { - return new OO.ui[className]( config ); - } + if ( typeof value === 'object' ) { + preprocessConfig( value ); + } + } ); } $( '.ooui-deferred' ).each( function() { -- To view, visit https://gerrit.wikimedia.org/r/192794 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idf0495e79c904945b6f0c8f7e635f70c07434c5b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add template syntax for OOUI in wikitext. - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/192783 Change subject: Add template syntax for OOUI in wikitext. .. Add template syntax for OOUI in wikitext. Warning: Currently has no XSS protection. If you do not want to be XSS'd, then you should not allow untrusted users to edit any pages. Bug: T88026 Change-Id: I69d7059f10eda73696b6257d9243f7785c0f783b --- M autoload.php D generateLibAutoload.php A includes/ContainerAccess.php M includes/DeferredWidget.php A includes/OOUILightNCandy.php M includes/ParserHooks.php M includes/WidgetFactory.php M includes/WidgetInfo.php A includes/argument-filters/DeferredGroupElementFilter.php A includes/argument-filters/FlagsFilter.php M includes/argument-filters/GroupElementFilter.php M includes/container.php M resources/Resources.php M resources/defer.js 14 files changed, 523 insertions(+), 60 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/83/192783/1 diff --git a/autoload.php b/autoload.php index 6ee40ca..9725d95 100644 --- a/autoload.php +++ b/autoload.php @@ -7,6 +7,9 @@ 'OOUIPlayground\\ArgumentFilterGroup' => __DIR__ . '/includes/argument-filters/ArgumentFilter.php', 'OOUIPlayground\\ArgumentFilterInterface' => __DIR__ . '/includes/argument-filters/ArgumentFilter.php', 'OOUIPlayground\\ConfiguredCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', + 'OOUIPlayground\\Container' => __DIR__ . '/includes/ContainerAccess.php', + 'OOUIPlayground\\DeferredGroupElementFilter' => __DIR__ . '/includes/argument-filters/DeferredGroupElementFilter.php', + 'OOUIPlayground\\FlagsFilter' => __DIR__ . '/includes/argument-filters/FlagsFilter.php', 'OOUIPlayground\\GeSHICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\GroupElementFilter' => __DIR__ . '/includes/argument-filters/GroupElementFilter.php', 'OOUIPlayground\\ICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', @@ -18,6 +21,8 @@ 'OOUIPlayground\\NoSuchWidgetException' => __DIR__ . '/includes/WidgetInfo.php', 'OOUIPlayground\\NoTypeGiven' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\NullCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', + 'OOUIPlayground\\OOUILightNCandy' => __DIR__ . '/includes/OOUILightNCandy.php', + 'OOUIPlayground\\OOUIStatic' => __DIR__ . '/includes/OOUILightNCandy.php', 'OOUIPlayground\\ParserHooks' => __DIR__ . '/includes/ParserHooks.php', 'OOUIPlayground\\PreCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\WidgetDocumenter' => __DIR__ . '/includes/WidgetDocumenter.php', diff --git a/generateLibAutoload.php b/generateLibAutoload.php deleted file mode 100644 index 108d90e..000 --- a/generateLibAutoload.php +++ /dev/null @@ -1,17 +0,0 @@ -readDir( $base . '/' . $dir ); - } - - $generator->generateAutoload( $base ); - - echo "Done.\n\n"; -} - -main(); diff --git a/includes/ContainerAccess.php b/includes/ContainerAccess.php new file mode 100644 index 000..24fd8d8 --- /dev/null +++ b/includes/ContainerAccess.php @@ -0,0 +1,20 @@ +config = $config; $this->setAttributes( array( 'data-params' => FormatJson::encode( $config ) ) ); $this->addClasses( array( 'ooui-deferred' ) ); $this->tag = 'span'; } + + public function getConfig() { + return $this->config; + } } diff --git a/includes/OOUILightNCandy.php b/includes/OOUILightNCandy.php new file mode 100644 index 000..21bdb55 --- /dev/null +++ b/includes/OOUILightNCandy.php @@ -0,0 +1,165 @@ +widgetRepo = $repo; + $this->widgetFactory = $factory; + + $this->setupHelpers(); + } + + public function setupRendering() { + Theme::setSingleton( new MediaWikiTheme ); + + OOUIStatic::overrideFactory( $this->widgetFactory ); + OOUIStatic::overrideRepository( $this->widgetRepo ); + } + + public function teardownRendering() { + OOUIStatic::clearOverrides(); + } + + public function renderTemplate( $templateName, array $input ) { + $this->setupRendering(); + $output = parent::renderTemplate( $templateName, $input ); + $this->teardownRendering(); + return $output; + } + + public function renderString( $templateStr, array $input ) { + $this->setupRendering(); + $output = parent::renderString( $templateStr, $input ); + $this->teardownRendering(); + return $output; + } + + protected function setupHelpers() { + $this->addHBHelper( 'ooui', + function( $context, array $options ) { +
[MediaWiki-commits] [Gerrit] Move navigation out of drop down menu - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Move navigation out of drop down menu .. Move navigation out of drop down menu Change-Id: Ideb0af3cd6ef2d1b1434ba470183fa70346c0d29 --- M templates/Skin.php M templates/sidebar.template 2 files changed, 35 insertions(+), 40 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/templates/Skin.php b/templates/Skin.php index b6d8f14..bafa36d 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -3,11 +3,10 @@ 'flags' => array( 'jstrue' => false, 'jsobj' => false, -'spvar' => false, +'spvar' => true, 'prop' => false, 'method' => false, 'mustlok' => true, -'mustsec' => true, 'echo' => false, 'debug' => $debugopt, ), @@ -28,7 +27,7 @@ 'blockhelpers' => array(), 'hbhelpers' => array(), 'partials' => array(), -'scopes' => array($in), +'scopes' => array(), 'sp_vars' => array('root' => $in), 'funcs' => array( 'v' => function ($cx, $base, $path) { @@ -60,10 +59,14 @@ return $v; } $count--; -if ($count >= 0) { -$base = $cx['scopes'][$count]; -} else { -return null; +switch ($count) { +case -1: +$base = $cx['sp_vars']['root']; +break; +case -2; +return null; +default: +$base = $cx['scopes'][$count]; } } }, @@ -76,7 +79,10 @@ $isObj = false; if ($isAry && $else !== null && count($v) === 0) { -return $else($cx, $in); +$cx['scopes'][] = $in; +$ret = $else($cx, $in); +array_pop($cx['scopes']); +return $ret; } // #var, detect input type is object or not @@ -140,13 +146,9 @@ return ''; } if ($isAry) { -if ($cx['flags']['mustsec']) { -$cx['scopes'][] = $v; -} +$cx['scopes'][] = $in; $ret = $cb($cx, $v); -if ($cx['flags']['mustsec']) { -array_pop($cx['scopes']); -} +array_pop($cx['scopes']); return $ret; } @@ -159,13 +161,16 @@ } if ($else !== null) { -return $else($cx, $in); +$cx['scopes'][] = $in; +$ret = $else($cx, $in); +array_pop($cx['scopes']); +return $ret; } return ''; }, 'ifvar' => function ($cx, $v) { -return !is_null($v) && ($v !== false) && ($v !== 0) && ($v !== '') && (is_array($v) ? (count($v) > 0) : true); +return !is_null($v) && ($v !== false) && ($v !== 0) && ($v !== 0.0) && ($v !== '') && (is_array($v) ? (count($v) > 0) : true); }, 'ch' => function ($cx, $ch, $vars, $op) { return $cx['funcs']['chret'](call_user_func_array($cx['helpers'][$ch], $vars), $op); @@ -194,17 +199,6 @@ '.' - - - - - -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' - -';}).' - - @@ -213,6 +207,12 @@ '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' ';}).' + Navigation + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' + +';}).' '.' diff --git a/templates/sidebar.template b/templates/sidebar.template index f5d9b2e..8be93f0 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -1,17 +1,4 @@ - - - - - - {{#each sidebar.navigation}} - - {{text}} - - {{/each}} - - - @@ -22,3 +9,11 @@ {{/each}} +Navigation + +
[MediaWiki-commits] [Gerrit] Fix FUOC issues and add some standard IDs - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Fix FUOC issues and add some standard IDs .. Fix FUOC issues and add some standard IDs Change-Id: I63741ecd49fbb894960d52422a71dd79bf35d4fb --- M LivingStyleGuide.php M src/SkinLivingStyleGuide.php M templates/Skin.php M templates/Skin.template 4 files changed, 19 insertions(+), 14 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 6207825..d93a712 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -41,22 +41,28 @@ ), ); +$styleguideSkinResourceTemplate = array( + 'localBasePath' => __DIR__ . "/resources", + 'remoteSkinPath' => 'LivingStyleGuide/resources', + 'group' => 'skin.livingstyleguide', +); + $wgResourceModules += array( 'ext.bootstrap' => array( 'localBasePath' => __DIR__ . "/bower_components/bootstrap/dist", 'remoteSkinPath' => 'LivingStyleGuide/bower_components/bootstrap/dist', - 'group' => 'ext.lightncandyskin', + 'group' => 'skin.livingstyleguide', 'scripts' => 'js/bootstrap.min.js', 'styles' => 'css/bootstrap.min.css', ), - 'skin.styleguide' => array( - 'localBasePath' => __DIR__ . "/resources", - 'remoteSkinPath' => 'LivingStyleGuide/resources', - 'group' => 'ext.lightncandyskin', + 'skin.styleguide.styles' => array( 'styles' => 'master.less', + 'position' => 'top', + ) + $styleguideSkinResourceTemplate, + 'skin.styleguide' => array( 'scripts' => 'menu.js', 'dependencies' => 'ext.bootstrap' - ), + ) + $styleguideSkinResourceTemplate, ); require_once __DIR__."/autoload.php"; diff --git a/src/SkinLivingStyleGuide.php b/src/SkinLivingStyleGuide.php index e43e46e..03c0ed7 100755 --- a/src/SkinLivingStyleGuide.php +++ b/src/SkinLivingStyleGuide.php @@ -7,11 +7,11 @@ public function initPage( OutputPage $out ) { parent::initPage( $out ); - $out->addModules( array( 'skin.styleguide', 'ext.bootstrap' ) ); + $out->addModules( array( 'skin.styleguide' ) ); } public function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles( array( 'skin.styleguide', 'ext.bootstrap' ) ); + $out->addModuleStyles( array( 'skin.styleguide.styles', 'ext.bootstrap' ) ); } } diff --git a/templates/Skin.php b/templates/Skin.php index 932c68b..b6d8f14 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -204,7 +204,6 @@ ';}).' - @@ -243,10 +242,10 @@ - + '.$cx['funcs']['v']($cx, $in, array('title')).' - + '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('content_navigation','views')), $in, true, function($cx, $in) {return ' '; } -?> +?> \ No newline at end of file diff --git a/templates/Skin.template b/templates/Skin.template index 93c6a6a..5ea337c 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -31,10 +31,10 @@ - + {{{title}}} - + {{#each content_navigation.views}} https://gerrit.wikimedia.org/r/190425 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63741ecd49fbb894960d52422a71dd79bf35d4fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add OOUIPlayground extension to Jenkins config - change (integration/config)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/191888 Change subject: Add OOUIPlayground extension to Jenkins config .. Add OOUIPlayground extension to Jenkins config Change-Id: I4dc52974b8ecf19d7b9c5059afc8fdb1eed99ae2 --- M jjb/mediawiki-extensions.yaml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/88/191888/1 diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml index 0f02b11..76b1266 100644 --- a/jjb/mediawiki-extensions.yaml +++ b/jjb/mediawiki-extensions.yaml @@ -757,6 +757,7 @@ - OnlineStatus - OnlineStatusBar - OnlyRecentRecentChanges + - OOUIPlayground - OpenBadges - OpenGraphMeta - OpenID -- To view, visit https://gerrit.wikimedia.org/r/191888 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4dc52974b8ecf19d7b9c5059afc8fdb1eed99ae2 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Flash of Unstyled Content issues - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Fix Flash of Unstyled Content issues .. Fix Flash of Unstyled Content issues Change-Id: I9595fc1ace9f0944fadbf1c61db672d3caa33200 --- M includes/ParserHooks.php M resources/Resources.php M resources/display.js A resources/hidecode.css 4 files changed, 19 insertions(+), 8 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/includes/ParserHooks.php b/includes/ParserHooks.php index 79d3916..8bf03d9 100755 --- a/includes/ParserHooks.php +++ b/includes/ParserHooks.php @@ -73,8 +73,8 @@ * @return string HTML to output */ public static function renderDemo( $input, array $args, Parser $parser, PPFrame $frame ) { - $parser->getOutput()->addModules( array( 'oojs-ui', 'ext.ooui-playground' ) ); - $parser->getOutput()->addModuleStyles( array( 'oojs-ui', 'ext.ooui-playground' ) ); + $parser->getOutput()->addModules( array( 'oojs-ui', 'ext.ooui-playground', 'ext.ooui-playground.top' ) ); + $parser->getOutput()->addModuleStyles( array( 'oojs-ui.styles' ) ); $classStatus = self::getWidgetFromAttributes( $args ); diff --git a/resources/Resources.php b/resources/Resources.php index 3c6c12c..25b7327 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1,14 +1,21 @@ __DIR__, 'remoteExtPath' => 'OOUIPlayground/resources', 'group' => 'ext.ooui-playground', - 'styles' => 'display.less', +); + +$wgResourceModules['ext.ooui-playground'] = array( 'scripts' => array( 'display.js', 'defer.js' ), - 'dependencies' => 'oojs-ui', + 'dependencies' => array( 'oojs-ui' ), 'messages' => array( "ooui-playground-language-php", "ooui-playground-language-javascript", ), -); +) + $oouiPlaygroundResourceTemplate; + +$wgResourceModules['ext.ooui-playground.top'] = array( + 'styles' => array( 'display.less', 'hidecode.css' ), + 'position' => 'top', +) + $oouiPlaygroundResourceTemplate; diff --git a/resources/display.js b/resources/display.js index 4eb074a..89b5050 100644 --- a/resources/display.js +++ b/resources/display.js @@ -1,4 +1,5 @@ -(function( $, mw ) { +/* global OO */ +(function( $, mw, OO ) { $( function() { var $codeGroups = $( '.ooui-playground-code-group' ); if ( $codeGroups.length ) { @@ -32,4 +33,4 @@ selector.selectItem( options[0] ); } } ); -})( jQuery, mediaWiki ); \ No newline at end of file +})( jQuery, mediaWiki, OO ); diff --git a/resources/hidecode.css b/resources/hidecode.css new file mode 100644 index 000..42d9e7f --- /dev/null +++ b/resources/hidecode.css @@ -0,0 +1,3 @@ +.ooui-playground-code { + display: none; +} -- To view, visit https://gerrit.wikimedia.org/r/187818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9595fc1ace9f0944fadbf1c61db672d3caa33200 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] New layout for LSG - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/191879 Change subject: New layout for LSG .. New layout for LSG * Hide code by default, and move the code display selector to display on each element rather than once at the top of the page. * Put demo and code together, layout is thus up to the wiki in question. Change-Id: I0778c443b276a2c98264346511adb3aa57a4e724 --- M i18n/en.json M includes/ParserHooks.php M resources/Resources.php M resources/display.js M resources/display.less A resources/interactive.less 6 files changed, 32 insertions(+), 31 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/79/191879/1 diff --git a/i18n/en.json b/i18n/en.json index 86b239f..c6ed97c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -5,5 +5,6 @@ "ooui-playground-language-php" : "PHP", "ooui-playground-language-javascript" : "JavaScript", "ooui-playground-error-no-type" : "You must specify a type", - "ooui-playground-error-bad-type" : "There is no type called '$1'" -} \ No newline at end of file + "ooui-playground-error-bad-type" : "There is no type called '$1'", + "ooui-playground-select-language" : "Show code:" +} diff --git a/includes/ParserHooks.php b/includes/ParserHooks.php index 8bf03d9..b81eb25 100755 --- a/includes/ParserHooks.php +++ b/includes/ParserHooks.php @@ -157,13 +157,14 @@ $code = $codeRenderer->render( $class, $args ); - return $code . + return Html::rawElement( 'div', array( 'class' => 'ooui-playground-widget' ), - $output ); + $output ) . + $code; } /** diff --git a/resources/Resources.php b/resources/Resources.php index 25b7327..31f2c34 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -8,10 +8,12 @@ $wgResourceModules['ext.ooui-playground'] = array( 'scripts' => array( 'display.js', 'defer.js' ), + 'styles' => 'interactive.less', 'dependencies' => array( 'oojs-ui' ), 'messages' => array( "ooui-playground-language-php", "ooui-playground-language-javascript", + 'ooui-playground-select-language', ), ) + $oouiPlaygroundResourceTemplate; diff --git a/resources/display.js b/resources/display.js index 89b5050..f7ddbcc 100644 --- a/resources/display.js +++ b/resources/display.js @@ -2,17 +2,20 @@ (function( $, mw, OO ) { $( function() { var $codeGroups = $( '.ooui-playground-code-group' ); - if ( $codeGroups.length ) { + $codeGroups.each( function() { var $selector = $( '' ) .addClass( 'ooui-playground-language-selector' ), options = [], - selector; + selector, + $codeGroup = $( this ); // XXX: Hardcoded $.each( ['javascript', 'php'], function( i, language ) { options.push( new OO.ui.ButtonOptionWidget( { data : language, - label : mw.msg( 'ooui-playground-language-' + language ) + label : mw.msg( 'ooui-playground-language-' + language ), + framed : false, + flags : ["quiet"] } ) ); } ); @@ -20,17 +23,17 @@ 'items' : options } ); - $selector.append( selector.$element ); - $selector.prependTo( $( '#mw-content-text' ) ); + $selector + .text( mw.msg( 'ooui-playground-select-language' ) ) + .append( selector.$element ) + .prependTo( $codeGroup ); selector.on( 'select', function( item ) { var selectedLanguage = item.getData(); - $( '.ooui-playground-code' ).hide(); - $( '.ooui-playground-code-' + selectedLanguage ).show(); + $codeGroup.children( '.ooui-playground-code' ).hide(); + $codeGroup.children( '.ooui-playground-code-' + selectedLanguage ).show(); } ); - - selector.selectItem( options[0] ); - } + } ); } ); })( jQuery, mediaWiki, OO ); diff --git a/resources/display.less b/resources/display.less index 88c3fd2..66eeb90 100644 --- a/resources/display.less +++ b/resources/display.less @@ -1,22 +1,13 @@ .ooui-playground-demo { - display: flex; - justify-cont
[MediaWiki-commits] [Gerrit] WIP: "Smoke test" at Special:OOUIDemo - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/190466 Change subject: WIP: "Smoke test" at Special:OOUIDemo .. WIP: "Smoke test" at Special:OOUIDemo Includes support for calling OOUIPlayground from templates. Change-Id: Ia4c101567d1adef5c6cdc89b2ec0ed884fed73e7 --- M OOUIPlayground.php M autoload.php M i18n/en.json A includes/ContainerAccess.php A includes/OOUILightNCandy.php M includes/ParserHooks.php A includes/SpecialOOUIDemo.php M includes/WidgetInfo.php M includes/container.php A templates/demo.template A templates/used_widgets.template 11 files changed, 295 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/66/190466/1 diff --git a/OOUIPlayground.php b/OOUIPlayground.php index 13707ce..13aef20 100644 --- a/OOUIPlayground.php +++ b/OOUIPlayground.php @@ -43,6 +43,8 @@ $wgMessagesDirs['OOUIPlayground'] = __DIR__ . '/i18n'; +$wgSpecialPages['OOUIDemo'] = 'SpecialOOUIDemo'; + $dir = dirname( __FILE__ ); require_once __DIR__ . "/autoload.php"; diff --git a/autoload.php b/autoload.php index 6ee40ca..ba471dd 100644 --- a/autoload.php +++ b/autoload.php @@ -1,5 +1,5 @@ __DIR__ . '/includes/argument-filters/ArgumentFilter.php', 'OOUIPlayground\\ArgumentFilterInterface' => __DIR__ . '/includes/argument-filters/ArgumentFilter.php', 'OOUIPlayground\\ConfiguredCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', + 'OOUIPlayground\\Container' => __DIR__ . '/includes/ContainerAccess.php', 'OOUIPlayground\\GeSHICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\GroupElementFilter' => __DIR__ . '/includes/argument-filters/GroupElementFilter.php', 'OOUIPlayground\\ICodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', @@ -18,6 +19,8 @@ 'OOUIPlayground\\NoSuchWidgetException' => __DIR__ . '/includes/WidgetInfo.php', 'OOUIPlayground\\NoTypeGiven' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\NullCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', + 'OOUIPlayground\\OOUILightNCandy' => __DIR__ . '/includes/OOUILightNCandy.php', + 'OOUIPlayground\\OOUIStatic' => __DIR__ . '/includes/OOUILightNCandy.php', 'OOUIPlayground\\ParserHooks' => __DIR__ . '/includes/ParserHooks.php', 'OOUIPlayground\\PreCodeRenderer' => __DIR__ . '/includes/CodeRenderer.php', 'OOUIPlayground\\WidgetDocumenter' => __DIR__ . '/includes/WidgetDocumenter.php', @@ -27,4 +30,5 @@ 'OOUI\\DeferredWidget' => __DIR__ . '/includes/DeferredWidget.php', 'OOUI\\MockGroupWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', 'OOUI\\MockWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', + 'SpecialOOUIDemo' => __DIR__ . '/includes/SpecialOOUIDemo.php', ); diff --git a/i18n/en.json b/i18n/en.json index 86b239f..8c0c34e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -5,5 +5,6 @@ "ooui-playground-language-php" : "PHP", "ooui-playground-language-javascript" : "JavaScript", "ooui-playground-error-no-type" : "You must specify a type", - "ooui-playground-error-bad-type" : "There is no type called '$1'" + "ooui-playground-error-bad-type" : "There is no type called '$1'", + "oouidemo" : "OOJS-UI Demo" } \ No newline at end of file diff --git a/includes/ContainerAccess.php b/includes/ContainerAccess.php new file mode 100644 index 000..24fd8d8 --- /dev/null +++ b/includes/ContainerAccess.php @@ -0,0 +1,20 @@ +widgetRepo = $repo; + $this->widgetFactory = $factory; + + $this->setupHelpers(); + } + + public function renderTemplate( $templateName, array $input ) { + Theme::setSingleton( new MediaWikiTheme ); + + OOUIStatic::overrideFactory( $this->widgetFactory ); + OOUIStatic::overrideRepository( $this->widgetRepo ); + $output = parent::renderTemplate( $templateName, $input ); + OOUIStatic::clearOverrides(); + return $output; + } + + protected function setupHelpers() { + $this->addHBHelper( 'ooui', + function( $context, array $options ) { + return OOUIPlayground\OOUIStatic::oouiHelper( $context, $options ); + } + ); + } + + protected function getCompileOptions() { + $options = parent::getCompileOptions(); + + $options['flags'] ^= LightnCandy::FLAG_MUSTACHE; + $options['flags'] |= LightnCandy::FLAG_HANDLEBARSJS; + + return $options; + } +} + +/** + * It's not possible to pass the WidgetRepo or WidgetFactory into a LightNCandy template, + * by design. So this is a hack we're using to get things working. It's probably the wr
[MediaWiki-commits] [Gerrit] Move navigation out of drop down menu - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/190428 Change subject: Move navigation out of drop down menu .. Move navigation out of drop down menu Change-Id: Ideb0af3cd6ef2d1b1434ba470183fa70346c0d29 --- M templates/Skin.php M templates/sidebar.template 2 files changed, 15 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/28/190428/1 diff --git a/templates/Skin.php b/templates/Skin.php index 932c68b..0527a90 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -194,18 +194,6 @@ '.' - - - - - -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' - -';}).' - - - @@ -214,6 +202,12 @@ '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' ';}).' + Navigation + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' + +';}).' '.' @@ -276,4 +270,4 @@ '; } -?> +?> \ No newline at end of file diff --git a/templates/sidebar.template b/templates/sidebar.template index f5d9b2e..8be93f0 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -1,17 +1,4 @@ - - - - - - {{#each sidebar.navigation}} - - {{text}} - - {{/each}} - - - @@ -22,3 +9,11 @@ {{/each}} +Navigation + + {{#each sidebar.navigation}} + + {{text}} + + {{/each}} + -- To view, visit https://gerrit.wikimedia.org/r/190428 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ideb0af3cd6ef2d1b1434ba470183fa70346c0d29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix FUOC issues and add some standard IDs - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/190425 Change subject: Fix FUOC issues and add some standard IDs .. Fix FUOC issues and add some standard IDs Change-Id: I63741ecd49fbb894960d52422a71dd79bf35d4fb --- M LivingStyleGuide.php M src/SkinLivingStyleGuide.php M templates/Skin.php M templates/Skin.template 4 files changed, 19 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/25/190425/1 diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 6207825..d93a712 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -41,22 +41,28 @@ ), ); +$styleguideSkinResourceTemplate = array( + 'localBasePath' => __DIR__ . "/resources", + 'remoteSkinPath' => 'LivingStyleGuide/resources', + 'group' => 'skin.livingstyleguide', +); + $wgResourceModules += array( 'ext.bootstrap' => array( 'localBasePath' => __DIR__ . "/bower_components/bootstrap/dist", 'remoteSkinPath' => 'LivingStyleGuide/bower_components/bootstrap/dist', - 'group' => 'ext.lightncandyskin', + 'group' => 'skin.livingstyleguide', 'scripts' => 'js/bootstrap.min.js', 'styles' => 'css/bootstrap.min.css', ), - 'skin.styleguide' => array( - 'localBasePath' => __DIR__ . "/resources", - 'remoteSkinPath' => 'LivingStyleGuide/resources', - 'group' => 'ext.lightncandyskin', + 'skin.styleguide.styles' => array( 'styles' => 'master.less', + 'position' => 'top', + ) + $styleguideSkinResourceTemplate, + 'skin.styleguide' => array( 'scripts' => 'menu.js', 'dependencies' => 'ext.bootstrap' - ), + ) + $styleguideSkinResourceTemplate, ); require_once __DIR__."/autoload.php"; diff --git a/src/SkinLivingStyleGuide.php b/src/SkinLivingStyleGuide.php index e43e46e..03c0ed7 100755 --- a/src/SkinLivingStyleGuide.php +++ b/src/SkinLivingStyleGuide.php @@ -7,11 +7,11 @@ public function initPage( OutputPage $out ) { parent::initPage( $out ); - $out->addModules( array( 'skin.styleguide', 'ext.bootstrap' ) ); + $out->addModules( array( 'skin.styleguide' ) ); } public function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles( array( 'skin.styleguide', 'ext.bootstrap' ) ); + $out->addModuleStyles( array( 'skin.styleguide.styles', 'ext.bootstrap' ) ); } } diff --git a/templates/Skin.php b/templates/Skin.php index 932c68b..b6d8f14 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -204,7 +204,6 @@ ';}).' - @@ -243,10 +242,10 @@ - + '.$cx['funcs']['v']($cx, $in, array('title')).' - + '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('content_navigation','views')), $in, true, function($cx, $in) {return ' '; } -?> +?> \ No newline at end of file diff --git a/templates/Skin.template b/templates/Skin.template index 93c6a6a..5ea337c 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -31,10 +31,10 @@ - + {{{title}}} - + {{#each content_navigation.views}} https://gerrit.wikimedia.org/r/190425 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I63741ecd49fbb894960d52422a71dd79bf35d4fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix Flash of Unstyled Content issues - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/187818 Change subject: Fix Flash of Unstyled Content issues .. Fix Flash of Unstyled Content issues Change-Id: I9595fc1ace9f0944fadbf1c61db672d3caa33200 --- M includes/ParserHooks.php M resources/Resources.php M resources/display.js A resources/hidecode.css 4 files changed, 19 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/18/187818/1 diff --git a/includes/ParserHooks.php b/includes/ParserHooks.php index 79d3916..8bf03d9 100755 --- a/includes/ParserHooks.php +++ b/includes/ParserHooks.php @@ -73,8 +73,8 @@ * @return string HTML to output */ public static function renderDemo( $input, array $args, Parser $parser, PPFrame $frame ) { - $parser->getOutput()->addModules( array( 'oojs-ui', 'ext.ooui-playground' ) ); - $parser->getOutput()->addModuleStyles( array( 'oojs-ui', 'ext.ooui-playground' ) ); + $parser->getOutput()->addModules( array( 'oojs-ui', 'ext.ooui-playground', 'ext.ooui-playground.top' ) ); + $parser->getOutput()->addModuleStyles( array( 'oojs-ui.styles' ) ); $classStatus = self::getWidgetFromAttributes( $args ); diff --git a/resources/Resources.php b/resources/Resources.php index 3c6c12c..25b7327 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1,14 +1,21 @@ __DIR__, 'remoteExtPath' => 'OOUIPlayground/resources', 'group' => 'ext.ooui-playground', - 'styles' => 'display.less', +); + +$wgResourceModules['ext.ooui-playground'] = array( 'scripts' => array( 'display.js', 'defer.js' ), - 'dependencies' => 'oojs-ui', + 'dependencies' => array( 'oojs-ui' ), 'messages' => array( "ooui-playground-language-php", "ooui-playground-language-javascript", ), -); +) + $oouiPlaygroundResourceTemplate; + +$wgResourceModules['ext.ooui-playground.top'] = array( + 'styles' => array( 'display.less', 'hidecode.css' ), + 'position' => 'top', +) + $oouiPlaygroundResourceTemplate; diff --git a/resources/display.js b/resources/display.js index 4eb074a..89b5050 100644 --- a/resources/display.js +++ b/resources/display.js @@ -1,4 +1,5 @@ -(function( $, mw ) { +/* global OO */ +(function( $, mw, OO ) { $( function() { var $codeGroups = $( '.ooui-playground-code-group' ); if ( $codeGroups.length ) { @@ -32,4 +33,4 @@ selector.selectItem( options[0] ); } } ); -})( jQuery, mediaWiki ); \ No newline at end of file +})( jQuery, mediaWiki, OO ); diff --git a/resources/hidecode.css b/resources/hidecode.css new file mode 100644 index 000..42d9e7f --- /dev/null +++ b/resources/hidecode.css @@ -0,0 +1,3 @@ +.ooui-playground-code { + display: none; +} -- To view, visit https://gerrit.wikimedia.org/r/187818 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9595fc1ace9f0944fadbf1c61db672d3caa33200 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix JSHint warnings (aka warnings from the Timo on my shoulder) - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/187727 Change subject: Fix JSHint warnings (aka warnings from the Timo on my shoulder) .. Fix JSHint warnings (aka warnings from the Timo on my shoulder) Change-Id: I7eeb2a962a835f125d9295f393571e77a70b8ca4 --- M resources/defer.js 1 file changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/27/187727/1 diff --git a/resources/defer.js b/resources/defer.js index f73ea4c..a2476ae 100644 --- a/resources/defer.js +++ b/resources/defer.js @@ -1,4 +1,5 @@ -(function( $, mw ) { +/* global OO */ +(function( $, OO ) { $( function() { function instantiateFromParameters( config ) { var className = config['class'], @@ -10,10 +11,10 @@ .text( 'Unable to load ' + className ); } - if ( config['items'] ) { + if ( config.items ) { newItems = []; - $.each( config['items'], function( index, item ) { - newItem = instantiateFromParameters( item ); + $.each( config.items, function( index, item ) { + var newItem = instantiateFromParameters( item ); if ( newItem.$element ) { // A proper OOUI @@ -23,7 +24,7 @@ } } ); - config['items'] = newItems; + config.items = newItems; } // Pass out errors @@ -32,7 +33,7 @@ } if ( className === 'FieldLayout' ) { - return new OO.ui[className]( config['items'].shift(), config ); + return new OO.ui[className]( config.items.shift(), config ); } else { return new OO.ui[className]( config ); } @@ -49,4 +50,4 @@ } } ); } ); -})( jQuery, mediaWiki ); \ No newline at end of file +})( jQuery, OO ); -- To view, visit https://gerrit.wikimedia.org/r/187727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7eeb2a962a835f125d9295f393571e77a70b8ca4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix deferred handling of FieldLayouts - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Fix deferred handling of FieldLayouts .. Fix deferred handling of FieldLayouts Change-Id: Id8788419b1e45850a788a3195f43754aaaf576ea --- M resources/defer.js 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/defer.js b/resources/defer.js index e47920a..f73ea4c 100644 --- a/resources/defer.js +++ b/resources/defer.js @@ -2,7 +2,8 @@ $( function() { function instantiateFromParameters( config ) { var className = config['class'], - error = false; + error = false, + newItems; if ( typeof OO.ui[className] === 'undefined' ) { return $( '' ).addClass( 'error' ) @@ -30,7 +31,11 @@ return error; } - return new OO.ui[className]( config ); + if ( className === 'FieldLayout' ) { + return new OO.ui[className]( config['items'].shift(), config ); + } else { + return new OO.ui[className]( config ); + } } $( '.ooui-deferred' ).each( function() { -- To view, visit https://gerrit.wikimedia.org/r/187598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id8788419b1e45850a788a3195f43754aaaf576ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix deferred handling of FieldLayouts - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/187598 Change subject: Fix deferred handling of FieldLayouts .. Fix deferred handling of FieldLayouts Change-Id: Id8788419b1e45850a788a3195f43754aaaf576ea --- M resources/defer.js 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/98/187598/1 diff --git a/resources/defer.js b/resources/defer.js index e47920a..f73ea4c 100644 --- a/resources/defer.js +++ b/resources/defer.js @@ -2,7 +2,8 @@ $( function() { function instantiateFromParameters( config ) { var className = config['class'], - error = false; + error = false, + newItems; if ( typeof OO.ui[className] === 'undefined' ) { return $( '' ).addClass( 'error' ) @@ -30,7 +31,11 @@ return error; } - return new OO.ui[className]( config ); + if ( className === 'FieldLayout' ) { + return new OO.ui[className]( config['items'].shift(), config ); + } else { + return new OO.ui[className]( config ); + } } $( '.ooui-deferred' ).each( function() { -- To view, visit https://gerrit.wikimedia.org/r/187598 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8788419b1e45850a788a3195f43754aaaf576ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More support - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: More support .. More support * Support deferring rendering to the client side using type=deferred. * Allow classMap to be an array in preparation for adding extra params. Change-Id: I4126e1c8b2f23a985595a3739f0b21eb174ecae6 --- M autoload.php A includes/DeferredWidget.php M includes/WidgetInfo.php M includes/container.php M resources/Resources.php A resources/defer.js 6 files changed, 106 insertions(+), 16 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/autoload.php b/autoload.php index 5b93133..6ee40ca 100644 --- a/autoload.php +++ b/autoload.php @@ -24,6 +24,7 @@ 'OOUIPlayground\\WidgetFactory' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\WidgetInfo' => __DIR__ . '/includes/WidgetInfo.php', 'OOUIPlayground\\WidgetRepository' => __DIR__ . '/includes/WidgetInfo.php', + 'OOUI\\DeferredWidget' => __DIR__ . '/includes/DeferredWidget.php', 'OOUI\\MockGroupWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', 'OOUI\\MockWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', ); diff --git a/includes/DeferredWidget.php b/includes/DeferredWidget.php new file mode 100644 index 000..e2495b9 --- /dev/null +++ b/includes/DeferredWidget.php @@ -0,0 +1,16 @@ +setAttributes( array( 'data-params' => FormatJson::encode( $config ) ) ); + $this->addClasses( array( 'ooui-deferred' ) ); + $this->tag = 'span'; + } +} diff --git a/includes/WidgetInfo.php b/includes/WidgetInfo.php index e94011a..efc1f15 100644 --- a/includes/WidgetInfo.php +++ b/includes/WidgetInfo.php @@ -26,7 +26,7 @@ if ( ! isset( $this->classMap[$type] ) ) { throw new NoSuchWidgetException( $type ); } else { - return $this->classMap[$type]; + return $this->classMap[$type]['class']; } } @@ -40,7 +40,7 @@ $className = $this->getClassName( $type ); if ( $className ) { - return new WidgetInfo( $type, $className ); + return new WidgetInfo( $type, $this->classMap[$type] ); } } } @@ -48,6 +48,8 @@ class WidgetInfo { /** @var string */ protected $type; + /** @var array */ + protected $classInfo; /** @var string */ protected $className; /** @var array */ @@ -56,12 +58,13 @@ /** * Creates a new WidgetInfo * @param string $type The type, as used in markup -* @param string $className Internal identifier used as class name, +* @param array $classInfo Class information, * from classMap in config.php */ - function __construct( $type, $className ) { + function __construct( $type, $classInfo ) { $this->type = $type; - $this->className = $className; + $this->classInfo = $classInfo; + $this->className = $classInfo['class']; } /** diff --git a/includes/container.php b/includes/container.php index 5cb4886..462fec9 100644 --- a/includes/container.php +++ b/includes/container.php @@ -9,16 +9,39 @@ $container = new Container; $container['classMap'] = array( - 'buttongroup' => 'ButtonGroupWidget', - 'buttoninput' => 'ButtonInputWidget', - 'button' => 'ButtonWidget', - 'checkboxinput' => 'CheckboxInputWidget', - 'icon' => 'IconWidget', - 'indicator' => 'IndicatorWidget', - 'input' => 'InputWidget', - 'label' => 'LabelWidget', - 'radioinput' => 'RadioInputWidget', - 'textinput' => 'TextInputWidget', + 'buttongroup' => array( + 'class' => 'ButtonGroupWidget', + ), + 'buttoninput' => array( + 'class' => 'ButtonInputWidget', + ), + 'button' => array( + 'class' => 'ButtonWidget', + ), + 'checkboxinput' => array( + 'class' => 'CheckboxInputWidget', + ), + 'icon' => array( + 'class' => 'IconWidget', + ), + 'indicator' => array( + 'class' => 'IndicatorWidget', + ), + 'input' => array( + 'class' => 'InputWidget', + ), + 'label' => array( + 'class' => 'LabelWidget', + ), + 'radioinput' => array( + 'class' => 'RadioInputWidget', + ), + 'textinput' => array( + 'class' => 'TextInputWidget', + ), + 'deferred' => array( + 'class' => 'DeferredWidget', + ), ); $container['languages'] = array( diff --git a/resources/Resources.php b/resources/Resources.php index 5d4ac86..3c6c12c 100644 --- a/resources/Resources.php +++ b/resources/Resour
[MediaWiki-commits] [Gerrit] More support - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/187461 Change subject: More support .. More support * Support deferring rendering to the client side using type=deferred. * Allow classMap to be an array in preparation for adding extra params. Change-Id: I4126e1c8b2f23a985595a3739f0b21eb174ecae6 --- M autoload.php A includes/DeferredWidget.php M includes/WidgetInfo.php M includes/container.php M resources/Resources.php A resources/defer.js 6 files changed, 106 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/61/187461/1 diff --git a/autoload.php b/autoload.php index 5b93133..6ee40ca 100644 --- a/autoload.php +++ b/autoload.php @@ -24,6 +24,7 @@ 'OOUIPlayground\\WidgetFactory' => __DIR__ . '/includes/WidgetFactory.php', 'OOUIPlayground\\WidgetInfo' => __DIR__ . '/includes/WidgetInfo.php', 'OOUIPlayground\\WidgetRepository' => __DIR__ . '/includes/WidgetInfo.php', + 'OOUI\\DeferredWidget' => __DIR__ . '/includes/DeferredWidget.php', 'OOUI\\MockGroupWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', 'OOUI\\MockWidget' => __DIR__ . '/tests/phpunit/mocks/MockWidget.php', ); diff --git a/includes/DeferredWidget.php b/includes/DeferredWidget.php new file mode 100644 index 000..e2495b9 --- /dev/null +++ b/includes/DeferredWidget.php @@ -0,0 +1,16 @@ +setAttributes( array( 'data-params' => FormatJson::encode( $config ) ) ); + $this->addClasses( array( 'ooui-deferred' ) ); + $this->tag = 'span'; + } +} diff --git a/includes/WidgetInfo.php b/includes/WidgetInfo.php index e94011a..efc1f15 100644 --- a/includes/WidgetInfo.php +++ b/includes/WidgetInfo.php @@ -26,7 +26,7 @@ if ( ! isset( $this->classMap[$type] ) ) { throw new NoSuchWidgetException( $type ); } else { - return $this->classMap[$type]; + return $this->classMap[$type]['class']; } } @@ -40,7 +40,7 @@ $className = $this->getClassName( $type ); if ( $className ) { - return new WidgetInfo( $type, $className ); + return new WidgetInfo( $type, $this->classMap[$type] ); } } } @@ -48,6 +48,8 @@ class WidgetInfo { /** @var string */ protected $type; + /** @var array */ + protected $classInfo; /** @var string */ protected $className; /** @var array */ @@ -56,12 +58,13 @@ /** * Creates a new WidgetInfo * @param string $type The type, as used in markup -* @param string $className Internal identifier used as class name, +* @param array $classInfo Class information, * from classMap in config.php */ - function __construct( $type, $className ) { + function __construct( $type, $classInfo ) { $this->type = $type; - $this->className = $className; + $this->classInfo = $classInfo; + $this->className = $classInfo['class']; } /** diff --git a/includes/container.php b/includes/container.php index 5cb4886..462fec9 100644 --- a/includes/container.php +++ b/includes/container.php @@ -9,16 +9,39 @@ $container = new Container; $container['classMap'] = array( - 'buttongroup' => 'ButtonGroupWidget', - 'buttoninput' => 'ButtonInputWidget', - 'button' => 'ButtonWidget', - 'checkboxinput' => 'CheckboxInputWidget', - 'icon' => 'IconWidget', - 'indicator' => 'IndicatorWidget', - 'input' => 'InputWidget', - 'label' => 'LabelWidget', - 'radioinput' => 'RadioInputWidget', - 'textinput' => 'TextInputWidget', + 'buttongroup' => array( + 'class' => 'ButtonGroupWidget', + ), + 'buttoninput' => array( + 'class' => 'ButtonInputWidget', + ), + 'button' => array( + 'class' => 'ButtonWidget', + ), + 'checkboxinput' => array( + 'class' => 'CheckboxInputWidget', + ), + 'icon' => array( + 'class' => 'IconWidget', + ), + 'indicator' => array( + 'class' => 'IndicatorWidget', + ), + 'input' => array( + 'class' => 'InputWidget', + ), + 'label' => array( + 'class' => 'LabelWidget', + ), + 'radioinput' => array( + 'class' => 'RadioInputWidget', + ), + 'textinput' => array( + 'class' => 'TextInputWidget', + ), + 'deferred' => array( + 'class' => 'DeferredWidget', + ), ); $container['languages'] = array( diff --git a/resources/Resources.php b/resources/Resources.php in
[MediaWiki-commits] [Gerrit] Update CSS according to the new typography spec - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Update CSS according to the new typography spec .. Update CSS according to the new typography spec Bug: T87710 Change-Id: I3e4ec8889dc0ed9d695940e1c4bd08de63c91505 --- M resources/master.less 1 file changed, 27 insertions(+), 9 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/master.less b/resources/master.less index 96977ed..792fed9 100644 --- a/resources/master.less +++ b/resources/master.less @@ -5,25 +5,43 @@ } h1 { - font: 2em 'Geogia', 'Times', serif; - padding-bottom: 0.3em; - border-bottom: 1px solid #ddd; + font: 3em 'Georgia', 'Times', serif; + font-weight: bold; + line-height: 1.25; + padding: 0; + margin: 0; + margin-top: 1em; + + .content-actions { + float: right; + + a { + text-align: right; + font: 0.5em sans-serif; + } + } } h2 { - font: 1.5em 'Helvetica', 'Arial', sans-serif; - font-weight: bold; - margin-bottom: 0.5em; + font: 2em 'Georgia', 'Times', serif; + line-height: 1.25; + padding-bottom: 0.2em; + border-bottom: 1px solid #ccc; } -h3 { - margin-top: 0; +h3, h4 { font: 1.2em 'Helvetica', 'Arial', sans-serif; + line-height: 1.5; font-weight: bold; + padding: 0; + margin-top: 1.2em; + margin-bottom: 0.8em; } p { - font: 0.8em 'Helvetica', 'Arial', sans-serif; + margin-top: 1.2em; + font: 1em 'Helvetica', 'Arial', sans-serif; + line-height: 1.5; } .example_container { -- To view, visit https://gerrit.wikimedia.org/r/187071 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3e4ec8889dc0ed9d695940e1c4bd08de63c91505 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move navigation and account links under a dropdown - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Move navigation and account links under a dropdown .. Move navigation and account links under a dropdown Change-Id: Ia6f42ea140e446322104bb8e5339e71bc2316632 --- M templates/Skin.php M templates/Skin.template M templates/sidebar.template 3 files changed, 48 insertions(+), 38 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/templates/Skin.php b/templates/Skin.php index eee95a2..2d0b111 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -192,22 +192,29 @@ return ''.$cx['funcs']['v']($cx, $in, array('headelement')).' - -'.'Navigation - -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' - -';}).' - - -'.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('loggedin' ? 'Logged in - ' : ' - Not logged in -').' - -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' -';}).' '.' + +'.' + + + + + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' + +';}).' + + + + + + + + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' +';}).' + +'.' diff --git a/templates/Skin.template b/templates/Skin.template index f4d6bf3..9b70a50 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -1,6 +1,6 @@ {{{headelement}}} - + {{>sidebar}} diff --git a/templates/sidebar.template b/templates/sidebar.template index 5370cf2..f5d9b2e 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -1,21 +1,24 @@ -Navigation - -{{#each sidebar.navigation}} - - {{text}} - -{{/each}} - - - - {{#if loggedin}} - Logged in - {{else}} - Not logged in - {{/if}} - - -{{#each personal_urls}} - {{text}} -{{/each}} - \ No newline at end of file + + + + + + + {{#each sidebar.navigation}} + + {{text}} + + {{/each}} + + + + + + + + + {{#each personal_urls}} + {{text}} + {{/each}} + + -- To view, visit https://gerrit.wikimedia.org/r/186605 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6f42ea140e446322104bb8e5339e71bc2316632 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] README: Fix path - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: README: Fix path .. README: Fix path Change-Id: I368544ce59525f00d1746b024dcdf0fb913704bb --- M README.md 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 2c2fcbd..29cc0a3 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ Clone the skin in `mediawiki/skins/` and install dependencies: ``` $ git clone g...@github.com:werdnum/LivingStyleGuideSkin.git LivingStyleGuide -$ cd LivingStyleGuideSkin +$ cd LivingStyleGuide $ composer install $ bower install ``` Enable and set the skin as default, add this to `LocalSettings.php`: ```php -require_once "$IP/skins/LivingStyleGuideSkin/LivingStyleGuide.php"; +require_once "$IP/skins/LivingStyleGuide/LivingStyleGuide.php"; $wgDefaultSkin = "LivingStyleGuide"; ``` \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186326 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I368544ce59525f00d1746b024dcdf0fb913704bb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add README - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Add README .. Add README Change-Id: I8dffe699b18f62247a68c4e142aff4581896d8f0 --- A README.md 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/README.md b/README.md new file mode 100644 index 000..2c2fcbd --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# LivingStyleGuideSkin + +MediaWiki skin for the the living styleguide. + +## Installation + +Clone the skin in `mediawiki/skins/` and install dependencies: +``` +$ git clone g...@github.com:werdnum/LivingStyleGuideSkin.git LivingStyleGuide +$ cd LivingStyleGuideSkin +$ composer install +$ bower install +``` + +Enable and set the skin as default, add this to `LocalSettings.php`: +```php +require_once "$IP/skins/LivingStyleGuideSkin/LivingStyleGuide.php"; +$wgDefaultSkin = "LivingStyleGuide"; +``` \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8dffe699b18f62247a68c4e142aff4581896d8f0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove bower dependency to living-styleguide-template - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Remove bower dependency to living-styleguide-template .. Remove bower dependency to living-styleguide-template - Move the JS and CSS files over to resources - Remove the old module - Remove skin.less and make it part of master.less Change-Id: Ic8e8ec49b8bececf2b8e3ed19398cd32d044965a --- M LivingStyleGuide.php M bower.json A resources/master.less A resources/menu.js A resources/menu.svg A resources/search.svg A resources/search_active.svg D resources/skin.less M src/SkinLivingStyleGuide.php 9 files changed, 200 insertions(+), 27 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index bc1050f..6207825 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -49,20 +49,13 @@ 'scripts' => 'js/bootstrap.min.js', 'styles' => 'css/bootstrap.min.css', ), - 'skin.styleguide.template' => array( - 'localBasePath' => __DIR__ . "/bower_components/living-styleguide-template/resources", - 'remoteSkinPath' => 'LivingStyleGuide/bower_components/living-styleguide-template/resources', + 'skin.styleguide' => array( + 'localBasePath' => __DIR__ . "/resources", + 'remoteSkinPath' => 'LivingStyleGuide/resources', 'group' => 'ext.lightncandyskin', 'styles' => 'master.less', 'scripts' => 'menu.js', - 'dependencies' => 'ext.bootstrap', - ), - 'skin.styleguide' => array( - 'localBasePath' => __DIR__ . "/resources", - 'remoteSkinPath' => 'LivingStyleGuideSkin/resources', - 'group' => 'ext.lightncandyskin', - 'styles' => 'skin.less', - 'dependencies' => array( 'skin.styleguide.template' ), + 'dependencies' => 'ext.bootstrap' ), ); diff --git a/bower.json b/bower.json index 9570fcc..9bcfd56 100644 --- a/bower.json +++ b/bower.json @@ -16,7 +16,6 @@ "tests" ], "dependencies": { -"bootstrap": "~3.3.1", -"living-styleguide-template" : "prtksxna/living-styleguide-template#~0.0.2" +"bootstrap": "~3.3.1" } } diff --git a/resources/master.less b/resources/master.less new file mode 100644 index 000..96977ed --- /dev/null +++ b/resources/master.less @@ -0,0 +1,155 @@ +/* Typography */ +body { + color: #333; + font-size: 16px; +} + +h1 { + font: 2em 'Geogia', 'Times', serif; + padding-bottom: 0.3em; + border-bottom: 1px solid #ddd; +} + +h2 { + font: 1.5em 'Helvetica', 'Arial', sans-serif; + font-weight: bold; + margin-bottom: 0.5em; +} + +h3 { + margin-top: 0; + font: 1.2em 'Helvetica', 'Arial', sans-serif; + font-weight: bold; +} + +p { + font: 0.8em 'Helvetica', 'Arial', sans-serif; +} + +.example_container { + margin: 2em 0; + padding: 1em; + background: #f9f9f9; +} +/* Typography */ + +html, body { + height: 100%; +} + +/* Offscreen Navigation */ +#site-wrap { + min-width: 100%; + min-height: 100%; + background-color: #fff; + position: relative; + top: 0; + bottom: 100%; + left: 0; + z-index: 1; + transition: left 0.2s; +} + + +.site-shift { + left: 200px !important; + box-shadow: 0 0 20px 5px rgba(0,0,0,0.2); + + .navbar { + left: 200px !important; + } +} + +#off-navigation { + width: 100%; + height: 100%; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 0; + background-color: #f9f9f9; + color: #333; + + ul { + list-style: none; + padding: 10px 20px; + + li { + padding: 10px 0; + + a { + color: #333; + } + } + } +} +/* Offscreen Navigation */ + +/* Navbar */ +.navbar { + border: none; + position: fixed; + top: 0; + left: 0; + z-index: 1; + background-color: inherit; + width: 100%; + height: 50px; + transition: left 0.2s; + + .search-input { + background: transparent; + border: none; + color: #333; + box-shadow: none; + width: 300px; + background-image: url( 'search.svg' ); + background-position: center left; + background-repeat: no-repeat; + padding-left: 30px; + + &:focus { + background-image: url( 'search_active.svg' ); + background-position: center left; + background-repeat: no-repeat; + outli
[MediaWiki-commits] [Gerrit] Add ~ to bower component version so we don't have to keep bu... - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Add ~ to bower component version so we don't have to keep bumping it .. Add ~ to bower component version so we don't have to keep bumping it Change-Id: I3066f48338ab48fe9051fb2f629ac7775489203e --- M bower.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/bower.json b/bower.json index 3b2223f..9570fcc 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,6 @@ ], "dependencies": { "bootstrap": "~3.3.1", -"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.2" +"living-styleguide-template" : "prtksxna/living-styleguide-template#~0.0.2" } } -- To view, visit https://gerrit.wikimedia.org/r/186130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3066f48338ab48fe9051fb2f629ac7775489203e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add ~ to bower component version so we don't have to keep bu... - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/186130 Change subject: Add ~ to bower component version so we don't have to keep bumping it .. Add ~ to bower component version so we don't have to keep bumping it Change-Id: I3066f48338ab48fe9051fb2f629ac7775489203e --- M bower.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/30/186130/1 diff --git a/bower.json b/bower.json index 3b2223f..9570fcc 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,6 @@ ], "dependencies": { "bootstrap": "~3.3.1", -"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.2" +"living-styleguide-template" : "prtksxna/living-styleguide-template#~0.0.2" } } -- To view, visit https://gerrit.wikimedia.org/r/186130 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3066f48338ab48fe9051fb2f629ac7775489203e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump living-styleguide-template version - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Bump living-styleguide-template version .. Bump living-styleguide-template version Change-Id: Id56349c1195daae27f801eec3c7ced402360d98d --- M bower.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/bower.json b/bower.json index b822173..3b2223f 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,6 @@ ], "dependencies": { "bootstrap": "~3.3.1", -"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.1" +"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.2" } } -- To view, visit https://gerrit.wikimedia.org/r/186129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id56349c1195daae27f801eec3c7ced402360d98d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump living-styleguide-template version - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/186129 Change subject: Bump living-styleguide-template version .. Bump living-styleguide-template version Change-Id: Id56349c1195daae27f801eec3c7ced402360d98d --- M bower.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/29/186129/1 diff --git a/bower.json b/bower.json index b822173..3b2223f 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,6 @@ ], "dependencies": { "bootstrap": "~3.3.1", -"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.1" +"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.2" } } -- To view, visit https://gerrit.wikimedia.org/r/186129 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id56349c1195daae27f801eec3c7ced402360d98d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MediaWikify further - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: MediaWikify further .. MediaWikify further * Add content actions and personal URLs. * Still to come: Namespaces and extra actions Change-Id: I2de650f18dff3f84b7c9adda5d792be9fb6c01cf --- M resources/skin.less M templates/Skin.php M templates/Skin.template M templates/sidebar.template 4 files changed, 52 insertions(+), 0 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/skin.less b/resources/skin.less index 415c4e2..70e037b 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -2,4 +2,12 @@ #contentSub, #siteSub { display: none; } +} + +.content-actions { + font-size: 0.5em; + + a { + margin-left: 0.75em; + } } \ No newline at end of file diff --git a/templates/Skin.php b/templates/Skin.php index 9168e33..eee95a2 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -198,6 +198,15 @@ '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' +';}).' + + +'.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('loggedin' ? 'Logged in + ' : ' + Not logged in +').' + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' ';}).' '.' @@ -230,6 +239,16 @@ '.$cx['funcs']['v']($cx, $in, array('title')).' + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('content_navigation','views')), $in, true, function($cx, $in) {return ' + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' + +';}).' '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('isarticle' ? ' '.$cx['funcs']['ch']($cx, 'msg', array(array('tagline'),array()), 'enc').' ' : '').' diff --git a/templates/Skin.template b/templates/Skin.template index 54db488..f4d6bf3 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -34,6 +34,18 @@ {{{title}}} + + {{#each content_navigation.views}} + + {{text}} + + {{/each}} + {{#if isarticle}} {{msg "tagline"}} diff --git a/templates/sidebar.template b/templates/sidebar.template index 5cb9a14..5370cf2 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -5,4 +5,17 @@ {{text}} {{/each}} + + + + {{#if loggedin}} + Logged in + {{else}} + Not logged in + {{/if}} + + +{{#each personal_urls}} + {{text}} +{{/each}} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2de650f18dff3f84b7c9adda5d792be9fb6c01cf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] MediaWikify further - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/186122 Change subject: MediaWikify further .. MediaWikify further * Add content actions and personal URLs. * Still to come: Namespaces and extra actions Change-Id: I2de650f18dff3f84b7c9adda5d792be9fb6c01cf --- M resources/skin.less M templates/Skin.php M templates/Skin.template M templates/sidebar.template 4 files changed, 52 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/22/186122/1 diff --git a/resources/skin.less b/resources/skin.less index 415c4e2..70e037b 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -2,4 +2,12 @@ #contentSub, #siteSub { display: none; } +} + +.content-actions { + font-size: 0.5em; + + a { + margin-left: 0.75em; + } } \ No newline at end of file diff --git a/templates/Skin.php b/templates/Skin.php index 9168e33..eee95a2 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -198,6 +198,15 @@ '.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('sidebar','navigation')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' +';}).' + + +'.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('loggedin' ? 'Logged in + ' : ' + Not logged in +').' + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('personal_urls')), $in, true, function($cx, $in) {return ' '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' ';}).' '.' @@ -230,6 +239,16 @@ '.$cx['funcs']['v']($cx, $in, array('title')).' + +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('content_navigation','views')), $in, true, function($cx, $in) {return ' + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' + +';}).' '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('isarticle' ? ' '.$cx['funcs']['ch']($cx, 'msg', array(array('tagline'),array()), 'enc').' ' : '').' diff --git a/templates/Skin.template b/templates/Skin.template index 54db488..f4d6bf3 100755 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -34,6 +34,18 @@ {{{title}}} + + {{#each content_navigation.views}} + + {{text}} + + {{/each}} + {{#if isarticle}} {{msg "tagline"}} diff --git a/templates/sidebar.template b/templates/sidebar.template index 5cb9a14..5370cf2 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -5,4 +5,17 @@ {{text}} {{/each}} + + + + {{#if loggedin}} + Logged in + {{else}} + Not logged in + {{/if}} + + +{{#each personal_urls}} + {{text}} +{{/each}} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186122 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2de650f18dff3f84b7c9adda5d792be9fb6c01cf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix event logging issues - change (mediawiki...Popups)
Werdna has submitted this change and it was merged. Change subject: Fix event logging issues .. Fix event logging issues - Don't prevent the link click event. - Check with the currentLink element rather than jQuery selectoin. - Add click handler to images (used to be only extract). - Stop the 'closePopup' if 'reset' has already been run. Bug: T86378 Change-Id: I8748ecffe55954425656c5103fa9ddc99b6f3f72 --- M resources/ext.popups.eventlogging.js M resources/ext.popups.renderer.js 2 files changed, 13 insertions(+), 4 deletions(-) Approvals: Werdna: Looks good to me, approved diff --git a/resources/ext.popups.eventlogging.js b/resources/ext.popups.eventlogging.js index 3e7b183..05e4f33 100644 --- a/resources/ext.popups.eventlogging.js +++ b/resources/ext.popups.eventlogging.js @@ -46,7 +46,6 @@ event.preventDefault(); } } - return false; }; /** diff --git a/resources/ext.popups.renderer.js b/resources/ext.popups.renderer.js index ed45ed0..3d17c5f 100644 --- a/resources/ext.popups.renderer.js +++ b/resources/ext.popups.renderer.js @@ -65,8 +65,13 @@ mw.popups.render.render = function ( link, event ) { // This will happen when the mouse goes from the popup box back to the // anchor tag. In such a case, the timer to close the box is cleared. - if ( mw.popups.render.currentLink === link ) { - mw.popups.render.closeTimer.abort(); + if ( + mw.popups.render.currentLink && + mw.popups.render.currentLink[0] === link[0] + ) { + if ( mw.popups.render.closeTimer ) { + mw.popups.render.closeTimer.abort(); + } return; } @@ -81,6 +86,7 @@ if ( link.attr( 'href' ) === '#' ) { return; } + mw.popups.render.currentLink = link; link.on( 'mouseleave blur', mw.popups.render.leaveInactive ); @@ -147,7 +153,7 @@ // Event logging mw.popups.eventLogging.time = mw.now(); mw.popups.eventLogging.action = 'dismissed'; - mw.popups.$popup.find( 'a.mwe-popups-extract' ).click( mw.popups.eventLogging.logClick ); + mw.popups.$popup.find( 'a.mwe-popups-extract, a.mwe-popups-discreet' ).click( mw.popups.eventLogging.logClick ); link .off( 'mouseleave blur', mw.popups.render.leaveInactive ) @@ -163,6 +169,10 @@ * @method closePopup */ mw.popups.render.closePopup = function () { + if ( mw.popups.render.currentLink === undefined ) { + return false; + } + mw.popups.eventLogging.duration = mw.now() - mw.popups.eventLogging.time; mw.popups.eventLogging.logEvent(); -- To view, visit https://gerrit.wikimedia.org/r/184626 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8748ecffe55954425656c5103fa9ddc99b6f3f72 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Werdna Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some CSS/JS loading issues: * Load template styles first... - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Fix some CSS/JS loading issues: * Load template styles first to stop FUOC. * Fix bower version to exclude Agora Grid for now. * Hide #siteSub too. .. Fix some CSS/JS loading issues: * Load template styles first to stop FUOC. * Fix bower version to exclude Agora Grid for now. * Hide #siteSub too. Change-Id: Ia30bf5a7dd318ed63e378c2fa75e67f2b88b5356 --- M LivingStyleGuide.php M bower.json M resources/skin.less M src/SkinLivingStyleGuide.php 4 files changed, 4 insertions(+), 4 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 9b1d2a3..bc1050f 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -61,7 +61,7 @@ 'localBasePath' => __DIR__ . "/resources", 'remoteSkinPath' => 'LivingStyleGuideSkin/resources', 'group' => 'ext.lightncandyskin', - 'styles' => 'resources/skin.less', + 'styles' => 'skin.less', 'dependencies' => array( 'skin.styleguide.template' ), ), ); diff --git a/bower.json b/bower.json index bb63f26..b822173 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,6 @@ ], "dependencies": { "bootstrap": "~3.3.1", -"living-styleguide-template" : "prtksxna/living-styleguide-template" +"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.1" } } diff --git a/resources/skin.less b/resources/skin.less index 4a1229c..415c4e2 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -1,5 +1,5 @@ @media screen { - #contentSub { + #contentSub, #siteSub { display: none; } } \ No newline at end of file diff --git a/src/SkinLivingStyleGuide.php b/src/SkinLivingStyleGuide.php index e43e46e..0d28df7 100755 --- a/src/SkinLivingStyleGuide.php +++ b/src/SkinLivingStyleGuide.php @@ -12,6 +12,6 @@ public function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles( array( 'skin.styleguide', 'ext.bootstrap' ) ); + $out->addModuleStyles( array( 'skin.styleguide', 'ext.bootstrap', 'skin.styleguide.template' ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/186087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia30bf5a7dd318ed63e378c2fa75e67f2b88b5356 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some CSS/JS loading issues: * Load template styles first... - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/186087 Change subject: Fix some CSS/JS loading issues: * Load template styles first to stop FUOC. * Fix bower version to exclude Agora Grid for now. * Hide #siteSub too. .. Fix some CSS/JS loading issues: * Load template styles first to stop FUOC. * Fix bower version to exclude Agora Grid for now. * Hide #siteSub too. Change-Id: Ia30bf5a7dd318ed63e378c2fa75e67f2b88b5356 --- M LivingStyleGuide.php M bower.json M resources/skin.less M src/SkinLivingStyleGuide.php 4 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/87/186087/1 diff --git a/LivingStyleGuide.php b/LivingStyleGuide.php index 9b1d2a3..bc1050f 100644 --- a/LivingStyleGuide.php +++ b/LivingStyleGuide.php @@ -61,7 +61,7 @@ 'localBasePath' => __DIR__ . "/resources", 'remoteSkinPath' => 'LivingStyleGuideSkin/resources', 'group' => 'ext.lightncandyskin', - 'styles' => 'resources/skin.less', + 'styles' => 'skin.less', 'dependencies' => array( 'skin.styleguide.template' ), ), ); diff --git a/bower.json b/bower.json index bb63f26..b822173 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,6 @@ ], "dependencies": { "bootstrap": "~3.3.1", -"living-styleguide-template" : "prtksxna/living-styleguide-template" +"living-styleguide-template" : "prtksxna/living-styleguide-template#v0.0.1" } } diff --git a/resources/skin.less b/resources/skin.less index 4a1229c..415c4e2 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -1,5 +1,5 @@ @media screen { - #contentSub { + #contentSub, #siteSub { display: none; } } \ No newline at end of file diff --git a/src/SkinLivingStyleGuide.php b/src/SkinLivingStyleGuide.php index e43e46e..0d28df7 100755 --- a/src/SkinLivingStyleGuide.php +++ b/src/SkinLivingStyleGuide.php @@ -12,6 +12,6 @@ public function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles( array( 'skin.styleguide', 'ext.bootstrap' ) ); + $out->addModuleStyles( array( 'skin.styleguide', 'ext.bootstrap', 'skin.styleguide.template' ) ); } } -- To view, visit https://gerrit.wikimedia.org/r/186087 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia30bf5a7dd318ed63e378c2fa75e67f2b88b5356 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove reference to lib/autoload.php - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Remove reference to lib/autoload.php .. Remove reference to lib/autoload.php Change-Id: I2307d4cdd14f6f08de0b22764a149b1110f22dc0 --- M OOUIPlayground.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/OOUIPlayground.php b/OOUIPlayground.php index 08b84e6..13707ce 100644 --- a/OOUIPlayground.php +++ b/OOUIPlayground.php @@ -46,7 +46,6 @@ $dir = dirname( __FILE__ ); require_once __DIR__ . "/autoload.php"; -require_once __DIR__ . "/lib/autoload.php"; require_once __DIR__ . "/vendor/autoload.php"; require_once __DIR__ . "/resources/Resources.php"; -- To view, visit https://gerrit.wikimedia.org/r/186018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2307d4cdd14f6f08de0b22764a149b1110f22dc0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove reference to lib/autoload.php - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/186018 Change subject: Remove reference to lib/autoload.php .. Remove reference to lib/autoload.php Change-Id: I2307d4cdd14f6f08de0b22764a149b1110f22dc0 --- M OOUIPlayground.php 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/18/186018/1 diff --git a/OOUIPlayground.php b/OOUIPlayground.php index 08b84e6..13707ce 100644 --- a/OOUIPlayground.php +++ b/OOUIPlayground.php @@ -46,7 +46,6 @@ $dir = dirname( __FILE__ ); require_once __DIR__ . "/autoload.php"; -require_once __DIR__ . "/lib/autoload.php"; require_once __DIR__ . "/vendor/autoload.php"; require_once __DIR__ . "/resources/Resources.php"; -- To view, visit https://gerrit.wikimedia.org/r/186018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2307d4cdd14f6f08de0b22764a149b1110f22dc0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hide #contentSub - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Hide #contentSub .. Hide #contentSub Change-Id: I709ddb70eb7bc42fb288ec2bcd988c79559506cb --- M resources/skin.less 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/resources/skin.less b/resources/skin.less index e69de29..4a1229c 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -0,0 +1,5 @@ +@media screen { + #contentSub { + display: none; + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I709ddb70eb7bc42fb288ec2bcd988c79559506cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...LivingStyleGuide)
Werdna has submitted this change and it was merged. Change subject: Add .gitreview .. Add .gitreview Change-Id: Iba827d02e119f85c04a9f82e6be075fb42e257fb --- A .gitreview 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..eb56e13 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/skins/LivingStyleGuide.git +defaultbranch=master \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iba827d02e119f85c04a9f82e6be075fb42e257fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/186012 Change subject: Add .gitreview .. Add .gitreview Change-Id: Iba827d02e119f85c04a9f82e6be075fb42e257fb --- A .gitreview 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/12/186012/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..eb56e13 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/skins/LivingStyleGuide.git +defaultbranch=master \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba827d02e119f85c04a9f82e6be075fb42e257fb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hide #contentSub - change (mediawiki...LivingStyleGuide)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/186011 Change subject: Hide #contentSub .. Hide #contentSub Change-Id: I709ddb70eb7bc42fb288ec2bcd988c79559506cb --- M resources/skin.less 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/LivingStyleGuide refs/changes/11/186011/1 diff --git a/resources/skin.less b/resources/skin.less index e69de29..4a1229c 100644 --- a/resources/skin.less +++ b/resources/skin.less @@ -0,0 +1,5 @@ +@media screen { + #contentSub { + display: none; + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/186011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I709ddb70eb7bc42fb288ec2bcd988c79559506cb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/LivingStyleGuide Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove lib directory, useless - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Remove lib directory, useless .. Remove lib directory, useless Change-Id: Ie9d53b6e32f42d39badeaefcbb66c3f0f93719ba --- D lib/autoload.php D lib/oojs-ui 2 files changed, 0 insertions(+), 38 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/lib/autoload.php b/lib/autoload.php deleted file mode 100644 index 6533a04..000 --- a/lib/autoload.php +++ /dev/null @@ -1,38 +0,0 @@ - __DIR__ . '/oojs-ui/php/elements/ButtonElement.php', - 'OOUI\\ButtonGroupWidget' => __DIR__ . '/oojs-ui/php/widgets/ButtonGroupWidget.php', - 'OOUI\\ButtonInputWidget' => __DIR__ . '/oojs-ui/php/widgets/ButtonInputWidget.php', - 'OOUI\\ButtonWidget' => __DIR__ . '/oojs-ui/php/widgets/ButtonWidget.php', - 'OOUI\\CheckboxInputWidget' => __DIR__ . '/oojs-ui/php/widgets/CheckboxInputWidget.php', - 'OOUI\\Element' => __DIR__ . '/oojs-ui/php/Element.php', - 'OOUI\\ElementMixin' => __DIR__ . '/oojs-ui/php/ElementMixin.php', - 'OOUI\\Exception' => __DIR__ . '/oojs-ui/php/Exception.php', - 'OOUI\\FieldLayout' => __DIR__ . '/oojs-ui/php/layouts/FieldLayout.php', - 'OOUI\\FieldsetLayout' => __DIR__ . '/oojs-ui/php/layouts/FieldsetLayout.php', - 'OOUI\\FlaggedElement' => __DIR__ . '/oojs-ui/php/elements/FlaggedElement.php', - 'OOUI\\FormLayout' => __DIR__ . '/oojs-ui/php/layouts/FormLayout.php', - 'OOUI\\GridLayout' => __DIR__ . '/oojs-ui/php/layouts/GridLayout.php', - 'OOUI\\GroupElement' => __DIR__ . '/oojs-ui/php/elements/GroupElement.php', - 'OOUI\\HtmlSnippet' => __DIR__ . '/oojs-ui/php/HtmlSnippet.php', - 'OOUI\\IconElement' => __DIR__ . '/oojs-ui/php/elements/IconElement.php', - 'OOUI\\IconWidget' => __DIR__ . '/oojs-ui/php/widgets/IconWidget.php', - 'OOUI\\IndicatorElement' => __DIR__ . '/oojs-ui/php/elements/IndicatorElement.php', - 'OOUI\\IndicatorWidget' => __DIR__ . '/oojs-ui/php/widgets/IndicatorWidget.php', - 'OOUI\\InputWidget' => __DIR__ . '/oojs-ui/php/widgets/InputWidget.php', - 'OOUI\\LabelElement' => __DIR__ . '/oojs-ui/php/elements/LabelElement.php', - 'OOUI\\LabelWidget' => __DIR__ . '/oojs-ui/php/widgets/LabelWidget.php', - 'OOUI\\Layout' => __DIR__ . '/oojs-ui/php/Layout.php', - 'OOUI\\MediaWikiTheme' => __DIR__ . '/oojs-ui/php/themes/MediaWikiTheme.php', - 'OOUI\\PanelLayout' => __DIR__ . '/oojs-ui/php/layouts/PanelLayout.php', - 'OOUI\\RadioInputWidget' => __DIR__ . '/oojs-ui/php/widgets/RadioInputWidget.php', - 'OOUI\\Tag' => __DIR__ . '/oojs-ui/php/Tag.php', - 'OOUI\\TextInputWidget' => __DIR__ . '/oojs-ui/php/widgets/TextInputWidget.php', - 'OOUI\\Theme' => __DIR__ . '/oojs-ui/php/Theme.php', - 'OOUI\\TitledElement' => __DIR__ . '/oojs-ui/php/elements/TitledElement.php', - 'OOUI\\Widget' => __DIR__ . '/oojs-ui/php/Widget.php', -); diff --git a/lib/oojs-ui b/lib/oojs-ui deleted file mode 16 index 4983a2e..000 --- a/lib/oojs-ui +++ /dev/null -Subproject commit 4983a2e7ad1632c16e5b22526e3ee7b87285f4fa -- To view, visit https://gerrit.wikimedia.org/r/184894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie9d53b6e32f42d39badeaefcbb66c3f0f93719ba Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...OOUIPlayground)
Werdna has submitted this change and it was merged. Change subject: Add .gitreview .. Add .gitreview Change-Id: I6b5006330af4d8cb2830442471bdd20e3946e9f4 --- A .gitreview 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Werdna: Verified; Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..9d15912 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/OOUIPlayground.git +defaultbranch=master \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/184895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b5006330af4d8cb2830442471bdd20e3946e9f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna Gerrit-Reviewer: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/184895 Change subject: Add .gitreview .. Add .gitreview Change-Id: I6b5006330af4d8cb2830442471bdd20e3946e9f4 --- A .gitreview 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/95/184895/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..9d15912 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/OOUIPlayground.git +defaultbranch=master \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/184895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b5006330af4d8cb2830442471bdd20e3946e9f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...OOUIPlayground)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/184894 Change subject: Add .gitreview .. Add .gitreview Change-Id: Ie9d53b6e32f42d39badeaefcbb66c3f0f93719ba --- A .gitreview 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OOUIPlayground refs/changes/94/184894/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..9d15912 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=mediawiki/extensions/OOUIPlayground.git +defaultbranch=master \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/184894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9d53b6e32f42d39badeaefcbb66c3f0f93719ba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OOUIPlayground Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add living_style_guide role - change (mediawiki/vagrant)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/184891 Change subject: Add living_style_guide role .. Add living_style_guide role Change-Id: Ic840ff2c61607ff02195379d7d4295117367b126 --- A puppet/modules/role/manifests/living_style_guide.pp 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/91/184891/1 diff --git a/puppet/modules/role/manifests/living_style_guide.pp b/puppet/modules/role/manifests/living_style_guide.pp new file mode 100644 index 000..3fb8ba0 --- /dev/null +++ b/puppet/modules/role/manifests/living_style_guide.pp @@ -0,0 +1,15 @@ +class role::living_style_guide { + mediawiki::extension {'OOUIPlayground': + composer => true, + } + + mediawiki::skin {'LivingStyleGuide': + default => true, + } + + notify {"MediaWiki directory: ${::mediawiki::dir}":} + + php::composer::install{ "${::mediawiki::dir}/skins/LivingStyleGuide": + require => Git::Clone["mediawiki/skins/LivingStyleGuide"], + } +} -- To view, visit https://gerrit.wikimedia.org/r/184891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic840ff2c61607ff02195379d7d4295117367b126 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Composer exec "creates" should be vendor, not composer.lock - change (mediawiki/vagrant)
Werdna has uploaded a new change for review. https://gerrit.wikimedia.org/r/184890 Change subject: Composer exec "creates" should be vendor, not composer.lock .. Composer exec "creates" should be vendor, not composer.lock The composer documentation recommends committing composer.lock into your source repo: https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file Change-Id: I69d658d584ea83254a83086242085266f24c327c --- M puppet/modules/php/manifests/composer/install.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/90/184890/1 diff --git a/puppet/modules/php/manifests/composer/install.pp b/puppet/modules/php/manifests/composer/install.pp index 25aeb37..fdfb181 100644 --- a/puppet/modules/php/manifests/composer/install.pp +++ b/puppet/modules/php/manifests/composer/install.pp @@ -29,7 +29,7 @@ 'COMPOSER_NO_INTERACTION=1', ], user=> 'vagrant', -creates => "${directory}/composer.lock", +creates => "${directory}/vendor", require => [ Class['::php::composer'], ], -- To view, visit https://gerrit.wikimedia.org/r/184890 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I69d658d584ea83254a83086242085266f24c327c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Werdna ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits