[MediaWiki-commits] [Gerrit] mediawiki...BlueSky[master]: Fix language and category wrapping issue

2017-12-09 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396809 )

Change subject: Fix language and category wrapping issue
..

Fix language and category wrapping issue

They were doing stupid overflow. Now they shouldn't. Leave
me alone.

Change-Id: I728fb9b71ce5bed528243df35b56b420ae311b08
---
M resources/screen-desktop.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/09/396809/1

diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less
index 771a7c4..f02eada 100644
--- a/resources/screen-desktop.less
+++ b/resources/screen-desktop.less
@@ -567,7 +567,7 @@
margin-top: .5em;
 
li {
-   display: inline;
+   display: inline-block;
}
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/396809
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I728fb9b71ce5bed528243df35b56b420ae311b08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSky
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...BlueSky[master]: Refactor BlueSkyTemplate

2017-12-09 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396808 )

Change subject: Refactor BlueSkyTemplate
..

Refactor BlueSkyTemplate

Hopefully saner. More functions than before, as if there
weren't enough already.
Nothing seems more broken than was previously?

Change-Id: I0c9c59313a99583a85954173dc7f09b45a19bbac
---
M BlueSkyTemplate.php
1 file changed, 375 insertions(+), 371 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/08/396808/1

diff --git a/BlueSkyTemplate.php b/BlueSkyTemplate.php
index 4bdd4bd..6ef0c5a 100644
--- a/BlueSkyTemplate.php
+++ b/BlueSkyTemplate.php
@@ -22,12 +22,6 @@
 * Outputs the entire contents of the page
 */
public function execute() {
-   global $wgContLang, $wgHideInterlanguageLinks;
-
-   //get stupid tools pile; we'll dump these on the page throughout
-   $this->allTools = $this->getPageTools();
-
-   // All this so we know what view mode and stuff we're in...?
$skin = $this->getSkin();
$title = $skin->getTitle();
$request = $skin->getRequest();
@@ -35,387 +29,348 @@
if ( count( $request->getVal( 'diff' ) ) > 0 ) {
$action = 'diff';
}
+   $namespace = $title->getNamespace();
+   $user = $skin->getUser();
+   //get stupid tools pile; we'll dump these on the page throughout
+   $this->allTools = $this->getPageTools();
// We'll treat the mainpage like any other page if they're 
doing something besides looking at it
$this->isMainPage = ( $title->isMainPage() && $action == 'view' 
);
 
-   $namespace = $title->getNamespace();
-   $user = $skin->getUser();
+   // Variables out of the way; open html, body elements, etc
+   $html = $this->get( 'headelement' );
+   $html .= Html::openElement( 'div', [ 'id' => 'mw-wrapper' ] );
 
-   $this->html( 'headelement' );
-   ?>
-   
-   
-   
-'header-outer' ],
+   Html::rawElement( 'div', [ 'class' => 'wrapper-inner', 
'id' => 'header-inner' ],
// Logo block
-   echo $this->getBanner();
-   // Duh.
-   echo $this->getSearch();
+   $this->getBanner() .
+   $this->getSearch() .
// funky tabs
-   echo $this->getMiscNavigation( 'sidebar', 2, 
true );
-   $this->clear();
-   ?>
-   
-   
-   
-   data['sitenotice'] ) {
-   echo Html::rawElement(
+   $this->getMiscNavigation( 'sidebar', 2, true ) .
+   $this->getClear()
+   )
+   );
+
+   $html .= Html::openElement ( 'div', [ 'class' => 
'wrapper-inner', 'id' => 'main-outer' ] );
+
+   if ( $this->data['sitenotice'] ) {
+   $html .= Html::rawElement(
+   'div',
+   [ 'id' => 'siteNotice' ],
+   $this->get( 'sitenotice' )
+   );
+   }
+
+   // Content header
+   if ( $namespace != NS_SPECIAL && !$this->isMainPage ) {
+   $html .= Html::rawElement( 'div', [ 'id' => 
'content-nav' ],
+   Html::rawElement(
'div',
-   [ 'id' => 'siteNotice' ],
-   $this->get( 'sitenotice' )
+   [ 'id' => 'page-tools' ],
+   $this->getPageLinks()
+   ) .
+   Html::rawElement(
+   'div',
+   [ 'id' => 'page-categories' ],
+   $this->getCategoryBreadcrumbs()
+   )
+   );
+   $html .= $this->getClear();
+   $html .= Html::openElement( 'div', [ 'id' => 
'content-header' ] );
+   $html .= $this->getIndicators();
+   $html .= $this->getSpareEditLink();
+   $html .= Html::rawElement(
+   'h1',
+   [
+   'class'

[MediaWiki-commits] [Gerrit] mediawiki...BlueSky[master]: Add some things to SkinBlueSky that people have added to Ski...

2017-12-09 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/396807 )

Change subject: Add some things to SkinBlueSky that people have added to 
SkinTimeless
..

Add some things to SkinBlueSky that people have added to SkinTimeless

No, I don't know why or what they do. Why do you ask?

Change-Id: If17026506bb5519fb19fbbfa076d7ee1befb60fa
---
M BlueSky.skin.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/07/396807/1

diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index 38e292d..0f93ace 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -14,8 +14,12 @@
 * @param $out OutputPage
 */
public function initPage( OutputPage $out ) {
+   parent::initPage( $out );
 
-   $out->addMeta( 'viewport', 'width=device-width, 
initial-scale=1.0' );
+   $out->addMeta( 'viewport',
+   'width=device-width, initial-scale=1.0, ' .
+   'user-scalable=yes, minimum-scale=0.25, 
maximum-scale=5.0'
+   );
 
$out->addModuleStyles( [
'mediawiki.skinning.content.externallinks',

-- 
To view, visit https://gerrit.wikimedia.org/r/396807
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If17026506bb5519fb19fbbfa076d7ee1befb60fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSky
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Put back stupid horrible overflow:auto to keep sidebars from...

2017-11-25 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/393434 )

Change subject: Put back stupid horrible overflow:auto to keep sidebars from 
shoving down all content
..

Put back stupid horrible overflow:auto to keep sidebars from
shoving down all content

Was removed from most boxes in 393113; put it back here only
on mid- and full- content. No need for it on small.
Apparently I suck at reviewing shit.

Bug: T181323
Change-Id: Ic0bc08b9ba542ac16936c27e1dcdaca140fd51a2
---
M resources/screen-desktop-full.less
M resources/screen-desktop-mid.less
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/34/393434/1

diff --git a/resources/screen-desktop-full.less 
b/resources/screen-desktop-full.less
index 8aebea9..afddfa8 100644
--- a/resources/screen-desktop-full.less
+++ b/resources/screen-desktop-full.less
@@ -7,6 +7,7 @@
 #mw-content {
margin-left: @column-left-size;
margin-right: @column-right-size;
+   overflow: auto;
 }
 
 #mw-related-navigation {
diff --git a/resources/screen-desktop-mid.less 
b/resources/screen-desktop-mid.less
index 4a6ed5c..d0f9e5c 100644
--- a/resources/screen-desktop-mid.less
+++ b/resources/screen-desktop-mid.less
@@ -11,6 +11,7 @@
 
 #mw-content {
margin-left: @column-left-size;
+   overflow: auto;
 }
 
 // Redundant content category list

-- 
To view, visit https://gerrit.wikimedia.org/r/393434
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0bc08b9ba542ac16936c27e1dcdaca140fd51a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Revert "Remove brackets around new toctoggle"

2017-11-25 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/393430 )

Change subject: Revert "Remove brackets around new toctoggle"
..


Revert "Remove brackets around new toctoggle"

This reverts commit 366f80701b873b2193edb5e0fe54cb6b98b447d7.

Change-Id: I96e6cdf7739a21ed3a1d86fb37ee863d867d6dbb
---
M resources/screen-common.less
1 file changed, 0 insertions(+), 10 deletions(-)

Approvals:
  Isarra: Verified; Looks good to me, approved



diff --git a/resources/screen-common.less b/resources/screen-common.less
index 0e0a8e9..62030a7 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -461,16 +461,6 @@
 .toctoggle {
color: @background3;
 }
-// Remove brackets around the show/hide button of the TOC
-body :not( :checked ) > .toctogglespan:before,
-body :not( :checked ) > .toctogglespan:after {
-   content: '';
-}
-.toctogglelabel {
-   padding-left: 0; // Overwrite label { padding-left: 0.5em; } from 
forms.less
-   margin-left: 0.5em; // Create new distance to the TOC title without 
increasing the focus ring
-}
-
 #toc li:last-child {
margin-bottom: 0.5em;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/393430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I96e6cdf7739a21ed3a1d86fb37ee863d867d6dbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Revert "Remove brackets around new toctoggle"

2017-11-25 Thread Isarra (Code Review)
Hello Fomafix, SamanthaNguyen, jenkins-bot,

I'd like you to do a code review.  Please visit

https://gerrit.wikimedia.org/r/393430

to review the following change.


Change subject: Revert "Remove brackets around new toctoggle"
..

Revert "Remove brackets around new toctoggle"

This reverts commit 366f80701b873b2193edb5e0fe54cb6b98b447d7.

Change-Id: I96e6cdf7739a21ed3a1d86fb37ee863d867d6dbb
---
M resources/screen-common.less
1 file changed, 0 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/30/393430/1

diff --git a/resources/screen-common.less b/resources/screen-common.less
index 0e0a8e9..62030a7 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -461,16 +461,6 @@
 .toctoggle {
color: @background3;
 }
-// Remove brackets around the show/hide button of the TOC
-body :not( :checked ) > .toctogglespan:before,
-body :not( :checked ) > .toctogglespan:after {
-   content: '';
-}
-.toctogglelabel {
-   padding-left: 0; // Overwrite label { padding-left: 0.5em; } from 
forms.less
-   margin-left: 0.5em; // Create new distance to the TOC title without 
increasing the focus ring
-}
-
 #toc li:last-child {
margin-bottom: 0.5em;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/393430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96e6cdf7739a21ed3a1d86fb37ee863d867d6dbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Remove brackets around new toctoggle

2017-11-25 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392822 )

Change subject: Remove brackets around new toctoggle
..


Remove brackets around new toctoggle

I82db33d656 in core changes the toggle button of the TOC.
This change removes the brackets around the new toctoggle, too.

Depends-On: I82db33d656b3795d7134a91d20ed9d93a3471086
Change-Id: I4ebe356e266a93b2391650ac915940432e02f0ef
---
M resources/screen-common.less
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  jenkins-bot: Verified
  Isarra: Looks good to me, approved



diff --git a/resources/screen-common.less b/resources/screen-common.less
index 62030a7..0e0a8e9 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -461,6 +461,16 @@
 .toctoggle {
color: @background3;
 }
+// Remove brackets around the show/hide button of the TOC
+body :not( :checked ) > .toctogglespan:before,
+body :not( :checked ) > .toctogglespan:after {
+   content: '';
+}
+.toctogglelabel {
+   padding-left: 0; // Overwrite label { padding-left: 0.5em; } from 
forms.less
+   margin-left: 0.5em; // Create new distance to the TOC title without 
increasing the focus ring
+}
+
 #toc li:last-child {
margin-bottom: 0.5em;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/392822
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ebe356e266a93b2391650ac915940432e02f0ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: SamanthaNguyen 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Make Echo icons more likely to remain inline

2017-09-13 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377752 )

Change subject: Make Echo icons more likely to remain inline
..

Make Echo icons more likely to remain inline

Sometimes they wind up stacked vertically. They should be
horizontal. I don't know.

Change-Id: I92eaaa6c2e52944d818f042ea1bfed4a43ed0943
---
M resources/extensions/Echo.less
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/52/377752/1

diff --git a/resources/extensions/Echo.less b/resources/extensions/Echo.less
index 3134059..4993c73 100644
--- a/resources/extensions/Echo.less
+++ b/resources/extensions/Echo.less
@@ -21,6 +21,7 @@
}
li {
margin: 0 0.75em 0 0;
+   float: left;
}
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/377752
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92eaaa6c2e52944d818f042ea1bfed4a43ed0943
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Fix messed up recent changes/watchlist legends

2017-08-15 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/372084 )

Change subject: Fix messed up recent changes/watchlist legends
..

Fix messed up recent changes/watchlist legends

Bug: T173151
Change-Id: Iedf0f7dd9d03ea43db6355ccc09fb731187abf60
---
M resources/screen-common.less
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/84/372084/1

diff --git a/resources/screen-common.less b/resources/screen-common.less
index 428df2b..b3f2319 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -301,6 +301,9 @@
line-height: 1.25;
margin: 1.5em 0 0.5em;
}
+   form dt {
+   margin: 0 0.5em 0 0;
+   }
 
h1,
h2 {

-- 
To view, visit https://gerrit.wikimedia.org/r/372084
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedf0f7dd9d03ea43db6355ccc09fb731187abf60
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Splash[master]: Fix messed up recent changes/watchlist legends

2017-08-15 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/372083 )

Change subject: Fix messed up recent changes/watchlist legends
..

Fix messed up recent changes/watchlist legends

Bug: T132044
Change-Id: I8c5e1974b83f7e18280c761e249582cc4a603f23
---
M resources/screen.less
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Splash 
refs/changes/83/372083/1

diff --git a/resources/screen.less b/resources/screen.less
index 64663b5..b25e1da 100644
--- a/resources/screen.less
+++ b/resources/screen.less
@@ -625,8 +625,11 @@
margin-left: 2em;
text-shadow: 0px 1px 1px #ccc;
}
+   dt {
+   margin: 0 0.5em 0 0;
+   }
}
-   label{
+   label {
padding-left: 1em;
}
.mw-label {

-- 
To view, visit https://gerrit.wikimedia.org/r/372083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c5e1974b83f7e18280c761e249582cc4a603f23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Splash
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Splash[master]: Refactor everything

2017-08-15 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/372078 )

Change subject: Refactor everything
..

Refactor everything

Change-Id: I202c95c606f00e8d370c4f3957a22856adc7a7b6
---
M Splash.skin.php
M SplashTemplate.php
M i18n/en.json
M i18n/qqq.json
D resources/fonts.css
M resources/screen.less
A resources/variables.less
M skin.json
8 files changed, 422 insertions(+), 371 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Splash 
refs/changes/78/372078/1

diff --git a/Splash.skin.php b/Splash.skin.php
index 88985e9..cd7155f 100644
--- a/Splash.skin.php
+++ b/Splash.skin.php
@@ -17,10 +17,10 @@
$out->addMeta( 'viewport', 'width=device-width, 
initial-scale=1, maximum-scale=1' );
 
# Add css/js
-   $out->addModuleStyles( array (
+   $out->addModuleStyles( [
'mediawiki.skinning.content.externallinks',
'skins.splash'
-   ) );
+   ] );
$out->addModuleScripts( 'skins.splash' );
}
 
@@ -29,7 +29,6 @@
 * @param $out OutputPage
 */
function setupSkinUserCss( OutputPage $out ) {
-   global $wgFontCSSLocation;
parent::setupSkinUserCss( $out );
}
 }
diff --git a/SplashTemplate.php b/SplashTemplate.php
index c18a034..8e576fe 100644
--- a/SplashTemplate.php
+++ b/SplashTemplate.php
@@ -7,210 +7,209 @@
 class SplashTemplate extends BaseTemplate {
 
/**
-* Template filter callback for Splash skin.
-* Takes an associative array of data set from a SkinTemplate-based
-* class, and a wrapper for MediaWiki's localization database, and
-* outputs a formatted page.
-*
-* @access private
+* Outputs the entire contents of the page
 */
function execute() {
$user = $this->getSkin()->getUser();
 
-   # Suppress warnings to prevent notices about missing indexes in 
$this->data
-   wfSuppressWarnings();
+   // Menu for global navigation (for cross-wiki stuff or just 
whatever things)
+   $globalLinksMenu = '';
+   if ( wfMessage( 'global-links-menu' )->escaped() ) {
+   $globalLinksMenu = Html::rawElement(
+   'div',
+   [ 'id' => 'global-links', 'class' => 
'mw-portlet', 'role' => 'navigation' ],
+   $this->getNavigation( 'global-links-menu', 
'global-links-menu-header' )
+   );
+   }
 
-   $this->html( 'headelement' );
-   ?>
-   
-   
-   
-   
-   
-   
-   html( 
'userlangattributes' ); ?>>
-   
-   escaped() ) {
-   $this->renderNavigation( 
'global-links-menu', 'main-links' );
-   }
-   ?>
-   
-   
-   
-   isLoggedIn() ) {
-   ?>
-   
-   getName(); ?>
-   
-   
-   
-   
-   
-   html( 
'userlangattributes' ) ?>>
-   getPersonalTools() as $key => $item ) {
-   echo 
$this->makeListItem( $key, $item );
-   }
-   ?>
-   
-   
-   
-   
-   renderPortals( 
$this->data['sidebar'] ); ?>
-   
-   searchBox(); ?>
+   // Personal tools dropdown information
+   $personalToolsMsg = 'personaltools';
+   $personalToolsClass = 'not-logged-in';
+   if ( $user->isLoggedIn() ) {
+   $personalToolsMsg = [ 'splash-personaltools', 
$user->getName() ];
+   $personalToolsClass = 'logged-in';
+   }
 
-   
-   
-   parse(); ?>
-   
-   
-   
-   
-   
-   
-   data['si

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make BaseTemplate::getFooter use 'footer' as default id, and...

2017-08-14 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371952 )

Change subject: Make BaseTemplate::getFooter use 'footer' as default id, and 
make id adjustible (was 'footer-bottom' because I wasn't paying attention)
..

Make BaseTemplate::getFooter use 'footer' as default id, and
make id adjustible (was 'footer-bottom' because I wasn't
paying attention)

'footer' being what pretty much every skin uses in general,
so that'll make it a lot easier to migrate.

No idea what to do about vector, which adds extra wrappers
for all the chunks in the footer.

Change-Id: I336b89b8a04c2f26260a594500d7ed019a5444ef
---
M includes/skins/BaseTemplate.php
1 file changed, 3 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/371952/1

diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index 8d5ce10..27fbc89 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -655,11 +655,12 @@
 *
 * @param string $iconStyle $option for getFooterIcons: "icononly", 
"nocopyright"
 * @param string $linkStyle $option for getFooterLinks: "flat"
+* @param string $id id for footer block; defaults to 'footer'
 *
 * @return string html
 * @since 1.29
 */
-   protected function getFooter( $iconStyle = 'icononly', $linkStyle = 
'flat' ) {
+   protected function getFooter( $iconStyle = 'icononly', $linkStyle = 
'flat', $id = 'footer' ) {
$validFooterIcons = $this->getFooterIcons( $iconStyle );
$validFooterLinks = $this->getFooterLinks( $linkStyle );
 
@@ -667,7 +668,7 @@
 
if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 
0 ) {
$html .= Html::openElement( 'div', [
-   'id' => 'footer-bottom',
+   'id' => $id,
'role' => 'contentinfo',
'lang' => $this->get( 'userlang' ),
'dir' => $this->get( 'dir' )
@@ -763,7 +764,3 @@
$html = MWDebug::getDebugHTML( $this->getSkin()->getContext() );
$html .= $this->get( 'bottomscripts' );
$html .= $this->get( 'reporttime' );
-
-   return $html;
-   }
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/371952
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I336b89b8a04c2f26260a594500d7ed019a5444ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Set wikitext editing textareas to use monospace

2017-08-12 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371699 )

Change subject: Set wikitext editing textareas to use monospace
..

Set wikitext editing textareas to use monospace

Technically should follow UPO (sans, serif, or monospace,
or inherit), but UPO handling is shoddy and doesn't play
well with OOUI nesting.
I25513f17f340a3fe79eede37b07c86874d4fbc35 was an attempt to
fix this properly, but had issues.

Change-Id: Ie070b42ff156b45f2c11dfa8f689ea82b0b53624
---
M modules/ext.CollaborationKit.edit.styles.less
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/99/371699/1

diff --git a/modules/ext.CollaborationKit.edit.styles.less 
b/modules/ext.CollaborationKit.edit.styles.less
index e20f551..90491e1 100644
--- a/modules/ext.CollaborationKit.edit.styles.less
+++ b/modules/ext.CollaborationKit.edit.styles.less
@@ -16,6 +16,11 @@
}
 }
 
+.page-Special_CreateCollaborationHub .oo-ui-textInputWidget textarea,
+.mw-collabkit-modifiededitform .oo-ui-textInputWidget textarea {
+   font-family: monospace;
+}
+
 .mw-ck-hub-topform {
max-width: 50em;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/371699
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie070b42ff156b45f2c11dfa8f689ea82b0b53624
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Splash[master]: Fix previous patch, better skinsplash

2017-08-11 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371603 )

Change subject: Fix previous patch, better skinsplash
..

Fix previous patch, better skinsplash

...feck arse.

Change-Id: I80d4bd860978d24bb3e69ff04e01f48f890f4827
---
M Splash.skin.php
M skin.json
2 files changed, 15 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Splash 
refs/changes/03/371603/1

diff --git a/Splash.skin.php b/Splash.skin.php
index 38b4c0d..88985e9 100644
--- a/Splash.skin.php
+++ b/Splash.skin.php
@@ -9,11 +9,12 @@
$template = 'SplashTemplate', $useHeadElement = true;
 
/**
-* @param $out OutputPage
+* @param OutputPage $out
 */
-   function setupSkinUserCss( OutputPage $out ) {
-   global $wgFontCSSLocation;
-   parent::setupSkinUserCss( $out );
+   public function initPage( OutputPage $out ) {
+   parent::initPage( $out );
+
+   $out->addMeta( 'viewport', 'width=device-width, 
initial-scale=1, maximum-scale=1' );
 
# Add css/js
$out->addModuleStyles( array (
@@ -22,4 +23,13 @@
) );
$out->addModuleScripts( 'skins.splash' );
}
+
+   /**
+* Add CSS via ResourceLoader
+* @param $out OutputPage
+*/
+   function setupSkinUserCss( OutputPage $out ) {
+   global $wgFontCSSLocation;
+   parent::setupSkinUserCss( $out );
+   }
 }
diff --git a/skin.json b/skin.json
index f527a19..c16e7d6 100644
--- a/skin.json
+++ b/skin.json
@@ -18,7 +18,7 @@
},
"AutoloadClasses": {
"SkinSplash": "Splash.skin.php",
-   "SplashTemplate": "Splash.skin.php"
+   "SplashTemplate": "SplashTemplate.php"
},
"ResourceFileModulePaths": {
"localBasePath": "",

-- 
To view, visit https://gerrit.wikimedia.org/r/371603
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80d4bd860978d24bb3e69ff04e01f48f890f4827
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Splash
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Splash[master]: Separate out SplashTemplate class into its own file

2017-08-11 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371601 )

Change subject: Separate out SplashTemplate class into its own file
..

Separate out SplashTemplate class into its own file

Change-Id: If82739a982fc1c0c047f1b6c52c92067ab83f5f5
---
M Splash.skin.php
A SplashTemplate.php
2 files changed, 402 insertions(+), 416 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Splash 
refs/changes/01/371601/1

diff --git a/Splash.skin.php b/Splash.skin.php
index a50ce66..38b4c0d 100644
--- a/Splash.skin.php
+++ b/Splash.skin.php
@@ -1,22 +1,7 @@
 addModuleScripts( 'skins.splash' );
}
 }
-
-/**
- * Main skin class
- * @ingroup Skins
- */
-class SplashTemplate extends BaseTemplate {
-
-   /**
-* Template filter callback for Splash skin.
-* Takes an associative array of data set from a SkinTemplate-based
-* class, and a wrapper for MediaWiki's localization database, and
-* outputs a formatted page.
-*
-* @access private
-*/
-   function execute() {
-   $user = $this->getSkin()->getUser();
-
-   # Suppress warnings to prevent notices about missing indexes in 
$this->data
-   wfSuppressWarnings();
-
-   $this->html( 'headelement' );
-   ?>
-   
-   
-   
-   
-   
-   
-   html( 
'userlangattributes' ); ?>>
-   
-   escaped() ) {
-   $this->renderNavigation( 
'global-links-menu', 'main-links' );
-   }
-   ?>
-   
-   
-   
-   isLoggedIn() ) {
-   ?>
-   
-   getName(); ?>
-   
-   
-   
-   
-   
-   html( 
'userlangattributes' ) ?>>
-   getPersonalTools() as $key => $item ) {
-   echo 
$this->makeListItem( $key, $item );
-   }
-   ?>
-   
-   
-   
-   
-   renderPortals( 
$this->data['sidebar'] ); ?>
-   
-   searchBox(); ?>
-
-   
-   
-   parse(); ?>
-   
-   
-   
-   
-   
-   
-   data['sitenotice'] ) {
-   ?>
-   
-   html( 'sitenotice' )
-   ?>
-   
-   data['newtalk'] ) {
-   if ( $this->data['newtalk'] ) {
-   ?>
-   html( 'newtalk' ) ?>
-   
-   
-   cactions(); ?>
-   html( 'title' ) ?>
-   
-   data['subtitle'] || $this->data['undelete'] 
) {
-   ?>
-   html( 
'userlangattributes' ) ?>>
-   html( 'subtitle' ) ?>
-   
-   data['undelete'] ) {
-   ?>
-   html( 'undelete' ) ?>
-   
-   
-   msg( 'tagline' ) 
?>
-
-   
-   html( 'bodytext' ) ?>
-   
-
-   
-   data['catlinks'] ) { 
$this->html( 'catlinks' ); } ?>
-   data['dataAfterContent'] ) { 
$this->html( 'dataAfterContent' ); } ?>
-   
-   
-   parse(); ?>
-   
-   
-   
-   
-   getFooterIcons( "icononly" );
-   $validFooterLinks = $this->getFoo

[MediaWiki-commits] [Gerrit] mediawiki...WoOgLeShades[master]: Some css junk - lose excess formatting, make up some colours

2017-08-11 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371506 )

Change subject: Some css junk - lose excess formatting, make up some colours
..

Some css junk - lose excess formatting, make up some colours

bug: T165516
Change-Id: Icc3af6cf932e6aa8ed0e841f14a37ff9995fbc18
---
M resources/screen-common.less
M resources/screen-desktop.less
M resources/variables.less
3 files changed, 28 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/WoOgLeShades 
refs/changes/06/371506/1

diff --git a/resources/screen-common.less b/resources/screen-common.less
index 781c896..05a9863 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -9,11 +9,11 @@
margin: 0 auto;
position: relative;
padding: 1em;
+   font-family: @fonts;
 }
 #p-logo {
text-align: center;
width: 10em;
-   float: right;
 
// Make logo image visible
// The class sets the background image from $wgLogo, but we still need 
to give it a size in order to show up
@@ -52,45 +52,11 @@
text-align: center;
 }
 
-// Splatter the menus and tools at the bottom
-#mw-footer,
-#page-tools,
-#p-personal {
-   margin: 1em 0;
-
-   ul {
-   list-style-type: none;
-   margin: 0;
-   }
-   li {
-   padding-right: 1em;
-   display: inline-block;
-   }
-}
-#page-tools .mw-portlet {
-   display: inline-block;
-}
-#mw-navigation {
-   margin: 1em 0;
-}
-
-// Footer
-#mw-footer {
-   clear: both;
-   border-top: 1px solid @border;
-
-   ul {
-   margin-top: 1em;
-   }
-}
-#footer-icons {
-   float: right;
-   margin: 0 0 1em 1em;
-}
-
 // hidden stuff
+/*
 #page-tools h3,
 #p-search h3,
 #p-personal h3 {
.hidden;
 }
+*/
diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less
index c677d3b..48a0487 100644
--- a/resources/screen-desktop.less
+++ b/resources/screen-desktop.less
@@ -2,13 +2,3 @@
 
 @import "variables.less";
 
-#site-navigation {
-   ul {
-   list-style-type: none;
-   margin: 0;
-   }
-   li {
-   padding-right: 1em;
-   display: inline-block;
-   }
-}
diff --git a/resources/variables.less b/resources/variables.less
index caa158d..764d6c3 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -1,7 +1,30 @@
 // @import "mediawiki.mixins"; Not used yet
 
-@width: 66em;
-@border: #ccc;
+@width: 76em;
+
+// Colours - theme one: blue & cyan; red secondary, greys
+   // TODO: theme two: probably red & black, blue secondary, greys
+@primarybold: #029; // blue
+@primarybright: #094; // cyan
+@primarybold-light: #05d; // light blue
+@primarybright-light: #7df; // light cyan
+
+@secondarybold: #900; // red
+@secondarybold-light: #d33; // light red
+
+@grey0: #000; // black
+@grey1: #666;
+@grey2: #ccc;
+@grey3: #ddd;
+@grey4: #eee;
+@grey5: #f0f0f0;
+@grey6: #fff; // white
+
+@content-text: @grey0;
+@content-background: @grey6;
+
+@fonts: 'sans serif';
+@fonts-mono: 'monospace';
 
 // To hide objects, but keep them accessible for screen-readers
 .hidden() {

-- 
To view, visit https://gerrit.wikimedia.org/r/371506
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc3af6cf932e6aa8ed0e841f14a37ff9995fbc18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/WoOgLeShades
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WoOgLeShades[master]: Reset to example

2017-08-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371437 )

Change subject: Reset to example
..

Reset to example

bug: T165448
Change-Id: I010f79aaffe82db2700ef6af30f2f895f102676c
---
M Gruntfile.js
M WoOgLeShades.skin.php
M WoOgLeShadesTemplate.php
A composer.json
M i18n/en.json
M package.json
M resources/main.js
A resources/print.css
M resources/screen-common.less
M resources/screen-desktop.less
M resources/screen-mobile.less
M resources/variables.less
M skin.json
13 files changed, 664 insertions(+), 234 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/WoOgLeShades 
refs/changes/37/371437/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 9c56558..35ddbef 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,9 +1,16 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
grunt.initConfig( {
+   jshint: {
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
banana: {
all: 'i18n/'
},
@@ -15,6 +22,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/WoOgLeShades.skin.php b/WoOgLeShades.skin.php
index 16fef8e..7f47a16 100644
--- a/WoOgLeShades.skin.php
+++ b/WoOgLeShades.skin.php
@@ -13,15 +13,24 @@
 *
 * @param $out OutputPage
 */
-   function setupSkinUserCss( OutputPage $out ) {
-   parent::setupSkinUserCss( $out );
+   public function initPage( OutputPage $out ) {
 
$out->addMeta( 'viewport', 'width=device-width, 
initial-scale=1.0' );
 
$out->addModuleStyles( array(
+   'mediawiki.skinning.interface',
'mediawiki.skinning.content.externallinks',
'skins.woogleshades'
) );
-   $out->addModules( array( 'skins.woogleshades.js' ) );
+   $out->addModules( array(
+   'skins.woogleshades.js'
+   ) );
+   }
+
+   /**
+* @param $out OutputPage
+*/
+   function setupSkinUserCss( OutputPage $out ) {
+   parent::setupSkinUserCss( $out );
}
 }
diff --git a/WoOgLeShadesTemplate.php b/WoOgLeShadesTemplate.php
index 17ff95a..6dbe79f 100644
--- a/WoOgLeShadesTemplate.php
+++ b/WoOgLeShadesTemplate.php
@@ -9,240 +9,491 @@
 * Outputs the entire contents of the page
 */
public function execute() {
-   $this->html( 'headelement' );
-   ?>
-   
-   outputLogo();
-   ?>
-   
-   data['sitenotice'] ) {
-   ?>
-   html( 
'sitenotice' ) ?>
-   data['newtalk'] ) {
-   ?>
-   html( 'newtalk' ) ?>
-   
+   $html = '';
+   $html .= $this->get( 'headelement' );
 
-   
-   html( 'title' ) ?>
-   
-   getMsg( 
'tagline' )->parse() ?>
-   
-   
-   data['subtitle'] ) {
-   ?>
-   html( 
'subtitle' ) ?>
-   data['undelete'] ) {
-   ?>
-   html( 
'undelete' ) ?>
-   
-   
+   $html .= Html::rawElement( 'div', [ 'id' => 'mw-wrapper' ],
+   Html::rawElement( 'div', [ 'class' => 'mw-body', 'role' 
=> 'main' ],
+   $this->getSiteNotice() .
+   $this->getNewTalk() .
+   $this->getIndicators() .
+   Html::rawElement( 'h1',
+   [
+   'class' => 'firstHeading',
+   'lang' 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Don't specify font-family for textareas

2017-07-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364352 )

Change subject: Don't specify font-family for textareas
..

Don't specify font-family for textareas

Textareas are often editing interfaces, which should follow the 'editfont'
UPO. The 'editfont' UPO defaults to browser default, and specifying a
font-family here makes that setting impossible to follow. For compatibility
with browsers that do not use monospace as their default (the fallback in
legacy/shared.css), the specification in the OOjs themes needs to be removed.

Change-Id: I47f6361fdc5646b0be11ff6be2d85cf3af0b52f3
---
M src/themes/wikimediaui/widgets.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/52/364352/1

diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index ae4c8e6..8e88cf6 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -1773,7 +1773,6 @@
-webkit-appearance: none; // Support: Safari/iOS
margin: 0;
font-size: inherit;
-   font-family: inherit;
background-color: @background-color-default;
color: @color-emphasized;
border: @border-default;
@@ -1782,6 +1781,7 @@
}
 
input {
+   font-family: inherit;
line-height: @line-height-widget-singleline;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/364352
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47f6361fdc5646b0be11ff6be2d85cf3af0b52f3
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow OOjs UI textareas to use 'editfont' UPO, and also stop...

2017-07-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364344 )

Change subject: Allow OOjs UI textareas to use 'editfont' UPO, and also stop 
overriding the browser default in general
..

Allow OOjs UI textareas to use 'editfont' UPO, and also stop overriding
the browser default in general

Removes font specification from '.oo-ui-textInputWidget textarea' entirely
(applies it only to '.oo-ui-textInputWidget input' now) and changes
mw-editfont-whatever rules to also apply to nested textareas due to OOjs
UI's extensive nesting.

Change-Id: I99e3c0a6ac3f3ccfafc5ef69417ef69ef5f7409a
---
M resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
M resources/src/mediawiki.legacy/shared.css
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/364344/1

diff --git a/resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css 
b/resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
index c55896e..04fb05a 100644
--- a/resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
+++ b/resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
@@ -1492,8 +1492,6 @@
 .oo-ui-textInputWidget textarea {
   -webkit-appearance: none;
   margin: 0;
-  font-size: inherit;
-  font-family: inherit;
   background-color: #fff;
   color: #000;
   border: 1px solid #a2a9b1;
@@ -1502,6 +1500,8 @@
 }
 .oo-ui-textInputWidget input {
   line-height: 1.172em;
+  font-size: inherit;
+  font-family: inherit;
 }
 .oo-ui-textInputWidget textarea {
   line-height: 1.275;
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 1efcdd0..fbf2a84 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -112,14 +112,17 @@
 }
 
 /* Keep this rule separate from the :not rule above so it still works in older 
browsers */
+.mw-editfont-monospace textarea,
 .mw-editfont-monospace {
font-family: monospace;
 }
 
+.mw-editfont-sans-serif textarea,
 .mw-editfont-sans-serif {
font-family: sans-serif;
 }
 
+.mw-editfont-serif textarea,
 .mw-editfont-serif {
font-family: serif;
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/364344
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99e3c0a6ac3f3ccfafc5ef69417ef69ef5f7409a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...grabbers[master]: GrabNewText: Add option to filter namespaces

2017-06-25 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358298 )

Change subject: GrabNewText: Add option to filter namespaces
..


GrabNewText: Add option to filter namespaces

This way one can grab changes from a specific list of namespaces.
Useful if you also grabText for specific namespaces and want to
have the content updated for a while until you grab content from
the remaining namespaces

In the processRecentLogs I don't filter on the query itself so I
can check namespace on the target page of the move, in case of
cross-namespace moves.

Change-Id: I46630ab9fd2531ac24184a1f5e6facebd5654c16
---
M grabNewText.php
1 file changed, 24 insertions(+), 3 deletions(-)

Approvals:
  Isarra: Verified; Looks good to me, approved



diff --git a/grabNewText.php b/grabNewText.php
index 4cab599..658c1a4 100755
--- a/grabNewText.php
+++ b/grabNewText.php
@@ -8,7 +8,7 @@
  * @author Jack Phoenix 
  * @author Calimonious the Estrange
  * @author Jesús Martínez 
- * @version 0.7
+ * @version 0.8
  * @date 1 January 2013
  */
 
@@ -57,6 +57,13 @@
 * @var int
 */
protected $lastTextId = 0;
+
+   /**
+* Array of namespaces to grab changes
+*
+* @var Array
+*/
+   protected $namespaces = null;
 
/**
 * Handle to the database connection
@@ -110,6 +117,7 @@
$this->addOption( 'db', 'Database name, if we don\'t want to 
write to $wgDBname', false, true );
$this->addOption( 'startdate', 'Start point (20121222142317, 
2012-12-22T14:23:17T, etc); note that this cannot go back further than 1-3 
months on most projects.', true, true );
$this->addOption( 'enddate', 'End point (20121222142317, 
2012-12-22T14:23:17T, etc); defaults to current timestamp. May leave pages in 
inconsistent state if page moves are involved.', false, true );
+   $this->addOption( 'namespaces', 'A pipe-separated list of 
namespaces (ID) to grab changes from. Defaults to all namespaces', false, true 
);
}
 
public function execute() {
@@ -138,6 +146,10 @@
}
} else {
$this->endDate = wfTimestampNow();
+   }
+
+   if ( $this->hasOption( 'namespaces' ) ) {
+   $this->namespaces = explode( '|', $this->getOption( 
'namespaces' ) );
}
 
# Get a single DB_MASTER connection
@@ -218,6 +230,9 @@
$rcstart = $this->startDate;
$count = 0;
$more = true;
+   if ( !is_null( $this->namespaces ) ) {
+   $params['rcnamespace'] = implode( '|', 
$this->namespaces );
+   }
 
$this->output( "Retreiving list of changed pages...\n" );
while ( $more ) {
@@ -305,15 +320,21 @@
$ns = $logEntry['ns'];
$title = $this->sanitiseTitle( $ns, 
$title );
$sourceTitle = Title::makeTitle( $ns, 
$title );
+   $newns = -1;
+   if ( $logEntry['type'] == 'move' ) {
+   $newns = 
$logEntry['move']['new_ns'];
+   }
+   if ( !is_null( $this->namespaces ) && 
!in_array( $ns, $this->namespaces ) && !in_array( $newns, $this->namespaces ) ) 
{
+   continue;
+   }
 
if ( $logEntry['type'] == 'move' ) {
# Move our copy
# New title
-   $newns = 
$logEntry['move']['new_ns'];
$newTitle = 
$this->sanitiseTitle( $newns, $logEntry['move']['new_title'] );
$destTitle = Title::makeTitle( 
$newns, $newTitle );
 
-   $this->output( "$sourceTitle 
was moved; updating...\n" );
+   $this->output( "$sourceTitle 
was moved to $destTitle; updating...\n" );
$this->processMove( $ns, $title 
);
$this->processMove( $newns, 
$newTitle );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/358298
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I46630ab9fd2531ac24184a1f5e6facebd5654c16
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/grabbers
Gerrit-Branch: master
Gerrit-Owner: Martineznovo 
Gerrit-Reviewer: Isarra 

__

[MediaWiki-commits] [Gerrit] mediawiki...grabbers[master]: grabNewText: Copy content handler columns to archive on dele...

2017-06-11 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358244 )

Change subject: grabNewText: Copy content handler columns to archive on deletion
..


grabNewText: Copy content handler columns to archive on deletion

When a deletion occurs, grabNewText moves existing revisions to archive,
but I forgot to add the content handler columns in this part in the
previous commit

Change-Id: I36c29834fd400097f576006745ec94d812c92e91
---
M grabNewText.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Isarra: Verified; Looks good to me, approved



diff --git a/grabNewText.php b/grabNewText.php
index 2ec2c6b..4cab599 100755
--- a/grabNewText.php
+++ b/grabNewText.php
@@ -877,7 +877,9 @@
'rev_deleted',
'rev_len',
'rev_parent_id',
-   'rev_sha1'
+   'rev_sha1',
+   'rev_content_model',
+   'rev_content_format'
),
array( 'rev_page' => $pageID ),
__METHOD__
@@ -894,6 +896,8 @@
$e['ar_len'] = $row->rev_len;
$e['ar_parent_id'] = $row->rev_parent_id;
$e['ar_sha1'] = $row->rev_sha1;
+   $e['ar_content_model'] = $row->rev_content_model;
+   $e['ar_content_format'] = $row->rev_content_format;
 
$this->dbw->insert( 'archive', $e, __METHOD__ );
}

-- 
To view, visit https://gerrit.wikimedia.org/r/358244
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I36c29834fd400097f576006745ec94d812c92e91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/grabbers
Gerrit-Branch: master
Gerrit-Owner: Martineznovo 
Gerrit-Reviewer: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...grabbers[master]: Improvements to text grabbers

2017-06-08 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/357224 )

Change subject: Improvements to text grabbers
..


Improvements to text grabbers

grabNewText:
- Added handling of tags (ported from grabText)
- Added handling of content model (untested due to using 1.19 as source wiki)
- Added handling of revdeleted entries (ported from grabText)
- Added handling of external storage on destination wiki
- Check of previous revision for inserting the same text ID has been
  simplified to select only the previous adjacent revision of the page
  so it limits the quantity of rows it needs to query

grabText:
- Overall rewrite to mimick grabNewText good practices: Use member variables
  instead of globals, and methods from processPage to the end have been copied
  from grabNewText.php (with minor cleanup of unused parameters in grabText.php)
- Added namespaces parameter to limit which namespaces to grab
- Added start parameter to resume a grab from a given page
- Added handling of content model (untested due to using 1.19 as source wiki)
- Added handling of external storage on destination wiki

mediawikibot:
- Using an array for retry times instead of a dirty nested if, for ease of 
expanding
- Better error handling. Don't assume an array with the given query key will be
  returned, since this is not true when using generators that can return empty 
sets,
  which was causing such responses being marked as errors and retried.
- Documented that login returns null if succeeded (lol) and better handle 
errors there.

Change-Id: Id8ad5a991823fcb19b4779eaaa6528f8cdc27a9b
---
M grabNewText.php
M grabText.php
M mediawikibot.class.php
3 files changed, 807 insertions(+), 445 deletions(-)

Approvals:
  Isarra: Verified; Looks good to me, approved



diff --git a/grabNewText.php b/grabNewText.php
index 41fd0c0..2ec2c6b 100755
--- a/grabNewText.php
+++ b/grabNewText.php
@@ -195,6 +195,7 @@
$this->processRecentLogs();
$this->processRecentChanges();
 
+   $this->output( "\nDone.\n" );
# Done.
}
 
@@ -415,6 +416,8 @@
 * revisions that should be already in the database
 */
function processPage( $page, $start = null, $skipPrevious = true ) {
+   global $wgContentHandlerUseDB;
+
$pageID = $page['pageid'];
$pageTitle = null;
$pageDesignation = "id $pageID";
@@ -429,7 +432,7 @@
$params = array(
'prop' => 'info|revisions',
'rvlimit' => 'max',
-   'rvprop' => 
'ids|flags|timestamp|user|userid|comment|content',
+   'rvprop' => 
'ids|flags|timestamp|user|userid|comment|content|tags',
'rvdir' => 'newer',
'rvend' => wfTimestamp( TS_ISO_8601, $this->endDate )
);
@@ -444,6 +447,9 @@
}
if ( $page['protection'] ) {
$params['inprop'] = 'protection';
+   }
+   if ( $wgContentHandlerUseDB ) {
+   $params['rvprop'] = $params['rvprop'] . '|contentmodel';
}
 
$result = $this->bot->query( $params );
@@ -482,6 +488,7 @@
'random' => wfRandom(),
'touched' => wfTimestampNow(),
'len' => 0,
+   'content_model' => null
);
# Trim and convert displayed title to database page title
# Get it from the returned value from api
@@ -494,6 +501,17 @@
$page_e['len'] = $info_pages[0]['length'];
$page_e['counter'] = ( isset( $info_pages[0]['counter'] ) ? 
$info_pages[0]['counter'] : 0 );
$page_e['latest'] = $info_pages[0]['lastrevid'];
+   $defaultModel = null;
+   if ( $wgContentHandlerUseDB && isset( 
$info_pages[0]['contentmodel'] ) ) {
+   # This would be the most accurate way of getting the 
content model for a page.
+   # However it calls hooks and can be incredibly slow or 
cause errors
+   #$defaultModel = ContentHandler::getDefaultModelFor( 
Title:makeTitle( $page_e['namespace'], $page_e['title'] ) );
+   $defaultModel = MWNamespace::getNamespaceContentModel( 
$info_pages[0]['ns'] ) || CONTENT_MODEL_WIKITEXT;
+   # Set only if not the default content model
+   if ( $defaultModel != $info_pages[0]['contentmodel'] ) {
+   $page_e['content_model'] = 
$info_pages[0]['contentmodel'];
+   }
+   }
 
# Check if page is present
$pageIsPresent = false;
@@ -556,7 +574,7 @@
while ( true ) {
  

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Fix some small positioning/overflow things

2017-05-26 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355868 )

Change subject: Fix some small positioning/overflow things
..

Fix some small positioning/overflow things

* Echo icon positioning fix in rtl languages (thanks to RoanKattouw)
* Maybe a fix for some of the weird scrollbar/overflow issues on special
  pages, galleries, etc
* Fix for header lines overlapping with floats (thanks to someone who... I
  don't actually remember, but they're absolutely lovely too)

Change-Id: I57825a7e7e06184f452cec69b15b484173b59413
---
M resources/extensions/Echo.less
M resources/screen-common.less
M resources/variables.less
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/68/355868/1

diff --git a/resources/extensions/Echo.less b/resources/extensions/Echo.less
index e91d039..33c91af 100644
--- a/resources/extensions/Echo.less
+++ b/resources/extensions/Echo.less
@@ -13,6 +13,7 @@
#personal-extra {
// Position and keep it from randomly overflowing massively for 
no apparent reason
margin: .7em 0 -2em 0;
+   white-space: nowrap;
 
ul {
list-style: none;
diff --git a/resources/screen-common.less b/resources/screen-common.less
index 41b8427..2d9adf4 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -23,7 +23,6 @@
.box;
background: @background;
padding: 1em @content-padding 3em;
-   overflow: auto;
position: relative;
 }
 #mw-content-container {
@@ -302,7 +301,7 @@
 
h1, h2 {
border-bottom: solid 2px @blue;
-
+   overflow: hidden;
}
 
h1.firstHeading {
diff --git a/resources/variables.less b/resources/variables.less
index 04a8471..ba001b8 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -95,7 +95,7 @@
border-width: 1px 1px @border;
padding: 1.25em 1.75em;
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.02);
-   overflow: auto;
+   overflow: hidden;
 }
 
 // Icons for the page actions menus

-- 
To view, visit https://gerrit.wikimedia.org/r/355868
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57825a7e7e06184f452cec69b15b484173b59413
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Fix directionality of ULS CLL callout

2017-05-20 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354739 )

Change subject: Fix directionality of ULS CLL callout
..

Fix directionality of ULS CLL callout

Callout appears toward content regardless of where it's appearing from.
Callout and triangle are now alligned to the top of the callout to avoid
issues with it appearing over a scrollbacl. Callout is re-implemented as only
a triangle, instead of a diamond, to avoid overlap errors.

Bug: T161586
Change-Id: I7717e26525ac527ede486796f49083ed40ee7d4f
---
M resources/css/ext.uls.compactlinks.less
M resources/js/ext.uls.compactlinks.js
2 files changed, 46 insertions(+), 29 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/39/354739/1

diff --git a/resources/css/ext.uls.compactlinks.less 
b/resources/css/ext.uls.compactlinks.less
index 8223c9f..13650c0 100644
--- a/resources/css/ext.uls.compactlinks.less
+++ b/resources/css/ext.uls.compactlinks.less
@@ -30,34 +30,49 @@
background-color: #ccc;
 }
 
-.interlanguage-uls-menu:before {
-   background: none repeat scroll 0 0 #fcfcfc;
-   border-left: 1px solid rgba( 0, 0, 0, 0.2 );
-   border-top: 1px solid rgba( 0, 0, 0, 0.2 );
-   box-shadow: -2px -2px 2px rgba( 0, 0, 0, 0.1 );
-   content: '';
-   height: 16px;
-   width: 16px;
-   left: -9px;
+/* @noflip */
+.interlanguage-uls-menu:before,
+.interlanguage-uls-menu:after {
+   border-top: 10px solid transparent;
+   border-bottom: 10px solid transparent;
+   display: inline-block;
+   /* 17px aligns nicely with the size of the search row in language 
selection */
+   top: 17px;
position: absolute;
-   /* The dialog middle is positioned 250px away from the center of the 
trigger. Substract 8 for
-* half of the box height to center middle of the box rather than the 
top.  The remaining 2 are
-* either for top-margin of the menu and border of this box, or because 
we use do not account
-* for the margin of the trigger when we use $.fn.outerWidth without 
true as a parameter.
-*/
-   top: 240px;
-   transform: rotate( -45deg );
-   -webkit-transform: rotate( -45deg );
-   -moz-transform: rotate( -45deg );
-   -o-transform: rotate( -45deg );
-   -ms-transform: rotate( -45deg );
-   background-clip: padding-box;
+   content: '';
 }
 
-body.rtl .interlanguage-uls-menu:before {
-   transform: rotate( 45deg );
-   -webkit-transform: rotate( 45deg );
-   -moz-transform: rotate( 45deg );
-   -o-transform: rotate( 45deg );
-   -ms-transform: rotate( 45deg );
+.interlanguage-uls-menu.selector-right {
+   &::before,
+   &::after {
+   /* @noflip */
+   border-left: 10px solid #c9c9c9;
+   /* @noflip */
+   right: -11px;
+
+   }
+   &::after {
+   /* @noflip */
+   border-left: 10px solid #fcfcfc;
+   /* @noflip */
+   right: -10px;
+   }
+}
+/* @noflip */
+.interlanguage-uls-menu.selector-left {
+   &::before,
+   &::after {
+   /* @noflip */
+   border-right: 10px solid #c9c9c9;
+   /* @noflip */
+   left: -11px;
+
+   }
+   &::after {
+   /* @noflip */
+   border-right: 10px solid #fcfcfc;
+   /* @noflip */
+   left: -10px;
+
+   }
 }
diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index 69e23c0..897ffe3 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -157,13 +157,15 @@
// The resulting value is rounded up 14 to have 
a small space between.
triangleWidth = 14;
 
-   if ( dir === 'rtl' ) {
+   if ( offset.left > $( window ).width() / 2  ) {
this.left = offset.left - 
this.$menu.outerWidth() - triangleWidth;
+   this.$menu.addClass( 'selector-right' );
} else {
this.left = offset.left + width + 
triangleWidth;
+   this.$menu.addClass( 'selector-left' );
}
// Offset -250px from the middle of the trigger
-   this.top = offset.top + ( height / 2 ) - 250;
+   this.top = offset.top + ( height / 2 ) - 27;
 
this.$menu.css( {
left: this.left,

-- 
To view, visit https://gerrit.wikimedia.org/r/354739
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

G

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Make caret in displaysettings appear correctly like in langu...

2017-05-20 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354670 )

Change subject: Make caret in displaysettings appear correctly like in 
languagesettings
..

Make caret in displaysettings appear correctly like in languagesettings

Caret previously disappeared upon opening displaysettings from
languagesettings from sidebar due to each one rendering its own separately.

inputsettings also has a caret. It's not fixed. I don't know where it appears.

This seems to break totally random unrelated things for no apparent reason.
This includes, but is not limited to:
* Automatic scrolling to toggle location - just scrolls to top of page now for
  some reason (cross-browser)
* interface reappearing the second time it is toggled (oldopera) - does not
actually appear. Causes random reappearing thing on bottom of page instead.

...

wtf?

bug: T161586
Change-Id: If44cceffc211c4d8a4df5ea4e8720bc27d21cb36
---
M resources/js/ext.uls.displaysettings.js
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/70/354670/1

diff --git a/resources/js/ext.uls.displaysettings.js 
b/resources/js/ext.uls.displaysettings.js
index 95fc770..0067faf 100644
--- a/resources/js/ext.uls.displaysettings.js
+++ b/resources/js/ext.uls.displaysettings.js
@@ -298,6 +298,7 @@
onReady: function () {
var $wrap,
uls = this,
+   $caret = $( '' ),
$back = $( '' )
.addClass( 
'uls-icon-back' );
 
@@ -312,10 +313,17 @@
uls.$menu.find( '.uls-search-wrapper' 
).wrap( $wrap );
uls.$menu.find( 
'.uls-search-wrapper-wrapper' ).prepend( $back );
 
-   uls.$menu.prepend(
+   // copy the caret stuff from 
ext.uls.interface.js, because even though it's on the page at this point, it 
won't clone reliably
+   $caret.prepend(
$( '' ).addClass( 
'caret-before' ),
$( '' ).addClass( 
'caret-after' )
);
+   if ( $( '.uls-settings-trigger' 
).offset().left > $( window ).width() / 2 ) {
+   $caret.addClass( 'caret-right' 
);
+   } else {
+   $caret.addClass( 'caret-left' );
+   }
+   uls.$menu.prepend( $caret );
},
onVisible: function () {
var $parent;

-- 
To view, visit https://gerrit.wikimedia.org/r/354670
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If44cceffc211c4d8a4df5ea4e8720bc27d21cb36
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Example[master]: Refactor example skin to use single echo statement

2017-05-19 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354599 )

Change subject: Refactor example skin to use single echo statement
..

Refactor example skin to use single echo statement

Change-Id: I9d92ddf2011a2904f4c9aaee4a3286e0b21877ad
---
M ExampleTemplate.php
1 file changed, 144 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/99/354599/1

diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 5cfe714..1574aa7 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -9,117 +9,77 @@
 * Outputs the entire contents of the page
 */
public function execute() {
-   $this->html( 'headelement' );
-   ?>
-   
-   
-   data['sitenotice'] ) {
-   echo Html::rawElement(
-   'div',
-   array( 'id' => 'siteNotice' ),
-   $this->get( 'sitenotice' )
-   );
-   }
-   if ( $this->data['newtalk'] ) {
-   echo Html::rawElement(
-   'div',
-   array( 'class' => 'usermessage' 
),
-   $this->get( 'newtalk' )
-   );
-   }
-   echo $this->getIndicators();
-   echo Html::rawElement(
-   'h1',
-   array(
+   $html = '';
+   $html .= $this->get( 'headelement' );
+
+   $html .= Html::rawElement( 'div', [ 'id' => 'mw-wrapper' ],
+   Html::rawElement( 'div', [ 'class' => 'mw-body', 'role' 
=> 'main' ],
+   $this->getSiteNotice() .
+   $this->getNewTalk() .
+   $this->getIndicators() .
+   Html::rawElement( 'h1',
+   [
'class' => 'firstHeading',
'lang' => $this->get( 
'pageLanguage' )
-   ),
+   ],
$this->get( 'title' )
-   );
-
-   echo Html::rawElement(
-   'div',
-   array( 'id' => 'siteSub' ),
+   ) .
+   Html::rawElement( 'div', [ 'id' => 'siteSub' ],
$this->getMsg( 'tagline' )->parse()
-   );
-   ?>
-
-   
-'contentSub' )
-   );
-   if ( $this->data['subtitle'] ) {
-   echo Html::rawelement (
+   ) .
+   Html::rawElement( 'div', [ 'class' => 
'mw-body-content' ],
+   Html::rawElement( 'div', [ 'id' => 
'contentSub' ],
+   $this->getPageSubtitle() .
+   Html::rawelement (
'p',
[],
-   $this->get( 'subtitle' )
-   );
-   }
-   echo Html::rawelement (
-   'p',
-   [],
-   $this->get( 'undelete' )
-   );
-   echo Html::closeElement( 'div' );
-
-   $this->html( 'bodycontent' );
-   echo $this->getClear();
-   echo Html::rawElement(
-   'div',
-   array( 'class' => 'printfooter' 
),
+   $this->get( 'undelete' )
+   )
+

[MediaWiki-commits] [Gerrit] mediawiki...Example[master]: Use duplicates of core functions, with notes about when to d...

2017-05-19 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354587 )

Change subject: Use duplicates of core functions, with notes about when to 
delete them and just use core
..

Use duplicates of core functions, with notes about when to delete them and
just use core

Also move getPortlet to the bottom before them, since it's NEXT. (Also fix
that error with that hook using renderafter instead of getafterportlet.)

Change-Id: I6efe32634557046cc904f801461c097656b90681
---
M ExampleTemplate.php
1 file changed, 174 insertions(+), 137 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/87/354587/1

diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 9490fee..5cfe714 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -66,7 +66,7 @@
echo Html::closeElement( 'div' );
 
$this->html( 'bodycontent' );
-   echo $this->clear();
+   echo $this->getClear();
echo Html::rawElement(
'div',
array( 'class' => 'printfooter' 
),
@@ -112,51 +112,7 @@
?>

 
-   
-'footer-icons',
-   'role' => 'contentinfo'
-   )
-   );
-   foreach ( $this->getFooterIcons( 'icononly' ) 
as $blockName => $footerIcons ) {
-   echo Html::openElement(
-   'li',
-   array(
-   'id' => 'footer-' . 
Sanitizer::escapeId( $blockName ) . 'ico'
-   )
-   );
-   foreach ( $footerIcons as $icon ) {
-   echo 
$this->getSkin()->makeFooterIcon( $icon );
-   }
-   echo Html::closeElement( 'li' );
-   }
-   echo Html::closeElement( 'ul' );
-
-   foreach ( $this->getFooterLinks() as $category 
=> $links ) {
-   echo Html::openElement(
-   'ul',
-   array(
-   'id' => 'footer-' . 
Sanitizer::escapeId( $category ),
-   'role' => 'contentinfo'
-   )
-   );
-   foreach ( $links as $key ) {
-   echo Html::rawElement(
-   'li',
-   array(
-   'id' => 
'footer-' . Sanitizer::escapeId( $category . '-' . $key )
-   ),
-   $this->get( $key )
-   );
-   }
-   echo Html::closeElement( 'ul' );
-   }
-   echo $this->clear();
-   ?>
-   
+   getFooter(); ?>

 
printTrail() ?>
@@ -164,95 +120,6 @@

 
exists() ) {
-   if ( isset( $msgParams ) && !empty( $msgParams ) ) {
-   $msgString = $this->getMsg( $msg, $msgParams 
)->parse();
-   } else {
-   $msgString = $msgObj->parse();
-   }
-   } else {
-   $msgString = htmlspecialchars( $msg );
-   }
-
-   // HACK: Compatibility with extensions still using 
SkinTemplateToolboxEnd
-   $hookContents = '';
-   if ( $name == 'tb' ) {
-   if ( isset( $boxes['TOOLBOX'] ) ) {
-   ob_start();
-   // We pass an extra 'true' at the end so 
extensions using BaseTemplateToolbox
-   // can abort and avoid outputting double 
toolbox links
-   

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Use correct afterPortlet function

2017-05-19 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354488 )

Change subject: Use correct afterPortlet function
..

Use correct afterPortlet function

renderAfterPortlet just dumps it on the page. This is bad for timeless.
getAfterPortlet gets. This is good for timeless.

Change-Id: I1e0a3674644edb4c279814a4a372207bfdcbff4b
---
M TimelessTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/88/354488/1

diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index db4306a..a4b5c2a 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -206,7 +206,7 @@
) .
Html::rawElement( 'div', [ 'class' => 'mw-portlet-body' 
],
$contentText .
-   $this->renderAfterPortlet( $name )
+   $this->getAfterPortlet( $name )
)
);
 

-- 
To view, visit https://gerrit.wikimedia.org/r/354488
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e0a3674644edb4c279814a4a372207bfdcbff4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Example[master]: Wut

2017-05-19 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354394 )

Change subject: Wut
..

Wut

Change-Id: Ib28614cce03ffd855e9499e9ea2dea0dcd8597d4
---
M ExampleTemplate.php
1 file changed, 141 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/94/354394/1

diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index a0da427..9490fee 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -66,7 +66,7 @@
echo Html::closeElement( 'div' );
 
$this->html( 'bodycontent' );
-   $this->clear();
+   echo $this->clear();
echo Html::rawElement(
'div',
array( 'class' => 'printfooter' 
),
@@ -154,7 +154,7 @@
}
echo Html::closeElement( 'ul' );
}
-   $this->clear();
+   echo $this->clear();
?>


@@ -167,36 +167,90 @@
}
 
/**
-* Generates a single sidebar portlet of any kind
+* Generates a block of navigation links with a header
+*
+* @param string $name
+* @param array|string $content array of links for use with 
makeListItem,
+* or a block of text
+* @param null|string|array|bool $msg
+*
 * @return string html
 */
-   private function getPortlet( $box ) {
-   if ( !$box['content'] ) {
-   return;
+   protected function getPortlet( $name, $content, $msg = null ) {
+   if ( $msg === null ) {
+   $msg = $name;
+   } elseif ( is_array( $msg ) ) {
+   $msgString = array_shift( $msg );
+   $msgParams = $msg;
+   $msg = $msgString;
+   }
+   $msgObj = wfMessage( $msg );
+   if ( $msgObj->exists() ) {
+   if ( isset( $msgParams ) && !empty( $msgParams ) ) {
+   $msgString = $this->getMsg( $msg, $msgParams 
)->parse();
+   } else {
+   $msgString = $msgObj->parse();
+   }
+   } else {
+   $msgString = htmlspecialchars( $msg );
}
 
-   $html = Html::openElement(
-   'div',
-   array(
+   // HACK: Compatibility with extensions still using 
SkinTemplateToolboxEnd
+   $hookContents = '';
+   if ( $name == 'tb' ) {
+   if ( isset( $boxes['TOOLBOX'] ) ) {
+   ob_start();
+   // We pass an extra 'true' at the end so 
extensions using BaseTemplateToolbox
+   // can abort and avoid outputting double 
toolbox links
+   // Avoid PHP 7.1 warning from passing $this by 
reference
+   $template = $this;
+   Hooks::run( 'SkinTemplateToolboxEnd', [ 
&$template, true ] );
+   $hookContents = ob_get_contents();
+   ob_end_clean();
+   if ( !trim( $hookContents ) ) {
+   $hookContents = '';
+   }
+   }
+   }
+   // END hack
+
+   $labelId = Sanitizer::escapeId( "p-$name-label" );
+
+   if ( is_array( $content ) ) {
+   $contentText = Html::openElement( 'ul' );
+   foreach ( $content as $key => $item ) {
+   $contentText .= $this->makeListItem(
+   $key,
+   $item,
+   [ 'text-wrapper' => [ 'tag' => 'span' ] 
]
+   );
+   }
+   // Add in SkinTemplateToolboxEnd, if any
+   $contentText .= $hookContents;
+   $contentText .= Html::closeElement( 'ul' );
+   } else {
+   $contentText = $content;
+   }
+
+   $html = Html::rawElement( 'div', [
'role' => 'navigation',
'class' => 'mw-portlet',
-   'id' => Sanitizer::escapeId( $box['id'] )
-

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Determine callout directionality based on position as oppose...

2017-05-18 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/354378 )

Change subject: Determine callout directionality based on position as opposed 
to language
..

Determine callout directionality based on position as opposed to language

For interlanguage toggle, interlanguage position is no longer assumed to be a
left sidebar, and is determined on the fly in order to appear correctly
regardless of where it is, and not go off the side of the page. This works
across most skins, and regardless of language directionality.

Does not necessarily resolve issues with interlanguage links appearing in the
middle of the page (header/footer), or the callout just plain not fitting for
other reasons (mobile devices).

bug: T161586
Change-Id: Icd55498a945e12c0ff79ba891c094d60ce791115
---
M extension.json
R resources/css/ext.uls.less
M resources/js/ext.uls.interface.js
3 files changed, 53 insertions(+), 12 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/78/354378/1

diff --git a/extension.json b/extension.json
index aa4cb66..273c92b 100644
--- a/extension.json
+++ b/extension.json
@@ -157,7 +157,7 @@
"ext.uls.common": {
"targets": [ "desktop", "mobile" ],
"scripts": "js/ext.uls.common.js",
-   "styles": "css/ext.uls.css",
+   "styles": "css/ext.uls.less",
"skinStyles": {
"monobook": "css/ext.uls-monobook.css"
},
diff --git a/resources/css/ext.uls.css b/resources/css/ext.uls.less
similarity index 65%
rename from resources/css/ext.uls.css
rename to resources/css/ext.uls.less
index 7e3c988..d09263a 100644
--- a/resources/css/ext.uls.css
+++ b/resources/css/ext.uls.less
@@ -16,25 +16,62 @@
border-bottom-left-radius: 4px;
 }
 
+/* Caret */
 .uls-menu.callout .caret-before,
 .uls-menu.callout .caret-after {
border-top: 10px solid transparent;
-   border-right: 10px solid #c9c9c9;
border-bottom: 10px solid transparent;
display: inline-block;
-   left: -11px;
/* 17px aligns nicely with the size of the search row in language 
selection */
top: 17px;
position: absolute;
 }
-
 .uls-menu.callout .caret-after {
-   border-right: 10px solid #fcfcfc;
display: inline-block;
-   left: -10px;
 }
 
-.uls-menu.callout--languageselection .caret-after {
+// How do you do switch for flipping in less? These are very redundant.
+.uls-menu.callout .caret-right {
+   .caret-before,
+   .caret-after {
+   /* @noflip */
+   border-left: 10px solid #c9c9c9;
+   /* @noflip */
+   right: -11px;
+   }
+
+   .caret-after {
+   /* @noflip */
+   border-left: 10px solid #fcfcfc;
+   /* @noflip */
+   right: -10px;
+   }
+
+}
+.uls-menu.callout--languageselection .caret-right .caret-after {
+   /* @noflip */
+   border-left: 10px solid #fff;
+}
+
+.uls-menu.callout .caret-left {
+   .caret-before,
+   .caret-after {
+   /* @noflip */
+   border-right: 10px solid #c9c9c9;
+   /* @noflip */
+   left: -11px;
+   }
+
+   .caret-after {
+   /* @noflip */
+   border-right: 10px solid #fcfcfc;
+   /* @noflip */
+   left: -10px;
+   }
+
+}
+.uls-menu.callout--languageselection .caret-left .caret-after {
+   /* @noflip */
border-right: 10px solid #fff;
 }
 
diff --git a/resources/js/ext.uls.interface.js 
b/resources/js/ext.uls.interface.js
index 2284dfd..0dfe1ec 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -294,7 +294,6 @@
var $triggers,
$pLang,
$ulsTrigger = $( '.uls-trigger' ),
-   rtlPage = $( 'body' ).hasClass( 'rtl' ),
anonMode = ( mw.user.isAnon() &&
!mw.config.get( 'wgULSAnonCanChangeLanguage' ) 
),
ulsPosition = mw.config.get( 'wgULSPosition' );
@@ -337,6 +336,7 @@
var caretRadius, 
caretPosition,
$caretBefore = 
$( '' ).addClass( 'caret-before' ),
$caretAfter = 
$( '' ).addClass( 'caret-after' ),
+   $caretWrapper = 
$( '' ),

ulsTriggerHeight = this.$element.height(),
ulsTriggerWidth 
= this.$element.width(),

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Bringing border colors back to the edit form

2017-04-28 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/350922 )

Change subject: Bringing border colors back to the edit form
..


Bringing border colors back to the edit form

Change-Id: Ida43027c705b91acdaf316afa10fdd9b37dbddf5
---
M modules/ext.CollaborationKit.edit.styles.less
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Isarra: Looks good to me, approved



diff --git a/modules/ext.CollaborationKit.edit.styles.less 
b/modules/ext.CollaborationKit.edit.styles.less
index 92cd6bb..e9781f3 100644
--- a/modules/ext.CollaborationKit.edit.styles.less
+++ b/modules/ext.CollaborationKit.edit.styles.less
@@ -23,7 +23,7 @@
 .ck-customeditor-borders( @color ) {
.mw-collabkit-modifiededitform {
padding: 1.5em 1em;
-   border: 1px solid;
+   border: 1px solid @color;
border-top-width: 3px;
border-bottom-width: 4px;
background-color: fadeout( @color, 95% );

-- 
To view, visit https://gerrit.wikimedia.org/r/350922
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida43027c705b91acdaf316afa10fdd9b37dbddf5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Fix category double escaping

2017-04-08 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347169 )

Change subject: Fix category double escaping
..


Fix category double escaping

Also random comment removal.

bug: T158011
Change-Id: Id0b66060be298236c36b62aaefdd663b81509512
---
M TimelessTemplate.php
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified
  Isarra: Verified



diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index c66e5a3..db4306a 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -130,7 +130,6 @@
 *  ...
 *  ]
 * @param null|string|array|bool $msg
-* @param string $class cssclass for the portal
 *
 * @return string html
 * @since 1.29
@@ -800,7 +799,7 @@
}
$categories[ htmlspecialchars( $category ) ] = [ 
'links' => [ 0 => [
'href' => $title->getLinkURL(),
-   'text' => htmlspecialchars( $title->getText() )
+   'text' => $title->getText()
] ] ];
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/347169
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0b66060be298236c36b62aaefdd663b81509512
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Move echo styles to the correct module

2017-04-08 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347132 )

Change subject: Move echo styles to the correct module
..


Move echo styles to the correct module

Change-Id: I28af6af3d1fe4d2dca363175e430976bb3ab03ec
---
A resources/extensions/Echo.less
M resources/screen-common.less
M resources/screen-desktop-mid.less
M resources/screen-desktop-small.less
M resources/screen-desktop.less
M resources/screen-mobile.less
M skin.json
7 files changed, 79 insertions(+), 68 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  Isarra: Verified



diff --git a/resources/extensions/Echo.less b/resources/extensions/Echo.less
new file mode 100644
index 000..e91d039
--- /dev/null
+++ b/resources/extensions/Echo.less
@@ -0,0 +1,78 @@
+@import "../variables.less";
+
+/* Handle and position Echo icons */
+
+@media screen {
+
+   #personal h2,
+   #personal-extra,
+   #personal-extra ul,
+   #personal-extra li {
+   display: inline-block;
+   }
+   #personal-extra {
+   // Position and keep it from randomly overflowing massively for 
no apparent reason
+   margin: .7em 0 -2em 0;
+
+   ul {
+   list-style: none;
+   margin: 0 -1em 0 0;
+   padding: 0;
+   }
+   li {
+   margin: 0 .75em 0 0;
+   }
+   }
+   @media (min-width: @desktop-small-floor) {
+   #personal-extra {
+   float: left;
+   margin-left: -4.5em;
+   }
+   .extension-icons {
+   #p-search {
+   margin-right: 21em;
+   }
+   }
+
+   #mw-page-header-links #ca-more,
+   #mw-page-header-links #ca-languages,
+   .sidebar-chunk h2 {
+   display: none;
+   }
+   }
+
+   @media (min-width: @desktop-small-floor) and (max-width: 
@desktop-small-width) {
+   .extension-icons #p-search {
+   margin-right: 11em;
+   }
+   #personal-extra {
+   margin-left: -2.5em;
+   }
+   }
+
+   @media (min-width: @desktop-mid-floor) and (max-width: 
@desktop-mid-width) {
+   .extension-icons {
+   #user-tools {
+   width: auto;
+   }
+   .color-middle {
+   margin-right: @column-left-size + 2 * 
@content-padding + 4em;
+   }
+   }
+   }
+
+   @media(max-width: @mobile-width) {
+   .mw-echo-ui-notificationBadgeButtonPopupWidget {
+   z-index: 2;
+   }
+   #personal-extra {
+   position: absolute;
+   top: .9em;
+   right: 11.75em;
+
+   li {
+   margin-right: 1.25em;
+   }
+   }
+   }
+}
diff --git a/resources/screen-common.less b/resources/screen-common.less
index 689888c..41b8427 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -479,30 +479,6 @@
margin-right: @column-right-size + 1em;
 }
 
-/* Extension specific junk */
-
-/* Echo */
-
-#personal h2,
-#personal-extra,
-#personal-extra ul,
-#personal-extra li {
-   display: inline-block;
-}
-#personal-extra {
-   // Position and keep it from randomly overflowing massively for no 
apparent reason
-   margin: .7em 0 -2em 0;
-
-   ul {
-   list-style: none;
-   margin: 0 -1em 0 0;
-   padding: 0;
-   }
-   li {
-   margin: 0 .75em 0 0;
-   }
-}
-
 /* Hidden stuff */
 
 #p-namespaces h3,
diff --git a/resources/screen-desktop-mid.less 
b/resources/screen-desktop-mid.less
index 3550130..9768e7f 100644
--- a/resources/screen-desktop-mid.less
+++ b/resources/screen-desktop-mid.less
@@ -13,16 +13,6 @@
margin-left: @column-left-size;
 }
 
-// Echo
-.extension-icons {
-   #user-tools {
-   width: auto;
-   }
-   .color-middle {
-   margin-right: @column-left-size + 2 * @content-padding + 4em;
-   }
-}
-
 // Redundant content category list
 #catlinks {
display: none;
diff --git a/resources/screen-desktop-small.less 
b/resources/screen-desktop-small.less
index b0b5e3d..0a88dce 100644
--- a/resources/screen-desktop-small.less
+++ b/resources/screen-desktop-small.less
@@ -124,11 +124,3 @@
 #p-search {
margin-right: 6em;
 }
-
-// Echo
-.extension-icons #p-search {
-   margin-right: 11em;
-}
-#personal-extra {
-   margin-left: -2.5em;
-}
diff --git a/resources/screen-desktop

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Fix category double escaping

2017-04-08 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347169 )

Change subject: Fix category double escaping
..

Fix category double escaping

Also random comment removal.

bug: T158011
Change-Id: Id0b66060be298236c36b62aaefdd663b81509512
---
M TimelessTemplate.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/69/347169/1

diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index c66e5a3..db4306a 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -130,7 +130,6 @@
 *  ...
 *  ]
 * @param null|string|array|bool $msg
-* @param string $class cssclass for the portal
 *
 * @return string html
 * @since 1.29
@@ -800,7 +799,7 @@
}
$categories[ htmlspecialchars( $category ) ] = [ 
'links' => [ 0 => [
'href' => $title->getLinkURL(),
-   'text' => htmlspecialchars( $title->getText() )
+   'text' => $title->getText()
] ] ];
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/347169
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0b66060be298236c36b62aaefdd663b81509512
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Move echo styles to the correct module

2017-04-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347132 )

Change subject: Move echo styles to the correct module
..

Move echo styles to the correct module

Change-Id: I28af6af3d1fe4d2dca363175e430976bb3ab03ec
---
A resources/extensions/Echo.less
M resources/screen-common.less
M resources/screen-desktop-mid.less
M resources/screen-desktop-small.less
M resources/screen-desktop.less
M resources/screen-mobile.less
M skin.json
7 files changed, 79 insertions(+), 68 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/32/347132/1

diff --git a/resources/extensions/Echo.less b/resources/extensions/Echo.less
new file mode 100644
index 000..e91d039
--- /dev/null
+++ b/resources/extensions/Echo.less
@@ -0,0 +1,78 @@
+@import "../variables.less";
+
+/* Handle and position Echo icons */
+
+@media screen {
+
+   #personal h2,
+   #personal-extra,
+   #personal-extra ul,
+   #personal-extra li {
+   display: inline-block;
+   }
+   #personal-extra {
+   // Position and keep it from randomly overflowing massively for 
no apparent reason
+   margin: .7em 0 -2em 0;
+
+   ul {
+   list-style: none;
+   margin: 0 -1em 0 0;
+   padding: 0;
+   }
+   li {
+   margin: 0 .75em 0 0;
+   }
+   }
+   @media (min-width: @desktop-small-floor) {
+   #personal-extra {
+   float: left;
+   margin-left: -4.5em;
+   }
+   .extension-icons {
+   #p-search {
+   margin-right: 21em;
+   }
+   }
+
+   #mw-page-header-links #ca-more,
+   #mw-page-header-links #ca-languages,
+   .sidebar-chunk h2 {
+   display: none;
+   }
+   }
+
+   @media (min-width: @desktop-small-floor) and (max-width: 
@desktop-small-width) {
+   .extension-icons #p-search {
+   margin-right: 11em;
+   }
+   #personal-extra {
+   margin-left: -2.5em;
+   }
+   }
+
+   @media (min-width: @desktop-mid-floor) and (max-width: 
@desktop-mid-width) {
+   .extension-icons {
+   #user-tools {
+   width: auto;
+   }
+   .color-middle {
+   margin-right: @column-left-size + 2 * 
@content-padding + 4em;
+   }
+   }
+   }
+
+   @media(max-width: @mobile-width) {
+   .mw-echo-ui-notificationBadgeButtonPopupWidget {
+   z-index: 2;
+   }
+   #personal-extra {
+   position: absolute;
+   top: .9em;
+   right: 11.75em;
+
+   li {
+   margin-right: 1.25em;
+   }
+   }
+   }
+}
diff --git a/resources/screen-common.less b/resources/screen-common.less
index 689888c..41b8427 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -479,30 +479,6 @@
margin-right: @column-right-size + 1em;
 }
 
-/* Extension specific junk */
-
-/* Echo */
-
-#personal h2,
-#personal-extra,
-#personal-extra ul,
-#personal-extra li {
-   display: inline-block;
-}
-#personal-extra {
-   // Position and keep it from randomly overflowing massively for no 
apparent reason
-   margin: .7em 0 -2em 0;
-
-   ul {
-   list-style: none;
-   margin: 0 -1em 0 0;
-   padding: 0;
-   }
-   li {
-   margin: 0 .75em 0 0;
-   }
-}
-
 /* Hidden stuff */
 
 #p-namespaces h3,
diff --git a/resources/screen-desktop-mid.less 
b/resources/screen-desktop-mid.less
index 3550130..9768e7f 100644
--- a/resources/screen-desktop-mid.less
+++ b/resources/screen-desktop-mid.less
@@ -13,16 +13,6 @@
margin-left: @column-left-size;
 }
 
-// Echo
-.extension-icons {
-   #user-tools {
-   width: auto;
-   }
-   .color-middle {
-   margin-right: @column-left-size + 2 * @content-padding + 4em;
-   }
-}
-
 // Redundant content category list
 #catlinks {
display: none;
diff --git a/resources/screen-desktop-small.less 
b/resources/screen-desktop-small.less
index b0b5e3d..0a88dce 100644
--- a/resources/screen-desktop-small.less
+++ b/resources/screen-desktop-small.less
@@ -124,11 +124,3 @@
 #p-search {
margin-right: 6em;
 }
-
-// Echo
-.extension-icons #p-search {
-   margin-right: 11em;
-}
-#personal-extra {
-   margin-left: -2.5em;
-}
diff --git a/resources/s

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: VE styles

2017-04-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347129 )

Change subject: VE styles
..

VE styles

Positioned toolbar properly for all modes.
Added icon to ve-edit, and new icon for edit source.
Yadda.

Cactions do not work. This is a VE problem.

bug: T161462
Change-Id: Ie5f4732f49f2dc365f5a3cc0c4b0e21444c21d1f
---
A resources/extensions/VisualEditor.article.less
A resources/extensions/VisualEditor.core.less
A resources/images/brackets-grey.png
A resources/images/brackets-grey.svg
M resources/images/editing icons.svg
M resources/screen-common.less
M resources/variables.less
M skin.json
8 files changed, 158 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/29/347129/1

diff --git a/resources/extensions/VisualEditor.article.less 
b/resources/extensions/VisualEditor.article.less
new file mode 100644
index 000..0f5e5a7
--- /dev/null
+++ b/resources/extensions/VisualEditor.article.less
@@ -0,0 +1,25 @@
+@import "../variables.less";
+
+@media screen {
+   .client-js {
+   .mw-editsection a {
+   .background-image-svg('../images/brackets-grey.svg', 
'../images/brackets-grey.png');
+   margin-right: 1.25em;
+   }
+   .mw-editsection a.mw-editsection-visualeditor {
+   .background-image-svg('../images/pencil-grey.svg', 
'../images/pencil-grey.png');
+   }
+   .mw-editsection-divider {
+   display: none;
+   }
+
+   @media (max-width: @mobile-width) {
+   #ca-ve-edit a {
+   
.background-image-svg('../images/pencil-grey.svg', '../images/pencil-grey.png');
+   }
+   #ca-edit a {
+   
.background-image-svg('../images/brackets-grey.svg', 
'../images/brackets-grey.png');
+   }
+   }
+   }
+}
diff --git a/resources/extensions/VisualEditor.core.less 
b/resources/extensions/VisualEditor.core.less
new file mode 100644
index 000..d9c50ba
--- /dev/null
+++ b/resources/extensions/VisualEditor.core.less
@@ -0,0 +1,29 @@
+@import "../variables.less";
+
+@media screen {
+   .ve-ui-toolbar {
+   margin: -.8em -2em 0;
+   }
+
+   // Still need a way to make it show up right away (instead of initially 
disappearin under the page header)
+   .ve-ui-toolbar-floating > .oo-ui-toolbar-bar {
+   top: @fixed-header-height + @color-height;
+   }
+
+   // Apparently the margin is normally removed/negated elsewhere in other 
skins (T162493)
+   .ve-ce-documentNode {
+   padding: 0.94em 1.88em;
+   margin: auto -1.88em;
+   }
+
+   @media (min-width: @desktop-small-floor) and (max-width: 
@desktop-small-width) {
+   .ve-ui-toolbar {
+   margin-top: -.5em;
+   }
+   }
+   @media (max-width: @mobile-width) {
+   .ve-ui-toolbar-floating > .oo-ui-toolbar-bar {
+   top: 0;
+   }
+   }
+}
diff --git a/resources/images/brackets-grey.png 
b/resources/images/brackets-grey.png
new file mode 100644
index 000..5e7a458
--- /dev/null
+++ b/resources/images/brackets-grey.png
Binary files differ
diff --git a/resources/images/brackets-grey.svg 
b/resources/images/brackets-grey.svg
new file mode 100644
index 000..a5353a8
--- /dev/null
+++ b/resources/images/brackets-grey.svg
@@ -0,0 +1,47 @@
+
+http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   id="svg4570"
+   version="1.1"
+   viewBox="0 0 5.2916665 5.2916665"
+   height="5.2916665mm"
+   width="5.2916665mm">
+  
+  
+
+  
+image/svg+xml
+http://purl.org/dc/dcmitype/StillImage"; />
+
+  
+
+  
+  
+
+
+
+
+  
+
diff --git a/resources/images/editing icons.svg b/resources/images/editing 
icons.svg
index 1007981..0868f76 100644
--- a/resources/images/editing icons.svg
+++ b/resources/images/editing icons.svg
@@ -12,7 +12,7 @@
version="1.1"
viewBox="0 0 20.015762 20.015762"
id="svg4136"
-   inkscape:version="0.91 r13725"
+   inkscape:version="0.92.0 r"
sodipodi:docname="editing icons.svg"

inkscape:export-filename="/media/shintaiden/home/rahah/mediawiki/skins/Timeless/resources/images/gear-large-grey.png"
inkscape:export-xdpi="90"
@@ -25,7 +25,7 @@
 image/svg+xml
 http://purl.org/dc/dcmitype/StillImage"; />
-
+
   
 
   
@@ -43,12 +43,12 @@
  inkscape:window-width="2492"
  inkscape:window-height="2034"
  id="namedview4144"
- show

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Use new BaseTemplate functions

2017-04-05 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346650 )

Change subject: Use new BaseTemplate functions
..

Use new BaseTemplate functions

getPortlet is now the version previously intended for
BaseTemplate.
Toolbox is betterer.
I don't know.

Change-Id: Ibb94caecaa703ed2895e93c3a15aa097a5b610d5
---
M TimelessTemplate.php
1 file changed, 48 insertions(+), 101 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/50/346650/1

diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index 6141da5..6eada16 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -27,7 +27,7 @@
$this->getLogo( 'p-logo-text', 'text' ) .
$this->getSearch()
) .
-   $this->clear()
+   $this->getClear()
);
$html .= $this->getHeaderHack();
 
@@ -43,7 +43,7 @@
'site-tools',
'timeless-sitetools',
$this->getPortlet(
-   'tbx',
+   'tb',

$this->pileOfTools['general'],
'timeless-sitetools'
)
@@ -79,16 +79,16 @@

'timeless-pagetools'
)
) .
-   $this->clear() .
+   $this->getClear() .
Html::rawElement( 'div', [ 
'class' => 'mw-body-content', 'id' => 'bodyContent' ],
$this->getContentSub() .
$this->get( 'bodytext' 
) .
-   $this->clear()
+   $this->getClear()
)
)
) .
$this->getAfterContent() .
-   $this->clear()
+   $this->getClear()
)
);
 
@@ -114,22 +114,26 @@
}
 
/**
-* A list of navigation links (portlet)
+* Generates a block of navigation links with a header
 *
 * @param string $name
-* @param array|string $content array of links or block of text
+* @param array|string $content array of links for use with 
makeListItem, or a block of text
 *Expected array format:
-   [
-   $name => [
-   'links' => [ '0' => [ 'href' => ..., 
'single-id' => ..., 'text' => ... ] ],
-   'id' => ...,
-   'active' => ...
-   ],
-   ...
-   ]
+*  [
+*  $name => [
+*  'links' => [ '0' =>
+*  [ 'href' => ..., 'single-id' => ..., 
'text' => ... ]
+*  ],
+*  'id' => ...,
+*  'active' => ...
+*  ],
+*  ...
+*  ]
 * @param null|string|array|bool $msg
+* @param string $class cssclass for the portal
 *
-* @return $html
+* @return string html
+* @since 1.29
 */
protected function getPortlet( $name, $content, $msg = null ) {
if ( $msg === null ) {
@@ -150,13 +154,38 @@
$msgString = htmlspecialchars( $msg );
}
 
+   // HACK: Compatibility with extensions still using 
SkinTemplateToolboxEnd
+   $hookContents = '';
+   if ( $name == 'tb' ) {
+   if ( isset( $boxes['TOOLBOX'] ) ) {
+   ob_start();
+   // We pass an extra 'true' at the end so 
extensions using BaseTemplateToolbox
+   // can abort and avoid outputting double 
toolbox links
+   // Avoid PHP 7.1 warning from passing $this by 
reference
+   $template = $this;
+   Hooks::run( 'SkinTemplateToolboxEnd', [ 
&$template, true ] );
+ 

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Make variables for resolution boundaries

2017-04-05 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346637 )

Change subject: Make variables for resolution boundaries
..

Make variables for resolution boundaries

And some comments, or stuff.
Also bumped version number.

Change-Id: I4a4978e622eb82461573819992b19d5374bcc749
---
M Timeless.skin.php
M resources/screen-misc.less
M resources/variables.less
M skin.json
4 files changed, 19 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/37/346637/1

diff --git a/Timeless.skin.php b/Timeless.skin.php
index f1ceb28..fc6ffdb 100644
--- a/Timeless.skin.php
+++ b/Timeless.skin.php
@@ -19,6 +19,7 @@
$out->addModuleStyles( [
'mediawiki.skinning.content.externallinks',
'skins.timeless',
+   // This is a separate module from skins.timeless 
because it has its own @media declarations in its less, and apparently modules 
cannot be defined with both. That is the only reason.
'skins.timeless.misc'
] );
$out->addModules( [
diff --git a/resources/screen-misc.less b/resources/screen-misc.less
index 05658de..3278328 100644
--- a/resources/screen-misc.less
+++ b/resources/screen-misc.less
@@ -2,6 +2,7 @@
 
 // Let's add some unnecessary white space. Or grey, as it were. In the dumbest 
possible way.
 
+// Top end of large screens
 @media screen and (min-width: 1425px) {
.color-middle-container,
.ts-inner {
@@ -13,7 +14,8 @@
}
 }
 
-@media screen and (min-width: 1250px) and (max-width: 1339px) {
+// Top half end of mid screens
+@media screen and (min-width: (@desktop-small-width + @desktop-mid-width) / 2) 
and (max-width: @desktop-mid-width) {
.ts-inner {
padding: 0 3em;
}
diff --git a/resources/variables.less b/resources/variables.less
index 9f073d3..1cfff51 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -42,6 +42,7 @@
 @fonts-secondary: 'Linux Libertine', 'Times New Roman', serif;
 // Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts
 @fonts-monospace: 'Consolas', 'Courier', 'Nimbus Mono', 'Liberation Mono', 
'Courier New', monospace;
+
 @border: .2em;
 @radius: .2em;
 
@@ -49,11 +50,19 @@
 
 // Widths
 
+// Remember to also update skin.json (and possibly mobile.js) if you change 
these
+// These are all max widths; get the min by subtrcting 1px from the previous 
thing.
+@mobile-width: 850px;
+@desktop-small-width: 1099px;
+@desktop-mid-width: 1339px;
+
+// The max-width for the content
+@content-width: 100em;
+
+@content-padding: 2em;
+
 @column-left-size: 14em;
 @column-right-size: 16em;
-
-@content-width: 100em;
-@content-padding: 2em;
 
 @fixed-header-height: 3.125em;
 
diff --git a/skin.json b/skin.json
index cf38d28..cd93a63 100644
--- a/skin.json
+++ b/skin.json
@@ -1,6 +1,6 @@
 {
"name": "Timeless",
-   "version": "0.6",
+   "version": "0.8.1",
"author": "Isarra Yos",
"url": "https://www.mediawiki.org/wiki/Skin:Timeless";,
"descriptionmsg": "timeless-desc",
@@ -47,7 +47,8 @@
"resources/print.css": {
"media": "print"
}
-   }
+   },
+   "@NOTE": "Remember to also update variables.less if you 
change the width cutoffs here. screen-misc.less and mobile.js may also need 
updating."
},
"skins.timeless.misc": {
"position": "top",

-- 
To view, visit https://gerrit.wikimedia.org/r/346637
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a4978e622eb82461573819992b19d5374bcc749
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rename BaseTemplate::clear to getClear to avoid conflicts wi...

2017-04-05 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346614 )

Change subject: Rename BaseTemplate::clear to getClear to avoid conflicts with 
Example skin and derivatives
..

Rename BaseTemplate::clear to getClear to avoid conflicts
with Example skin and derivatives

Also it's a bit more consistent with everything else anyway.

Change-Id: I2745d51267790e93fe2b92a75e88621abbb57fd1
---
M includes/skins/BaseTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/346614/1

diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index dc0a703..2724cad 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -710,7 +710,7 @@
 * @return string html
 * @since 1.29
 */
-   protected function clear() {
+   protected function getClear() {
return Html::element( 'div', [ 'class' => 'visualClear' ] );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/346614
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2745d51267790e93fe2b92a75e88621abbb57fd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...GreyStuff[master]: Fix stuff I broke, also changes

2017-03-25 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344807 )

Change subject: Fix stuff I broke, also changes
..

Fix stuff I broke, also changes

I'm real specific shut up.

Change-Id: I889f2dbb15d0a9f601d5210dd13f95c24d9a9adf
---
M GreyStuffTemplate.php
M resources/main.less
M resources/screen-full.less
M resources/screen-mobile.less
4 files changed, 93 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/GreyStuff 
refs/changes/07/344807/1

diff --git a/GreyStuffTemplate.php b/GreyStuffTemplate.php
index 8f05b25..bf8fc6b 100644
--- a/GreyStuffTemplate.php
+++ b/GreyStuffTemplate.php
@@ -18,13 +18,7 @@
  */
 class GreyStuffTemplate extends BaseTemplate {
 
-   /**
-* Template filter callback for GreyStuff skin.
-* Takes an associative array of data set from a SkinTemplate-based
-* class, and a wrapper for MediaWiki's localization database, and
-* outputs a formatted page.
-*/
-   function execute() {
+   public function execute() {
// Apparently not set by default?
$this->data['pageLanguage'] = 
$this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
 
@@ -91,7 +85,7 @@
 
$this->clear() .
 
-   Html::rawElement( 'div', [ 'id' => 
'bodyContent', 'class' => 'mw-body' ],
+   Html::rawElement( 'div', [ 'id' => 
'bodyContent', 'class' => 'mw-body-content' ],
Html::rawElement( 'div', [ 'id' => 
'siteSub' ], $this->getMsg( 'tagline' ) ) .
$this->get( 'bodytext' ) .
$this->clear()
@@ -135,7 +129,7 @@
 *
 * @return string html
 */
-   private function getPortlet( $name, $content, $dropdown = false, $msg = 
null ) {
+   protected function getPortlet( $name, $content, $dropdown = false, $msg 
= null ) {
if ( $msg === null ) {
$msg = $name;
} elseif ( is_array( $msg ) ) {
@@ -185,7 +179,7 @@
$dropdown ? 'dropdown' : ''
] ],
$contentText .
-   $this->renderAfterPortlet( $name )
+   $this->getAfterPortlet( $name )
)
);
 
@@ -197,7 +191,7 @@
 *
 * @return string html
 */
-   private function getMainNavigation() {
+   protected function getMainNavigation() {
$html = '';
 
$sidebar = $this->getSidebar();
@@ -256,7 +250,7 @@
 *
 * @return string html
 */
-   private function getBanner() {
+   protected function getBanner() {
$html = Html::rawElement( 'div', [ 'class' => 'p-logo', 'role' 
=> 'banner' ],
Html::element( 'a', array_merge( [
'class' => 'mw-wiki-logo',
@@ -290,8 +284,22 @@
 *
 * @return string html
 */
-   private function getPersonalNavigation() {
+   protected function getPersonalNavigation() {
$user = $this->getSkin()->getUser();
+   $personalTools = $this->getPersonalTools();
+
+   $html = '';
+   $extraTools = [];
+
+   // Remove Echo badges
+   if ( isset( $personalTools['notifications-alert'] ) ) {
+   $extraTools['notifications-alert'] = 
$personalTools['notifications-alert'];
+   unset( $personalTools['notifications-alert'] );
+   }
+   if ( isset( $personalTools['notifications-notice'] ) ) {
+   $extraTools['notifications-notice'] = 
$personalTools['notifications-notice'];
+   unset( $personalTools['notifications-notice'] );
+   }
 
if ( $user->isLoggedIn() ) {
$headerMsg = [ 'greystuff-loggedinas', $user->getName() 
];
@@ -299,7 +307,8 @@
$headerMsg = 'greystuff-notloggedin';
}
 
-   $personalTools = $this->getPersonalTools();
+   $html .= Html::openElement( 'div', [ 'id' => 
'p-personal-container' ] );
+
if ( isset( $personalTools['userpage'] ) ) {
$personalTools['userpage']['links'][0]['text'] = 
$this->getMsg( 'greystuff-userpage' );
}
@@ -307,7 +316,25 @@
$personalTools['mytalk']['links'][0]['text'] = 
$this->getMsg( 'greystuff-talkpage' );
}
 
-   return $this->getPortlet( 'personal', 
$this->getPersonalTools(), true, $headerMsg );
+   // Re-add Echo badges
+   if ( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add some common functions to BaseTemplate

2017-03-25 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344804 )

Change subject: Add some common functions to BaseTemplate
..

Add some common functions to BaseTemplate

Breaks any skins with same-name functions with different
visibility.

* getPortlet: essentially renderPortlet from Vector,
  outputPortlet from Example, getPortlet from Timeless etc
* clear: returns a visualClear
* getFooter: wraps getFooterIcons and getFooterLinks and
  handles all the output; format is common to nearly every
  skin since MonoBook
* getAfterPortlet: same as renderAfterPortlet, but doesn't
  directly print content
* getTrail: same as printTrail, but doesn't directly print
  content

Also some formatting fixes for related functions.

Change-Id: I5621f585b501e47b40ae80e9cb12e6a32da72275
---
M includes/skins/BaseTemplate.php
1 file changed, 170 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/344804/1

diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index e571c58..785c851 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -291,7 +291,32 @@
Hooks::run( 'BaseTemplateAfterPortlet', [ $this, $name, 
&$content ] );
 
if ( $content !== '' ) {
-   echo "$content";
+   echo Html::rawElement(
+   'div',
+   [ 'class' => [ 'after-portlet', 
'after-portlet-' . $name ] ],
+   $content
+   );
+   }
+   }
+
+   /**
+* The same as renderAfterPortlet(), but returns the content instead of
+* printing it
+*
+* @param string $name
+*
+* @return string html
+*/
+   protected function getAfterPortlet( $name ) {
+   $content = '';
+   Hooks::run( 'BaseTemplateAfterPortlet', [ $this, $name, 
&$content ] );
+
+   if ( $content !== '' ) {
+   return Html::rawElement(
+   'div',
+   [ 'class' => [ 'after-portlet', 
'after-portlet-' . $name ] ],
+   $content
+   );
}
}
 
@@ -499,6 +524,73 @@
return Html::rawElement( isset( $options['tag'] ) ? 
$options['tag'] : 'li', $attrs, $html );
}
 
+   /**
+* Generates a block of navigation links with a header
+*
+* @param string $name
+* @param array|string $content array of links for use with 
makeListItem, or a block of text
+* @param null|string|array|bool $msg
+*
+* @return string html
+*/
+   private function getPortlet( $name, $content, $msg = null ) {
+   if ( $msg === null ) {
+   $msg = $name;
+   } elseif ( is_array( $msg ) ) {
+   $msgString = array_shift( $msg );
+   $msgParams = $msg;
+   $msg = $msgString;
+   }
+   $msgObj = wfMessage( $msg );
+   if ( $msgObj->exists() ) {
+   if ( isset( $msgParams ) && !empty( $msgParams ) ) {
+   $msgString = $this->getMsg( $msg, $msgParams 
)->parse();
+   } else {
+   $msgString = $msgObj->parse();
+   }
+   } else {
+   $msgString = htmlspecialchars( $msg );
+   }
+
+   $labelId = Sanitizer::escapeId( "p-$name-label" );
+
+   if ( is_array( $content ) ) {
+   $contentText = Html::openElement( 'ul' );
+   foreach ( $content as $key => $item ) {
+   $contentText .= $this->makeListItem(
+   $key,
+   $item,
+   [ 'text-wrapper' => [ 'tag' => 'span' ] 
]
+   );
+   }
+   $contentText .= Html::closeElement( 'ul' );
+   } else {
+   $contentText = $content;
+   }
+
+   $html = Html::rawElement( 'div', [
+   'role' => 'navigation',
+   'class' => 'mw-portlet',
+   'id' => Sanitizer::escapeId( 'p-' . $name ),
+   'title' => Linker::titleAttrib( 'p-' . $name ),
+   'aria-labelledby' => $labelId
+   ],
+   Html::rawElement( 'h3', [
+   'id' => $labelId,
+   'lang' => $t

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Refactor TimelessTemplate.php

2017-03-24 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344748 )

Change subject: Refactor TimelessTemplate.php
..

Refactor TimelessTemplate.php

Structure is generally the same. All html is rendered into a
single variable that is output with a single unholy 'echo'.

getPortlet is now more general, and generally used.

Should generally address the issues raised in T158011.
Should also be technically compatible with VE, but without
styling, and requiring the user to edit LocalSettings.php
(hopefully that gets fixed soon).

Some randomly missing things were added back in. (Variants,
some hooks)

bug: T158011
Change-Id: I3b691c8bfe7aed4a544236d5ac031b77ec4e8337
---
M TimelessTemplate.php
M resources/screen-common.less
M resources/screen-desktop-small.less
M resources/screen-desktop.less
M resources/screen-mobile.less
5 files changed, 583 insertions(+), 464 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/48/344748/1

diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index 40ab7ad..24ac125 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -5,473 +5,417 @@
  * @ingroup Skins
  */
 class TimelessTemplate extends BaseTemplate {
+
+   /** @var array */
+   private $pileOfTools;
+
/**
 * Outputs the entire contents of the page
 */
public function execute() {
-   $pileOfTools = $this->getPageTools();
-
-   $this->html( 'headelement' );
+   $this->pileOfTools = $this->getPageTools();
$userLinks = $this->getUserLinks();
-   ?>
-   
-   
-   
-   outputLogo( 'p-logo-text', 'text' );
-   $this->outputSearch();
-   ?>
-   
-   
-   
 
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
-   
+   // Open html, body elements, etc
+   $html = $this->get( 'headelement' );
 
-   
-   
-   
-   outputLogo( 'p-logo', 'image' );
-   $this->outputSiteNavigation();
+   $html .= Html::openElement( 'div', [ 'id' => "mw-wrapper", 
'class' => $userLinks['class'] ] );
 
-   $siteTools = $this->assemblePortlet( [
-   'id' => 'p-sitetools',
-   'headerMessage' => 
'timeless-sitetools',
-   'content' => 
$pileOfTools['general']
-   ] );
-   $this->outputSidebarChunk( 
'site-tools', 'timeless-sitetools', $siteTools );
-   ?>
-   
-   
-0 ) {
-   $pageTools .= 
$this->assemblePortlet( [
-   'id' => 'p-pageactions',
-   'headerMessage' => 
'timeless-pageactions',
-   'content' => 
$pileOfTools['page-secondary'],
-   ] );
-   }
-   if ( count( $pileOfTools['user'] ) > 0 
) {
-   $pageTools .= 
$this->assemblePortlet( [
-   'id' => 
'p-userpagetools',
-   'headerMessage' => 
'timeless-userpagetools',
-   'content' => 
$pileOfTools['user'],
-   ] );
-   }
-   $pageTools .= $this->assemblePortlet( [
-   'id' => 'p-pagemisc',
-   'headerMessage' => 
'timeless-pagemisc',
-   'content' => 
$pileOfTools['page-tertiary'],
-  

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Style and message tweaks

2017-03-23 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344576 )

Change subject: Style and message tweaks
..

Style and message tweaks

Maybe addresses T160647.

Change-Id: I4f6c73db6784415cdeca269321ba6f0f47c67551
---
M i18n/en.json
M resources/screen-common.less
M resources/screen-desktop.less
M resources/variables.less
4 files changed, 31 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/76/344576/1

diff --git a/i18n/en.json b/i18n/en.json
index f476f3c..37a5dea 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,10 +4,10 @@
},
"skinname-timeless": "Timeless",
"timeless-desc": "A timeless skin designed after the Winter prototype 
by Brandon Harris, and various styles by the Wikimedia Foundation",
-   "timeless-search-placeholder": "Search the text of approximately 
{{NUMBEROFPAGES}} pages",
+   "timeless-search-placeholder": "Search approximately {{NUMBEROFPAGES}} 
pages",
"timeless-loggedin": "Your account",
"timeless-anonymous": "Anonymous",
-   "timeless-loggedinas": "Logged in as $1",
+   "timeless-loggedinas": "Logged in as '''$1'''",
"timeless-notloggedin": "Not logged in",
"timeless-userpage": "{{GENDER:$1|User}} page",
"timeless-talkpage": "{{GENDER:$1|User}} talk",
@@ -22,4 +22,3 @@
"timeless-languages": "Languages",
"timeless-sitetitle": "{{MediaWiki:Sitetitle}}"
 }
-
diff --git a/resources/screen-common.less b/resources/screen-common.less
index 41f8c47..68c7390 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -11,8 +11,12 @@
font-family: @fonts;
color: @text;
background: @background-dark;
-   line-height: 1.4;
font-size: @font-size;
+}
+body,
+p,
+div {
+   line-height: 1.4;
 }
 
 #mw-content {
@@ -50,7 +54,7 @@
height: 11em;
background-repeat: no-repeat;
background-position: 50% 50%;
-   margin: auto;
+   margin: .75em auto 0;
 }
 #p-logo-text {
width: @column-left-size;
@@ -68,7 +72,7 @@
/* 13+ character names */
&.long {
font-size: 1.45em;
-   padding: 0;
+   padding: 0 .75em 0 0;
line-height: .8;
}
}
@@ -202,10 +206,9 @@
display: inline-block;
margin: 0;
padding: 0;
-   line-height: 1.5;
}
li {
-   margin: .25em 0 1.5em;
+   margin: .25em 0 1em;
border-bottom: solid 3px @background;
 
&:hover {
diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less
index d9523ce..3bb2251 100644
--- a/resources/screen-desktop.less
+++ b/resources/screen-desktop.less
@@ -80,27 +80,27 @@
.pokey {
top: 2.125em;
}
-}
+   h2 {
+   margin: 0;
+   padding: .7em 0 0 25px;
+   font-family: @fonts-secondary;
+   font-weight: normal;
+   font-size: 1.1em;
+   .background-image-svg('images/user-grey.svg', 
'images/user-grey.png');
+   background-position: 0 7px;
+   background-repeat: no-repeat;
 
-#p-personal h2 {
-   margin: 0;
-   padding: .7em 0 0 25px;
-   font-family: @fonts-secondary;
-   font-weight: normal;
-   font-size: 1.1em;
-   .background-image-svg('images/user-grey.svg', 'images/user-grey.png');
-   background-position: 0 7px;
-   background-repeat: no-repeat;
-
-   .dropdown-header();
-}
-#p-personal:hover {
-   .pokey,
-   .dropdown {
-   display: block !important;
+   .dropdown-header();
+   }
+   &:hover {
+   .pokey,
+   .dropdown {
+   display: block !important;
+   }
}
 }
 
+
 #mw-page-header-links #ca-more,
 #mw-page-header-links #ca-languages,
 .sidebar-chunk h2 {
diff --git a/resources/variables.less b/resources/variables.less
index 136f7bc..9f073d3 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -38,10 +38,10 @@
 
 // Fonts are chosen for consistent metrics, not necessarily overall prettiness.
 // This will NEED fixes for different languages.
-@fonts: 'Helvetica Neue', 'Nimbus Sans', 'Arial', sans-serif;
+@fonts: 'Helvetica Neue', 'Nimbus Sans', 'Helvetica', 'Arial', sans-serif;
 @fonts-secondary: 'Linux Libertine', 'Times New Roman', serif;
-// Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts; not tested
-@fonts-monospace: 'Courier', 'Nimbus Mono', 'Liberation Mono', 'Courier New', 
monospace, monospace;
+// Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts
+@fonts-monospace: 'Con

[MediaWiki-commits] [Gerrit] mediawiki...GreyStuff[master]: Modernise, desoupify, and refactor everything

2017-03-13 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342415 )

Change subject: Modernise, desoupify, and refactor everything
..

Modernise, desoupify, and refactor everything

* All html is rendered using abstracted php; all function
  names also changed to reflect this
* Functions such as getPortlet updated to better match
  Vector handing
* Some css bugs fixed
* Other stuff I don't remember

Change-Id: Ibed3c7aec83e0a7bcbaa56a10e4381b1517bb3f7
---
M GreyStuffTemplate.php
M i18n/en.json
M resources/main.less
M resources/mobile.js
M resources/mobile.js.less
A resources/print.css
M resources/screen-full.less
M resources/screen-mobile.less
M skin.json
9 files changed, 414 insertions(+), 352 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/GreyStuff 
refs/changes/15/342415/1

diff --git a/GreyStuffTemplate.php b/GreyStuffTemplate.php
index bdf5c4a..fd4c24d 100644
--- a/GreyStuffTemplate.php
+++ b/GreyStuffTemplate.php
@@ -10,7 +10,6 @@
  * @authors Whoever wrote monobook
  * @date 2014
  *
- * The DOM here is an utter trainwreck.
  */
 
 /**
@@ -28,362 +27,408 @@
function execute() {
$this->data['pageLanguage'] = 
$this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
 
-   $this->html( 'headelement' );
-   ?>
-   
-   html( 
'userlangattributes' ); ?> class="noprint">
-   
-   
-   
-   >
-   
-   
-   
-   
-   escaped() ?>
-   
-   
-   
-   escaped() ?>
-   
-   
-   
-   
-   
-   
-   outputPersonalNavigation();
-   ?>
-   
-   outputSearch();
-   ?>
-   
-   
-   
-   
-   
-   
-   
-   outputMainNavigation( true );
-   ?>
-   
-   
-   
-   
-   
-   data['sitenotice'] ) {
-   ?>
-   
-   html( 'sitenotice' )
-   ?>
-   
-   data['content_navigation']['actions']['watch'] ) ) {
+   $this->data['content_navigation']['views']['watch'] = 
$this->data['content_navigation']['actions']['watch'];
+   unset( 
$this->data['content_navigation']['actions']['watch'] );
+   }
+   if ( isset( 
$this->data['content_navigation']['actions']['unwatch'] ) ) {
+   $this->data['content_navigation']['views']['unwatch'] = 
$this->data['content_navigation']['actions']['unwatch'];
+   unset( 
$this->data['content_navigation']['actions']['unwatch'] );
+   }
+
+   $html = $this->get( 'headelement' );
+   $html .= Html::openElement( 'div', [ 'id' => 'globalWrapper' ] 
);
+
+   $html .= Html::rawElement( 'div', [ 'id' => 'header-container', 
'lang' => $this->get( 'userlang' ), 'dir' => $this->get( 'dir' ) ],
+   Html::rawElement( 'div', [ 'id' => 
'header-top-container' ],
+   Html::rawElement( 'div', [ 'id' => 'header-top' 
],
+   $this->getBanner() .
+   Html::element( 'div', [ 'id' => 
'menus-cover' ] ) .
+   Html::element( 'div', [ 'id' => 
'main-menu-toggle' ] ) .
+   Html::element( 'div', [ 'id' => 
'personal-menu-toggle' ] ) .
+   Html::element( 'div', [ 'id' => 
'tools-menu-toggle' ] ) .
+
+   $this->getPersonalNavigation() .
+   $this->clear( 'mobile' ) .
+   $this->getSearch() .
+   

[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Fix repeating background image on mobile

2017-03-09 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342048 )

Change subject: Fix repeating background image on mobile
..

Fix repeating background image on mobile

Class name was changed in html, forgot to make the mobile
stylesheet match.

Change-Id: I99802a56134280ea13264e86e50107cbb9fdca49
---
M resources/screen-mobile.less
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/48/342048/1

diff --git a/resources/screen-mobile.less b/resources/screen-mobile.less
index 5a2a372..25c98aa 100644
--- a/resources/screen-mobile.less
+++ b/resources/screen-mobile.less
@@ -16,7 +16,7 @@
border-top: solid 3px @grey;
 }
 
-#page-header-links #ca-view,
+#mw-page-header-links #ca-view,
 #mw-header-nav-hack,
 #page-tools h2,
 #p-logo {
@@ -150,7 +150,7 @@
}
 }
 
-#page-header-links a {
+#mw-page-header-links a {
.ca-icon();
 }
 #ca-edit a {

-- 
To view, visit https://gerrit.wikimedia.org/r/342048
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99802a56134280ea13264e86e50107cbb9fdca49
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Stuff

2017-03-06 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/341490 )

Change subject: Stuff
..

Stuff

Change-Id: Ia46c4f4cf0ce1c043c5506981b4ebc4b6dc4b5d1
---
M TimelessTemplate.php
M i18n/en.json
M resources/screen-common.less
M resources/screen-desktop.less
M resources/screen-mobile.less
M resources/variables.less
6 files changed, 60 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/90/341490/1

diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index 99246ef..115e6f4 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -237,63 +237,6 @@
}
 
/**
-* Makes links for navigation lists.
-*
-* Modified to add a  around  content in navigation lists; 
everything else is
-* basically the same as in BaseTemplate, just with extra stuff removed.
-*
-* Can't just use the original's options['wrapper'] because it's a 
piece of crap and spews
-* infinite errors on the page.
-*/
-   function makeLink( $key, $item, $options = [] ) {
-   if ( isset( $item['text'] ) ) {
-   $text = $item['text'];
-   } else {
-   $text = $this->translator->translate( isset( 
$item['msg'] ) ? $item['msg'] : $key );
-   }
-
-   $html = htmlspecialchars( $text );
-   $html = '' . $html . '';
-
-   if ( isset( $item['href'] ) ) {
-   $attrs = $item;
-   $array = [ 'single-id', 'text', 'msg', 'tooltiponly', 
'context', 'primary', 'tooltip-params' ];
-   foreach ( $array as $k ) {
-   unset( $attrs[$k] );
-   }
-
-   if ( isset( $item['id'] ) && !isset( $item['single-id'] 
) ) {
-   $item['single-id'] = $item['id'];
-   }
-
-   $tooltipParams = [];
-   if ( isset( $item['tooltip-params'] ) ) {
-   $tooltipParams = $item['tooltip-params'];
-   }
-
-   if ( isset( $item['single-id'] ) ) {
-   if ( isset( $item['tooltiponly'] ) && 
$item['tooltiponly'] ) {
-   $title = Linker::titleAttrib( 
$item['single-id'], null, $tooltipParams );
-   if ( $title !== false ) {
-   $attrs['title'] = $title;
-   }
-   } else {
-   $tip = 
Linker::tooltipAndAccesskeyAttribs( $item['single-id'], $tooltipParams );
-   if ( isset( $tip['title'] ) && 
$tip['title'] !== false ) {
-   $attrs['title'] = $tip['title'];
-   }
-   if ( isset( $tip['accesskey'] ) && 
$tip['accesskey'] !== false ) {
-   $attrs['accesskey'] = 
$tip['accesskey'];
-   }
-   }
-   }
-   $html = Html::rawElement( 'a', $attrs, $html );
-   }
-
-   return $html;
-   }
-
-   /**
 * Outputs a sidebar-chunk containing one or more portlets
 */
private function outputSidebarChunk( $id, $headerMessage, $content ) {
@@ -411,7 +354,7 @@
if ( $user->isLoggedIn() ) {
$userName = $user->getName();
// Make sure it fit firsts
-   if ( mb_strlen( $userName ) < 12 ) {
+   if ( mb_strlen( $userName ) < 9 ) {
echo htmlspecialchars( $userName, 
ENT_QUOTES );
} else {
echo wfMessage( 'timeless-loggedin' 
)->escaped();
@@ -437,7 +380,16 @@

html( 'userlangattributes' ) ?>>
getPersonalTools() as $key => 
$item ) {
+   // Skip weird icon tools and the like
+   // No way to actually do this properly, 
so we'll
+   // just guess - if there's a 'data' 
attribute,
+   // it's weird.
+   if ( isset( $item['links'][0]['data'] ) 
) {
+   $extraTools[$key] = $item;
+   continue;
+   }

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Wrap text in BaseTemplate::makeLink links in a span

2017-03-06 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/341426 )

Change subject: Wrap text in BaseTemplate::makeLink links in a span
..

Wrap text in BaseTemplate::makeLink links in a span

Do text instead of text.

This allows links and non-links (labels which may be part of
a link menu, such as with the Vector 'more' dropdown) to
still be selected the same way for syling, which is
necessary for making icon links/labels (such as for mobile).

See for example the Timeless skin, which uses the same
'more' dropdown as Vector, and visually replaces the text
labels with icons on mobile.

Change-Id: I43e0bacfaed8d528af7b779daef1d72d2f9ae912
---
M includes/skins/BaseTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/341426/1

diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index 61d34c6..2eea8f3 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -354,7 +354,7 @@
$text = $this->translator->translate( isset( 
$item['msg'] ) ? $item['msg'] : $key );
}
 
-   $html = htmlspecialchars( $text );
+   $html = Html::element( 'span', [], $text );
 
if ( isset( $options['text-wrapper'] ) ) {
$wrapper = $options['text-wrapper'];

-- 
To view, visit https://gerrit.wikimedia.org/r/341426
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43e0bacfaed8d528af7b779daef1d72d2f9ae912
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: QoL style fixes

2017-02-24 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339608 )

Change subject: QoL style fixes
..

QoL style fixes

* Added monospace font stack for metrics consistency with
  content/headers
* Fixed/styled search suggestions to work with header
* Added styles for hrs

Bug: T131996
Bug: T131993
Change-Id: I99aaaf6c55e375f847683909154a429e180b3dad
---
M resources/forms.less
M resources/screen-common.less
M resources/variables.less
3 files changed, 46 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/08/339608/1

diff --git a/resources/forms.less b/resources/forms.less
index 14edc70..3b13afa 100644
--- a/resources/forms.less
+++ b/resources/forms.less
@@ -118,6 +118,7 @@
box-shadow: inset 0 1px 1px 1px rgba(0, 0, 0, 0.05);
font-size: 1em;
min-height: 30px;
+   font-family: @fonts;
 }
 select {
padding: .25em;
@@ -163,6 +164,7 @@
resize: vertical;
box-sizing: border-box;
line-height: 1.3em;
+   font-family: @fonts-monospace;
 }
 textarea#wpTextbox1 {
border-color: @grey;
diff --git a/resources/screen-common.less b/resources/screen-common.less
index 4ea5124..41f8c47 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -105,6 +105,35 @@
box-shadow: none;
 }
 
+.suggestions {
+   background: @background;
+   box-shadow: 0 2px 2px 1px rgba(0, 0, 0, 0.05);
+
+   .suggestions-special {
+   background-color: @background;
+   border: 1px solid @grey;
+   border-bottom-width: @border;
+   padding: .75em 2em;
+   }
+   .suggestions-results {
+   background-color: @background;
+   border: 1px solid @grey;
+   border-bottom-width: @border;
+   }
+   .suggestions-result {
+   color: @text;
+   padding: .65em 2em .35em;
+   }
+   .suggestions-result-current {
+   background-color: @blue;
+   color: @background;
+   }
+}
+div.suggestions {
+   position: fixed;
+   top: 2.75em !important; // Override js-provided value to account for 
fixed header
+}
+
 /* Dropdown stuff */
 
 .pokey,
@@ -304,9 +333,21 @@
}
 }
 
+hr {
+   border-width: 1px;
+   border-color: @grey;
+   border-style: solid none solid none;
+   margin: .5em 0;
+}
+
 pre {
overflow: auto;
white-space: pre-wrap;
+   font-family: @fonts-monospace;
+}
+
+p {
+   margin: .9em 0 .8em;
 }
 
 .center,
diff --git a/resources/variables.less b/resources/variables.less
index ce12396..136f7bc 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -38,8 +38,10 @@
 
 // Fonts are chosen for consistent metrics, not necessarily overall prettiness.
 // This will NEED fixes for different languages.
+@fonts: 'Helvetica Neue', 'Nimbus Sans', 'Arial', sans-serif;
 @fonts-secondary: 'Linux Libertine', 'Times New Roman', serif;
-@fonts: 'Helvetica Neue', 'Nimbus Sans L', 'Arial', sans-serif;
+// Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts; not tested
+@fonts-monospace: 'Courier', 'Nimbus Mono', 'Liberation Mono', 'Courier New', 
monospace, monospace;
 @border: .2em;
 @radius: .2em;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/339608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99aaaf6c55e375f847683909154a429e180b3dad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Use core .flex-wrap mixin

2017-02-16 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/338071 )

Change subject: Use core .flex-wrap mixin
..

Use core .flex-wrap mixin

It's there now. May as well use it and make the entire
extension incompatible with anything but mw 1.29+.

Change-Id: I9547661d9100f13105fb3e60b2cc5fda0f51d7b5
---
M modules/ext.CollaborationKit.list.styles.less
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/71/338071/1

diff --git a/modules/ext.CollaborationKit.list.styles.less 
b/modules/ext.CollaborationKit.list.styles.less
index 9bea1ce..a9e22c4 100644
--- a/modules/ext.CollaborationKit.list.styles.less
+++ b/modules/ext.CollaborationKit.list.styles.less
@@ -43,10 +43,7 @@
 /* Multilist stuff */
 .mw-ck-multilist {
.flex-display;
-   -webkit-flex-wrap: wrap;
-   -moz-flex-wrap: wrap;
-   -ms-flex-wrap: wrap;
-   flex-wrap: wrap;
+   .flex-wrap;
margin: 0 -.5em;
 
.mw-ck-list-column {

-- 
To view, visit https://gerrit.wikimedia.org/r/338071
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9547661d9100f13105fb3e60b2cc5fda0f51d7b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make edit form visually distinct from preview content regard...

2017-02-16 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/338070 )

Change subject: Make edit form visually distinct from preview content 
regardless of user settings
..

Make edit form visually distinct from preview content
regardless of user settings

User may or may not have an edit toolbar; top border should
render regardless.
User may have preview above or below; form should still be
visually distinct if preview is above, so entire thing is
now wrapped in a coloured box like the editoptions.

I don't like this. But there's no meaningful boundary
between the preview and the editform when the preview is
before the editform otherwise. And this is the default
setting.

Change-Id: I8a3f202964964901e9f8b49200beac2920930cd7
---
M modules/ext.CollaborationKit.edit.styles.less
1 file changed, 29 insertions(+), 29 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/70/338070/1

diff --git a/modules/ext.CollaborationKit.edit.styles.less 
b/modules/ext.CollaborationKit.edit.styles.less
index d4660e9..5b7e77c 100644
--- a/modules/ext.CollaborationKit.edit.styles.less
+++ b/modules/ext.CollaborationKit.edit.styles.less
@@ -1,6 +1,6 @@
 @import "ext.CollaborationKit.mixins.less";
 
-.ck-customeditor-toolbars( @default );
+.ck-customeditor-borders( @default );
 
 .mw-collabkit-modifiededitform {
.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-top > 
.oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header,
@@ -24,14 +24,14 @@
}
 }
 
-.ck-customeditor-toolbars( @color ) {
+.ck-customeditor-borders( @color ) {
.mw-collabkit-modifiededitform {
-   padding-bottom: .75em;
+   padding: 1.5em 1em;
+   border-left: solid 1px fadeout( @color, 85% );
+   border-right: solid 1px fadeout( @color, 85% );
+   border-top: solid 3px @color;
border-bottom: solid 4px @color;
-   }
-   #toolbar {
-   margin-bottom: .75em;
-   border-bottom: solid 3px @color;
+   background-color: fadeout( @color, 95% );
}
 }
 
@@ -52,68 +52,68 @@
 }
 
 .mw-ck-theme-darkred {
-   .ck-customeditor-toolbars( @darkred );
+   .ck-customeditor-borders( @darkred );
 }
 .mw-ck-theme-red {
-   .ck-customeditor-toolbars( @red );
+   .ck-customeditor-borders( @red );
 }
 .mw-ck-theme-darkgrey {
-   .ck-customeditor-toolbars( @darkgrey );
+   .ck-customeditor-borders( @darkgrey );
 }
 .mw-ck-theme-lightgrey {
-   .ck-customeditor-toolbars( @lightgrey );
+   .ck-customeditor-borders( @lightgrey );
 }
 .mw-ck-theme-skyblue {
-   .ck-customeditor-toolbars( @skyblue );
+   .ck-customeditor-borders( @skyblue );
 }
 .mw-ck-theme-blue {
-   .ck-customeditor-toolbars( @blue );
+   .ck-customeditor-borders( @blue );
 }
 .mw-ck-theme-bluegrey {
-   .ck-customeditor-toolbars( @bluegrey );
+   .ck-customeditor-borders( @bluegrey );
 }
 .mw-ck-theme-navyblue {
-   .ck-customeditor-toolbars( @navyblue );
+   .ck-customeditor-borders( @navyblue );
 }
 .mw-ck-theme-darkblue {
-   .ck-customeditor-toolbars( @darkblue );
+   .ck-customeditor-borders( @darkblue );
 }
 .mw-ck-theme-aquamarine {
-   .ck-customeditor-toolbars( @aquamarine );
+   .ck-customeditor-borders( @aquamarine );
 }
 .mw-ck-theme-violet {
-   .ck-customeditor-toolbars( @violet );
+   .ck-customeditor-borders( @violet );
 }
 .mw-ck-theme-purple {
-   .ck-customeditor-toolbars( @purple );
+   .ck-customeditor-borders( @purple );
 }
 .mw-ck-theme-mauve {
-   .ck-customeditor-toolbars( @mauve );
+   .ck-customeditor-borders( @mauve );
 }
 .mw-ck-theme-lightmauve {
-   .ck-customeditor-toolbars( @lightmauve );
+   .ck-customeditor-borders( @lightmauve );
 }
 .mw-ck-theme-salmon {
-   .ck-customeditor-toolbars( @salmon );
+   .ck-customeditor-borders( @salmon );
 }
 .mw-ck-theme-orange {
-   .ck-customeditor-toolbars( @orange );
+   .ck-customeditor-borders( @orange );
 }
 .mw-ck-theme-yellow {
-   .ck-customeditor-toolbars( @yellow );
+   .ck-customeditor-borders( @yellow );
 }
 .mw-ck-theme-gold {
-   .ck-customeditor-toolbars( @gold );
+   .ck-customeditor-borders( @gold );
 }
 .mw-ck-theme-pastelyellow {
-   .ck-customeditor-toolbars( @pastelyellow );
+   .ck-customeditor-borders( @pastelyellow );
 }
 .mw-ck-theme-forestgreen {
-   .ck-customeditor-toolbars( @forestgreen );
+   .ck-customeditor-borders( @forestgreen );
 }
 .mw-ck-theme-brightgreen {
-   .ck-customeditor-toolbars( @brightgreen );
+   .ck-customeditor-borders( @brightgreen );
 }
 .mw-ck-theme-khaki {
-   .ck-customeditor-toolbars( @khaki );
+   .ck-customeditor-borders( @khaki );
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/338070
To unsubscribe, visit https://gerr

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make tooltips line up with form input fields of weird sizes

2017-02-05 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336113 )

Change subject: Make tooltips line up with form input fields of weird sizes
..

Make tooltips line up with form input fields of weird sizes

hub/list editors use custom widths for input fields due to
being editpage extensions. ooui htmlform seems to assume
some very specific usages and comes with some weird default
widths that need to be overriden.

Change-Id: Ie4ae8c156dae6cf45b0e0a70202981e4357c6db1
---
M modules/ext.CollaborationKit.edit.styles.less
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/13/336113/1

diff --git a/modules/ext.CollaborationKit.edit.styles.less 
b/modules/ext.CollaborationKit.edit.styles.less
index a751e82..bb133e6 100644
--- a/modules/ext.CollaborationKit.edit.styles.less
+++ b/modules/ext.CollaborationKit.edit.styles.less
@@ -3,6 +3,7 @@
 .ck-customeditor-toolbars( @default );
 
 .mw-collabkit-modifiededitform {
+   .oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-top > 
.oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header,
.oo-ui-textInputWidget {
max-width: 100%;
}
@@ -16,6 +17,7 @@
.mw-ck-display-input,
.mw-ck-icon-input,
.mw-ck-hub-image-input {
+   
&.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-top > 
.oo-ui-fieldLayout-body > .oo-ui-fieldLayout-header,
&.oo-ui-textInputWidget {
max-width: 40em;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/336113
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4ae8c156dae6cf45b0e0a70202981e4357c6db1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add flexbox mixin for flex-wrap

2017-02-05 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336107 )

Change subject: Add flexbox mixin for flex-wrap
..

Add flexbox mixin for flex-wrap

Includes browser prefixes for old webkit (safaris, old iOS),
IE10, and ancient firefox

Change-Id: I6d3c82e1d1c526a1e307d9c33c576ae357834cb7
---
M resources/src/mediawiki.less/mediawiki.mixins.less
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/336107/1

diff --git a/resources/src/mediawiki.less/mediawiki.mixins.less 
b/resources/src/mediawiki.less/mediawiki.mixins.less
index 3535be8..f21de4b 100644
--- a/resources/src/mediawiki.less/mediawiki.mixins.less
+++ b/resources/src/mediawiki.less/mediawiki.mixins.less
@@ -94,6 +94,13 @@
display: @display;
 }
 
+.flex-wrap( @wrap: wrap ) {
+   -webkit-flex-wrap: @wrap; // iOS 6-, Safari 3.1-6
+   -moz-flex-wrap: @wrap; // Firefox 21-
+   -ms-flex-wrap: @wrap; // IE 10
+   flex-wrap: @wrap;
+}
+
 .flex( @grow: 1, @shrink: 1, @width: auto, @order: 1 ) {
// For 2009/2012 spec alignment consistency with current default
-webkit-box-pack: justify; // iOS 6-, Safari 3.1-6

-- 
To view, visit https://gerrit.wikimedia.org/r/336107
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d3c82e1d1c526a1e307d9c33c576ae357834cb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Remove 'add feature' caction and manage/add buttons in edit ...

2017-01-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334722 )

Change subject: Remove 'add feature' caction and manage/add buttons in edit mode
..

Remove 'add feature' caction and manage/add buttons in edit mode

The 'manage project' and 'add feature' buttons on the bottom
of the page no longer appear when already editing. Same with
the add feature caction.

Bug: T149029
Change-Id: I3d0bcc72b84da39bb76e999c344254408e127b91
---
M CollaborationKit.hooks.php
M includes/content/CollaborationHubContent.php
2 files changed, 9 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/22/334722/1

diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
index a55e95b..3650353 100644
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -30,7 +30,7 @@
$links['views']['edit']['class'] = 
false;
}
}
-   if ( $title->hasContentModel( 'CollaborationHubContent' 
) ) {
+   if ( !in_array( $request->getVal( 'action' ), [ 'edit', 
'submit' ] ) && $title->hasContentModel( 'CollaborationHubContent' ) ) {
// Add feature
$links['actions']['addnewfeature'] = [
'class' => '',
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 2ea7cd1..529260f 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -273,11 +273,14 @@
[ 'class' => 'mw-ck-hub-footer' ],
$this->getParsedFooter( $title, $options )
);
-   $html .= Html::rawElement(
-   'div',
-   [ 'class' => 'mw-ck-hub-footer-actions' ],
-   $this->getSecondFooter( $title )
-   );
+   if ( !$options->getIsPreview() ) {
+   $html .= Html::rawElement(
+   'div',
+   [ 'class' => 'mw-ck-hub-footer-actions' 
],
+   $this->getSecondFooter( $title )
+   );
+   }
+
$html .= Html::closeElement( 'div' );
 
$output->setText( $html );

-- 
To view, visit https://gerrit.wikimedia.org/r/334722
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d0bcc72b84da39bb76e999c344254408e127b91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: ...I'm not sure what happened here.

2017-01-17 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332734 )

Change subject: ...I'm not sure what happened here.
..

...I'm not sure what happened here.

Was: Use addmodulestyles as an array to load all the damn
styles

Because everything works fine without js now and we
shouldn't be using js for the base page layout stuff because
that's stupid.

Also now with arrays. We like arrays. And purple ink. Yes.

Yes.

Bug: ... what the crap, self.
Change-Id: Iadabee28535159241a41354d2f2762987b2c01fb
---
M CollaborationKit.hooks.php
M extension.json
M includes/CollaborationHubContentEditor.php
M includes/CollaborationListContentEditor.php
M includes/SpecialCreateCollaborationHub.php
M includes/SpecialCreateHubFeature.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.colour.js
M modules/ext.CollaborationKit.edit.styles.less
M modules/ext.CollaborationKit.hubimage.js
M modules/ext.CollaborationKit.icon.js
12 files changed, 146 insertions(+), 136 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/34/332734/1

diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
index c27099e..a55e95b 100644
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -107,9 +107,11 @@
$colour = Revision::newFromTitle( $parentHub 
)->getContent()->getThemeColour();
$text = Html::rawElement( 'div', [ 'class' => 
"mw-cklist-square-$colour" ], $text );
 
-   $out->addModuleStyles( 
'ext.CollaborationKit.hubsubpage.styles' );
-   $out->addModules( 'ext.CollaborationKit.icons' );
-   $out->addModules( 'ext.CollaborationKit.blots' );
+   $out->addModuleStyles( [
+   'ext.CollaborationKit.hubsubpage.styles',
+   'ext.CollaborationKit.icons',
+   'ext.CollaborationKit.blots'
+   ] );
 
// Set this mostly just so we can make sure this entire 
thing hasn't already been done, because otherwise the ToC is added twice on 
edit for some reason
$out->setProperty( 'CollaborationHubSubpage', true );
diff --git a/extension.json b/extension.json
index 4b8d88d..427f70d 100644
--- a/extension.json
+++ b/extension.json
@@ -92,14 +92,8 @@
"ext.CollaborationKit.list.styles": {
"styles": "ext.CollaborationKit.list.styles.less"
},
-   "zzext.CollaborationKit.edit.styles": {
+   "ext.CollaborationKit.edit.styles": {
"styles": "ext.CollaborationKit.edit.styles.less"
-   },
-   "ext.CollaborationKit.iconbrowser.styles": {
-   "styles": "ext.CollaborationKit.iconbrowser.styles.less"
-   },
-   "ext.CollaborationKit.colourbrowser.styles": {
-   "styles": 
"ext.CollaborationKit.colourbrowser.styles.less"
},
"ext.CollaborationKit.iconbrowser": {
"scripts": "ext.CollaborationKit.icon.js",
@@ -115,9 +109,10 @@
"collaborationkit-icon-select",
"collaborationkit-icon-launchbutton",
"cancel"
-   ]
+   ],
+   "styles": "ext.CollaborationKit.iconbrowser.styles.less"
},
-   "ext.CollaborationKit.hubimage": {
+   "ext.CollaborationKit.hubimagebrowser": {
"scripts": "ext.CollaborationKit.hubimage.js",
"dependencies": [
"oojs-ui",
@@ -134,7 +129,7 @@
"cancel"
]
},
-   "ext.CollaborationKit.colour": {
+   "ext.CollaborationKit.colourbrowser": {
"scripts": "ext.CollaborationKit.colour.js",
"dependencies": [
"oojs-ui",
@@ -170,7 +165,8 @@
"collaborationkit-green2",
"collaborationkit-green3",
"collaborationkit-black"
-   ]
+   ],
+   "styles": 
"ext.CollaborationKit.colourbrowser.styles.less"
},
"ext.CollaborationKit.list.edit": {
"scripts": "ext.CollaborationKit.list.edit.js",
diff --git a/includes/CollaborationHubContentEditor.php 
b/includes/CollaborationHubContentEditor.php
index 302dca0..f15954c 100644
--- a/includes/CollaborationHubContentEditor.php
++

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fix some list things - editsection links, tags, etc

2017-01-17 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332725 )

Change subject: Fix some list things - editsection links,  tags, etc
..

Fix some list things - editsection links,  tags, etc

* Editsection links supposedly were resolved, but still
  showing up. added __NOEDITSECTION__ to get rid of them.
*  tags were appearing around the description due to no
  \n after the __NOTOC__ - moved \n from  down.
* Also some better padding around column headers.

Bug: T155598
Change-Id: I5ea92991fd8b5346fbcfad83bdcd04ec891f82a1
---
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.list.styles.less
2 files changed, 8 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/25/332725/1

diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 44dd70e..bb35930 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -248,10 +248,10 @@
}
 
// Hack to force style loading even when we don't have a Parser 
reference.
-   $text = "\n";
+   $text = "";
 
-   // Ugly way to prevent unexpected column header TOCs and 
edit-section buttons from showing up
-   $text .= "__NOTOC__ __NOEDITSECTION__";
+   // Ugly way to prevent unexpected column header TOCs and 
editsection links from showing up
+   $text .= "__NOTOC__ __NOEDITSECTION__\n";
 
if ( $includeDesc ) {
$text .= $this->getDescription() . "\n";
@@ -277,9 +277,7 @@
'class' => 'mw-ck-list-column',
'data-collabkit-column-id' => $colId
] ) . "\n";
-   $text .= Html::openElement( 'div', [
-   'class' => 'mw-ck-list-column-header'
-   ] ) . "\n";
+   $text .= '' . 
"\n";
if ( $options['showColumnHeaders'] && isset( 
$column->label ) && $column->label !== '' ) {
$text .= "=== {$column->label} ===\n";
}
diff --git a/modules/ext.CollaborationKit.list.styles.less 
b/modules/ext.CollaborationKit.list.styles.less
index 18d5260..39f670e 100644
--- a/modules/ext.CollaborationKit.list.styles.less
+++ b/modules/ext.CollaborationKit.list.styles.less
@@ -61,7 +61,10 @@
margin: 0;
}
.mw-ck-list-column-header {
-   padding: 1.6em 1.6em .25em;
+   padding: 1.25em 1.5em .35em;
+
+   // YOU ARE AN IDIOT AND YOU SUCK, SELF
+   // Can anyone else explain how this voodoo works? because now I 
can't figure it out
margin: -1.6em -1.6em 1em;
border-radius: 3px 3px 0 0;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/332725
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ea92991fd8b5346fbcfad83bdcd04ec891f82a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Add help messages, refactor forms a bit

2017-01-12 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331921 )

Change subject: Add help messages, refactor forms a bit
..

Add help messages, refactor forms a bit

This is broken.

Change-Id: I7d7a9656618f7388dea59d1311954c48a730ebea
---
M i18n/en.json
M i18n/qqq.json
M includes/CollaborationHubContentEditor.php
M includes/SpecialCreateCollaborationHub.php
4 files changed, 102 insertions(+), 84 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/21/331921/1

diff --git a/i18n/en.json b/i18n/en.json
index 311394b..21862a1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,22 +6,12 @@
"createcollaborationhub": "Create new Collaboration Hub project",
"createhubfeature": "Create a new Collaboration Hub feature",
"collaborationkit-createhub-title": "Page title",
-   "collaborationkit-createhub-displayname": "Project display name",
-   "collaborationkit-createhub-image": "Project image",
-   "collaborationkit-createhub-colour": "Theme color",
-   "collaborationkit-createhub-new": "None",
-   "collaborationkit-createhub-import": "Wikitext",
-   "collaborationkit-createhub-clone": "Clone existing Collaboration Hub",
-   "collaborationkit-createhub-content": "Content import",
-   "collaborationkit-createhub-source": "Source",
-   "collaborationkit-createhub-introduction": "Project introduction",
"collaborationkit-createhub-invalidtitle": "The specified title is 
invalid",
"collaborationkit-createhub-exists": "A page already exists with the 
specified title, and there is no support yet for imports",
"collaborationkit-createhub-nopermission": "You do not have permission 
to create a Collaboration Hub with this title",
-   "collaborationkit-createhub-invalidsource": "The specified source 
cannot be used",
-   "collaborationkit-createhub-editsummary": "Create new Collaboration 
Hub",
-   "collaborationkit-createhubfeature-collaborationhub": "Collaboration 
Hub",
-   "collaborationkit-createhubfeature-featurename": "Name of feature",
+   "collaborationkit-createhub-editsummary": "Created new Collaboration 
Hub",
+   "collaborationkit-createhubfeature-collaborationhub": "Parent 
Collaboration Hub",
+   "collaborationkit-createhubfeature-featurename": "Feature name",
"collaborationkit-createhubfeature-icon": "Icon",
"collaborationkit-createhubfeature-contenttype": "What type of page is 
this?",
"collaborationkit-createhubfeature-invalidtitle": "You have chosen an 
invalid page title",
@@ -62,11 +52,11 @@
"collaborationkit-list-newitem-description": "Description (optional)",
"collaborationkit-listedit-description": "Description",
"collaborationkit-listedit-list": "List items",
-   "collaborationkit-hubedit-displayname": "Name to display",
+   "collaborationkit-hubedit-displayname": "Hub display name",
"collaborationkit-hubedit-introduction": "Introduction",
"collaborationkit-hubedit-footer": "Footer",
"collaborationkit-hubedit-image": "Hub image",
-   "collaborationkit-hubedit-colour": "Color",
+   "collaborationkit-hubedit-colour": "Hub theme Color",
"collaborationkit-hubedit-content": "Features",
"collaborationkit-editjsontab": "Edit as JSON",
"collaborationkit-hub-announcements-initial": "A new collaboration hub 
has been set up!",
@@ -120,5 +110,11 @@
"collaborationkit-green3": "Khaki",
"collaborationkit-black": "Black",
"collaborationkit-column-active": "Active members",
-   "collaborationkit-column-inactive": "Inactive members"
+   "collaborationkit-column-inactive": "Inactive members",
+   "createcollaborationhub-text": "You are creating a new Collaboration 
Hub. Once the page is created, you will be able to add features, as well as 
edit any of this later.",
+   "collaborationkit-createhub-title-help": "Where to create the Hub",
+   "collaborationkit-createhub-title-placeholder": "Project:...",
+   "collaborationkit-hubedit-displayname-help": "Used to refer to the 
project on other pages. Only needed if different from the page title.",
+   "collaborationkit-hubedit-image-help": "An image or icon to represent 
the project",
+   "collaborationkit-hubedit-introduction-placeholder": "Introduce your 
project here! Tell us what you want to do."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4a9d86c..9f4a019 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -6,19 +6,9 @@
"createcollaborationhub": "Header for Special:CreateCollaborationHub",
"createhubfeature": "Header for Special:CreateHubFeature",
"collaborationkit-createhub-title": "Label for target page title input 
on Special:CreateCollaborationHub",
-   "collaborationkit-createhub-displayname": "Label for pag

[MediaWiki-commits] [Gerrit] mediawiki...Screenplay[master]: Add support for wrapping multiple lines in divs.

2017-01-04 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330634 )

Change subject: Add support for wrapping multiple lines in divs.
..

Add support for wrapping multiple lines in divs.

It's just horrible regex. Help.

Change-Id: I2802254b6bce28d61851c1d27fd39281a5ab80d4
---
M Screenplay.class.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Screenplay 
refs/changes/34/330634/1

diff --git a/Screenplay.class.php b/Screenplay.class.php
index dc4714d..b7a82d7 100644
--- a/Screenplay.class.php
+++ b/Screenplay.class.php
@@ -44,6 +44,12 @@
return str_repeat( '', intval( 
$matches[1] ) );
}
 
+   // html tags to wrap multiple slugs or other things
+   // This is just horrible regex, so they don't support 
parsing of any kind...
+   if ( preg_match( 
'/^(<((\/)?div((\s)*(class|id|style)(\s)*=(\s)*".*?"(\s)*)*?)>(\s)*)$/', $block 
) ) {
+   return $block;
+   }
+
// 'shot-heading': a single line where the first four 
letters are 'INT.' or 'EXT.'
if ( preg_match( '/^(?:INT[., -]|EXT[., -]).+$/', 
$block ) ) {
return

-- 
To view, visit https://gerrit.wikimedia.org/r/330634
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2802254b6bce28d61851c1d27fd39281a5ab80d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Screenplay
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Style custom edit forms a bit

2016-12-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/325888 )

Change subject: Style custom edit forms a bit
..

Style custom edit forms a bit

Doesn't style around the js tools, biut this layout should act as a
fallback either way.

Also does some magic to use the hub colour, if it's a hub, for the
borders.

Put back @default.

Bug: T149031
Bug: T148943
Change-Id: I1593f6dc199e0f0f639c891436429443a6d1519d
---
M extension.json
M includes/CollaborationHubContentEditor.php
M includes/CollaborationListContentEditor.php
A modules/ext.CollaborationKit.edit.styles.less
M modules/ext.CollaborationKit.mixins.less
5 files changed, 119 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/88/325888/1

diff --git a/extension.json b/extension.json
index ea49f1f..1396ad9 100644
--- a/extension.json
+++ b/extension.json
@@ -89,6 +89,9 @@
"ext.CollaborationKit.list.styles": {
"styles": "ext.CollaborationKit.list.styles.less"
},
+   "zzext.CollaborationKit.edit.styles": {
+   "styles": "ext.CollaborationKit.edit.styles.less"
+   },
"ext.CollaborationKit.iconbrowser.styles": {
"styles": "ext.CollaborationKit.iconbrowser.styles.less"
},
diff --git a/includes/CollaborationHubContentEditor.php 
b/includes/CollaborationHubContentEditor.php
index 66c7df9..f80de23 100644
--- a/includes/CollaborationHubContentEditor.php
+++ b/includes/CollaborationHubContentEditor.php
@@ -4,6 +4,9 @@
  */
 class CollaborationHubContentEditor extends EditPage {
 
+   /** @var string */
+   protected $colour;
+
function __construct( $page ) {
parent::__construct( $page );
// Make human readable the default format for editing, but still
@@ -14,6 +17,7 @@
$out = $this->getContext()->getOutput();
$out->addModules( 'ext.CollaborationKit.colour' );
$out->addModules( 'ext.CollaborationKit.hubimage' );
+   $out->addModuleStyles( 'zzext.CollaborationKit.edit.styles' );
$out->addModuleStyles( 
'ext.CollaborationKit.colourbrowser.styles' );
$out->addJsConfigVars( 'wgCollaborationKitColourList', 
CollaborationHubContent::getThemeColours() );
}
@@ -78,6 +82,8 @@
$colours
);
 
+   $this->colour = $selectedColour;
+
if ( $parts[5] == '' ) {
$includedContent = '';
} else {
@@ -110,7 +116,10 @@
 
$out = RequestContext::getMain()->getOutput();
 
-   $out->addHtml( Html::rawElement( 'div', [ 'class' => 
'mw-collabkit-modifiededitform' ], $this->getFormFields( $parts ) ) );
+   $partFields = $this->getFormFields( $parts );
+   $out->addHtml( Html::rawElement( 'div', [ 'class' => 
'mw-collabkit-modifiededitform' ], $partFields ) );
+   $out->prependHtml( Html::openElement( 'div', [ 'class' => 
'mw-ck-theme-' . $this->colour ] ) );
+   $out->addHtml( Html::closeElement( 'div' ) );
}
 
/**
diff --git a/includes/CollaborationListContentEditor.php 
b/includes/CollaborationListContentEditor.php
index 50ccf1f..3ed0977 100644
--- a/includes/CollaborationListContentEditor.php
+++ b/includes/CollaborationListContentEditor.php
@@ -11,6 +11,9 @@
if ( $this->getCurrentContent()->isValid() ) {
$this->contentFormat = 
CollaborationListContentHandler::FORMAT_WIKI;
}
+
+   $out = $this->getContext()->getOutput();
+   $out->addModuleStyles( 'zzext.CollaborationKit.edit.styles' );
}
 
protected function showContentForm() {
diff --git a/modules/ext.CollaborationKit.edit.styles.less 
b/modules/ext.CollaborationKit.edit.styles.less
new file mode 100644
index 000..3e7c207
--- /dev/null
+++ b/modules/ext.CollaborationKit.edit.styles.less
@@ -0,0 +1,101 @@
+@import "ext.CollaborationKit.mixins.less";
+
+.ck-customeditor-toolbars( @default );
+
+.mw-collabkit-modifiededitform > div {
+   margin-top: .5em;
+}
+.mw-collabkit-modifiededitform label {
+   font-weight: bold;
+}
+
+.mw-ck-displayinput label:after,
+.mw-ck-hubimageinput label:after,
+.mw-ck-colourinput label:after {
+   content: ':';
+   padding-right: .5em;
+}
+.mw-ck-displayinput,
+.mw-ck-hubimageinput {
+   input {
+   width: 40%;
+   }
+}
+
+.ck-customeditor-toolbars( @color ) {
+   .mw-collabkit-modifiededitform {
+   padding-bottom: .75em;
+   border-bottom: solid 4px @color;
+   }
+   #toolbar {
+   margin-bottom: .75em;
+   border-bottom: solid 3px @color;
+   }
+}
+
+.

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Style collaborationlist columns

2016-11-16 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/322026

Change subject: Style collaborationlist columns
..

Style collaborationlist columns

This seems wrong.

Bug: T149035
Change-Id: I736137663c5bdf27a5aa8d04c1bb2c89f785bd4f
---
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.list.styles.less
2 files changed, 13 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/26/322026/1

diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 46ba902..6bd99a3 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -243,7 +243,7 @@
$text .= "=== {$column->label} ===\n";
}
if ( isset( $column->notes ) && $column->notes !== '' ) 
{
-   $text .= "\n{$column->notes}\n\n";
+   $text .= "{$column->notes}\n";
}
 
if ( count( $column->items ) === 0 ) {
diff --git a/modules/ext.CollaborationKit.list.styles.less 
b/modules/ext.CollaborationKit.list.styles.less
index 20f3e92..e3edd05 100644
--- a/modules/ext.CollaborationKit.list.styles.less
+++ b/modules/ext.CollaborationKit.list.styles.less
@@ -23,7 +23,6 @@
background-color: #eee;
background-position: 50% 50%;
 }
-
 .mw-ck-list-container {
height: 64px;
padding-left: 10px;
@@ -31,7 +30,6 @@
vertical-align: middle;
line-height: 1.2;
 }
-
 .mw-ck-list-title {
font-size: 110%;
font-weight: bold;
@@ -39,6 +37,18 @@
 
 .mw-ck-list-notes {
font-size: 90%;
+   margin: 1em 0 2em;
+}
+
+/* Multilist stuff */
+.mw-ck-multilist {
+   .flex-display;
+   margin: 0 -1.5em;
+}
+.mw-ck-list-column {
+   float: left; // IE9 workaround
+   .flex();
+   margin: 1.5em;
 }
 
 /* @todo, should maybe replace styling from toccolours with this class */

-- 
To view, visit https://gerrit.wikimedia.org/r/322026
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I736137663c5bdf27a5aa8d04c1bb2c89f785bd4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Fix horizontal scrollbar on special pages

2016-11-16 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/321950

Change subject: Fix horizontal scrollbar on special pages
..

Fix horizontal scrollbar on special pages

Solution: fix .hidden mixin, per Alexander E. Patrakov's report

Bug: T131575
Change-Id: Id37fd9d243813cca9ea1630e5ef117ad87cf2050
---
M resources/variables.less
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/50/321950/1

diff --git a/resources/variables.less b/resources/variables.less
index 6657dfa..ce12396 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -63,6 +63,7 @@
 .hidden() {
position: absolute;
top: -px;
+   left: 0px;
 }
 
 // Icons - hides labels, but keep them accessible for screen-readers

-- 
To view, visit https://gerrit.wikimedia.org/r/321950
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id37fd9d243813cca9ea1630e5ef117ad87cf2050
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Convert CollaborationHubContentEditor from oojs ui

2016-11-09 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/320692

Change subject: Convert CollaborationHubContentEditor from oojs ui
..

Convert CollaborationHubContentEditor from oojs ui

OOJS output is a bit messy, and subject to change. We need a normal edit form
that we can rearrange and stuff, with our own styles. OOJS will still be used
for fancy popups/specific forms.
Helper function was added to CollaborationListContentEditor to clean these up
a bit.

Bug: T149018
Change-Id: I19ec59dd753fb4a9bffe471f51ddc30e83196cdc
---
M includes/CollaborationHubContentEditor.php
M includes/CollaborationListContentEditor.php
2 files changed, 116 insertions(+), 126 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/92/320692/1

diff --git a/includes/CollaborationHubContentEditor.php 
b/includes/CollaborationHubContentEditor.php
index 64739b9..653a8c8 100644
--- a/includes/CollaborationHubContentEditor.php
+++ b/includes/CollaborationHubContentEditor.php
@@ -12,128 +12,80 @@
}
 
/**
-* Build and return the aossociative array for the content source field.
-* @param $mapping array
-* @return array
-*/
-   protected function getOptions( $mapping ) {
-   $options = [];
-   foreach ( $mapping as $msgKey => $option ) {
-   $options[] = [ 'label' => wfMessage( $msgKey 
)->escaped(), 'data' => $option ];
-   }
-   return $options;
-   }
-
-   /**
 * @param $parts array
-* @return array
+* @return string html
 */
protected function getFormFields( $parts ) {
+   $displayName = CollaborationListContentEditor::editorInput(
+   'input',
+   'mw-ck-displayinput',
+   'collaborationkit-hubedit-displayname',
+   'wpCollabHubDisplayName',
+   $parts[0],
+   [ 'id' => 'wpCollabHubDisplayName' ]
+   );
 
-   $fields = [
-   // Display name can be different from page title
-   'display_name' => new OOUI\FieldLayout(
-   new OOUI\TextInputWidget( [
-   'name' => 'wpCollabHubDisplayName',
-   'id' => 'wpCollabHubDisplayName',
-   'type' => 'text',
-   'cssclass' => 'mw-ck-displayinput',
-   'value' => $parts[0]
-   ] ),
-   [
-   'label' => wfMessage( 
'collaborationkit-hubedit-displayname' )->text(),
-   'align' => 'top'
-   ] ),
-   'introduction' => new OOUI\FieldLayout(
-   new OOUI\TextInputWidget( [
-   'multiline' => true,
-   'name' => 'wpCollabHubIntroduction',
-   'id' => 'wpCollabHubIntroduction',
-   'type' => 'textarea',
-   'rows' => 5,
-   'cssclass' => 'mw-ck-introductioninput',
-   'value' => $parts[1]
-   ] ),
-   [
-   'label' => wfMessage( 
'collaborationkit-hubedit-introduction' )->text(),
-   'align' => 'top'
-   ] ),
-   'footer' => new OOUI\FieldLayout(
-   new OOUI\TextInputWidget( [
-   'multiline' => true,
-   'name' => 'wpCollabHubFooter',
-   'id' => 'wpCollabHubFooter',
-   'type' => 'textarea',
-   'rows' => 5,
-   'cssclass' => 'mw-ck-introductioninput',
-   'value' => $parts[2]
-   ] ),
-   [
-   'label' => wfMessage( 
'collaborationkit-hubedit-footer' )->text(),
-   'align' => 'top'
-   ] ),
-   // Hub image/icon thing
-   'image' => new OOUI\FieldLayout(
-   new OOUI\TextInputWidget( [
-   'name' => 'wpCollabHubImage',
-  

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Only show ToC for hubs if the hubs have content

2016-10-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318462

Change subject: Only show ToC for hubs if the hubs have content
..

Only show ToC for hubs if the hubs have content

Also added a couple of visualclears, except not because apparently not all
skins actually use visualclears.

Bug: T149032
Change-Id: Id9f71c0b6a1b0812160d21a81438ff17aa0f5630
---
M CollaborationKit.hooks.php
M includes/content/CollaborationHubContent.php
2 files changed, 14 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/62/318462/1

diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
index d89ce7b..a1e16e1 100644
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -97,6 +97,7 @@
 
if ( $parentHub
&& $out->getProperty( 'CollaborationHubSubpage' ) === 
'in-progress'
+   && count( Revision::newFromTitle( $parentHub 
)->getContent()->getContent() ) > 0
) {
$toc = new CollaborationHubTOC();
$out->prependHtml( $toc->renderSubpageToC( $parentHub ) 
);
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 0a93742..51ef591 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -248,17 +248,25 @@
$this->getParsedAnnouncements( $title, $options 
)
);
// get table of contents
-   $html .= Html::rawElement(
-   'div',
-   [ 'class' => 'wp-toc' ],
-   $this->getTableOfContents( $title, $options )
-   );
+   if ( count( $this->getContent() ) > 0 ) {
+   $html .= Html::rawElement(
+   'div',
+   [ 'class' => 'wp-toc' ],
+   $this->getTableOfContents( $title, 
$options )
+   );
+   }
+
+   $html .= Html::element( 'div', [ 'style' => 
'clear:both' ] );
+
// get transcluded content
$html .= Html::rawElement(
'div',
[ 'class' => 'wp-content' ],
$this->getParsedContent( $title, $options, 
$output )
);
+
+   $html .= Html::element( 'div', [ 'style' => 
'clear:both' ] );
+
// get footer
$html .= Html::rawElement(
'div',

-- 
To view, visit https://gerrit.wikimedia.org/r/318462
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9f71c0b6a1b0812160d21a81438ff17aa0f5630
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make subpage ToC still show a name for projects without a di...

2016-10-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318456

Change subject: Make subpage ToC still show a name for projects without a 
displayname
..

Make subpage ToC still show a name for projects without a displayname

Bug: T149033
Change-Id: I3f2c9307b2b2050dad249a97a569b0b2a6845eb7
---
M includes/content/CollaborationHubTOC.php
1 file changed, 16 insertions(+), 16 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/56/318456/1

diff --git a/includes/content/CollaborationHubTOC.php 
b/includes/content/CollaborationHubTOC.php
index e4d296c..0f018f1 100644
--- a/includes/content/CollaborationHubTOC.php
+++ b/includes/content/CollaborationHubTOC.php
@@ -38,11 +38,11 @@
 * @param $colour string variable from collaborationhub content
 * @return string html
 */
-   public function renderToC( $content, $colour ) {
-   $html = Html::openElement( 'div', [ 'class' => 
'wp-toc-container' ] );
+   public function renderToC( $content ) {
+   $html = Html::openElement( 'div', [ 'class' => 
'mw-ck-toc-container' ] );
$html .= Html::rawElement(
'div',
-   [ 'class' => 'toc-label' ],
+   [ 'class' => 'mw-ck-toc-label' ],
wfMessage( 'collaborationkit-hub-toc-label' 
)->inContentLanguage()->text()
);
$html .= Html::openElement( 'ul' );
@@ -60,11 +60,11 @@
$linkTarget = Title::newFromText( '#' . 
$this->getToCLinkID( $displayTitle ) );
$image = isset( $item['image'] ) ? $item['image'] : 
$displayTitle;
 
-   $link = $this->renderItem( $linkTarget, $displayTitle, 
$image, $colour, 50 );
+   $link = $this->renderItem( $linkTarget, $displayTitle, 
$image, 50 );
 
$html .= Html::rawElement(
'li',
-   [ 'class' => 'wp-toc-item' ],
+   [ 'class' => 'mw-ck-toc-item' ],
$link
);
}
@@ -88,13 +88,13 @@
$colour = $content->getThemeColour();
$image = $content->getImage();
 
-   $html = Html::openElement( 'div', [ 'class' => 
"mw-cktheme-$colour" ] );
-   $html .= Html::openElement( 'div', [ 'class' => 
"wp-subpage-toc" ] );
+   $html = Html::openElement( 'div', [ 'class' => 
"mw-ck-theme-$colour" ] );
+   $html .= Html::openElement( 'div', [ 'class' => 
"mw-ck-subpage-toc" ] );
 
// ToC label
$html .= Html::rawElement(
'div',
-   [ 'class' => 'toc-label' ],
+   [ 'class' => 'mw-ck-toc-label' ],
Html::rawElement(
'span',
[],
@@ -103,15 +103,16 @@
);
 
// hubpage
-   $link = $this->renderItem( $title, $content->getDisplayName(), 
$image, $colour, 16 );
+   $name = $content->getDisplayName() == '' ? $title->getText() : 
$content->getDisplayName();
+   $link = $this->renderItem( $title, $name, $image, 16 );
$html .= Html::rawElement(
'div',
-   [ 'class' => 'toc-subpage-hub' ],
+   [ 'class' => 'mw-ck-toc-subpage-hub' ],
$link
);
 
// Contents
-   $html .= Html::openElement( 'ul', [ 'class' => 'toc-contents' ] 
);
+   $html .= Html::openElement( 'ul', [ 'class' => 
'mw-ck-toc-contents' ] );
 
foreach ( $content->getContent() as $item ) {
$itemTitle = Title::newFromText( $item['title'] );
@@ -127,7 +128,7 @@
 
$html .= Html::rawElement(
'li',
-   [ 'class' => 'wp-toc-item' ],
+   [ 'class' => 'mw-ck-toc-item' ],
$itemLink
);
}
@@ -143,19 +144,18 @@
 * @param $title Title for target
 * @param $text string diplay text for title
 * @param $image string seed for makeIconOrImage
-* @param $imageColour string colour id
 * @param $imageSize int size
 * @return string html
 */
-   protected function renderItem( Title $title, $text, $image, 
$imageColour, $imageSize ) {
+   protected function renderItem( Title $title, $text, $image, $imageSize 
) {
$linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
 
-   $icon = CollaborationKitI

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Remove content import fields from specialcreatecollaborationhub

2016-10-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318438

Change subject: Remove content import fields from specialcreatecollaborationhub
..

Remove content import fields from specialcreatecollaborationhub

What's there is now commented out with a note about the task.

Bug: 149014
Change-Id: I2a917154afd4913c2aad2435e87ee2ec21974366
---
M includes/SpecialCreateCollaborationHub.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/38/318438/1

diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index 26c761b..bba5124 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -63,6 +63,7 @@
'default' => 'blue5'
];
 
+   /* Comment this out until it's actually implemented (T135408)
// Content source options
$fields['content_source'] = [
'type' => 'select',
@@ -81,6 +82,7 @@
'hide-if' => [ '===', 'wpcontent_source', 'new' ],
'cssclass' => 'mw-ck-sourceinput'
];
+   */
 
$fields['introduction'] = [
'type' => 'textarea',
@@ -124,6 +126,7 @@
return Status::newFatal( 
'collaborationhkit-createhub-nopermission' );
}
 
+   /* Comment this out until it's actually implemented (T135408)
// ACTUAL STUFF HERE
if ( $data['content_source'] !== 'new' ) { // Importing from 
wikitext
$source = Title::newFromText( $data['source'] );
@@ -148,6 +151,7 @@
 
// ...?
}
+   */
 
$title = Title::newFromText( $data['title'] );
if ( !$title ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/318438
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a917154afd4913c2aad2435e87ee2ec21974366
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make icons inherit colour from theme on hubs

2016-10-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318369

Change subject: Make icons inherit colour from theme on hubs
..

Make icons inherit colour from theme on hubs

Icans still have colours directly set (for lists etc), which overrides this.

Bug: T141584
Change-Id: I956160ec158933f069a63d53df8313c9b42c2aba
---
M extension.json
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubTOC.php
M includes/content/CollaborationKitIcon.php
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.hub.styles.less
M modules/ext.CollaborationKit.hub.subpage.styles.less
M modules/ext.CollaborationKit.mixins.less
8 files changed, 46 insertions(+), 47 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/69/318369/1

diff --git a/extension.json b/extension.json
index 1ab6b63..c120287 100644
--- a/extension.json
+++ b/extension.json
@@ -189,8 +189,8 @@
]
},
"ext.CollaborationKit.blots": {
-   "selectorWithoutVariant": ".mw-cklist-{name} ul",
-   "selectorWithVariant": ".mw-cklist-{name}-{variant} ul",
+   "selectorWithoutVariant": 
".mw-ck-theme.mw-ck-list-{name} ul",
+   "selectorWithVariant": 
".mw-ck-theme-{variant}.mw-ck-list-{name} ul",
"class": "ResourceLoaderListStyleModule",
"variants": {
"red1": { "color": "#700", "global": true },
@@ -221,8 +221,8 @@
}
},
"ext.CollaborationKit.icons": {
-   "selectorWithoutVariant": ".mw-ckicon-{name}",
-   "selectorWithVariant": ".mw-ckicon-{name}-{variant}",
+   "selectorWithoutVariant": ".mw-ck-theme 
.mw-ck-icon-{name}, .mw-ck-icon-{name}",
+   "selectorWithVariant": ".mw-ck-theme-{variant} 
.mw-ck-icon-{name}, .mw-ck-icon-{name}-{variant}",
"class": "ResourceLoaderImageModule",
"variants": {
"red1": { "color": "#700", "global": true },
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 0a93742..a19349c 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -296,13 +296,13 @@
];
if ( $colour == 'black' ) {
$classes = array_merge( $classes, [
-   'mw-cklist-square',
-   'mw-cktheme'
+   'mw-ck-list-square',
+   'mw-ck-theme'
] );
} else {
$classes = array_merge( $classes, [
-   'mw-cklist-square-' . $colour,
-   'mw-cktheme-' . $colour
+   'mw-ck-list-square-' . $colour,
+   'mw-ck-theme-' . $colour
] );
}
 
diff --git a/includes/content/CollaborationHubTOC.php 
b/includes/content/CollaborationHubTOC.php
index e4d296c..9acb03f 100644
--- a/includes/content/CollaborationHubTOC.php
+++ b/includes/content/CollaborationHubTOC.php
@@ -38,7 +38,7 @@
 * @param $colour string variable from collaborationhub content
 * @return string html
 */
-   public function renderToC( $content, $colour ) {
+   public function renderToC( $content ) {
$html = Html::openElement( 'div', [ 'class' => 
'wp-toc-container' ] );
$html .= Html::rawElement(
'div',
@@ -60,7 +60,7 @@
$linkTarget = Title::newFromText( '#' . 
$this->getToCLinkID( $displayTitle ) );
$image = isset( $item['image'] ) ? $item['image'] : 
$displayTitle;
 
-   $link = $this->renderItem( $linkTarget, $displayTitle, 
$image, $colour, 50 );
+   $link = $this->renderItem( $linkTarget, $displayTitle, 
$image, 50 );
 
$html .= Html::rawElement(
'li',
@@ -143,14 +143,13 @@
 * @param $title Title for target
 * @param $text string diplay text for title
 * @param $image string seed for makeIconOrImage
-* @param $imageColour string colour id
 * @param $imageSize int size
 * @return string html
 */
-   protected function renderItem( Title $title, $text, $image, 
$imageColour, $imageSize ) {
+   protected function renderItem( Title $title, $text, $image, $imageSize 
) {
$linkRenderer = 
MediaWikiServices::getInstance()->

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fix colours in extension.json to match mixins.less

2016-10-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318367

Change subject: Fix colours in extension.json to match mixins.less
..

Fix colours in extension.json to match mixins.less

Change-Id: I15d3f8a0c5e580ae72a3bd93b9535d9601e428ab
---
M extension.json
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/67/318367/1

diff --git a/extension.json b/extension.json
index 7d21e5b..1ab6b63 100644
--- a/extension.json
+++ b/extension.json
@@ -198,11 +198,11 @@
"grey1": { "color": "#444", "global": true },
"grey2": { "color": "#ccc", "global": true },
"blue1": { "color": "#3af", "global": true },
-   "blue2": { "color": "#01e", "global": true },
+   "blue2": { "color": "#24e", "global": true },
"blue3": { "color": "#abcdef", "global": true },
"blue4": { "color": "#159", "global": true },
"blue5": { "color": "#008", "global": true },
-   "blue6": { "color": "#4ca", "global": true },
+   "blue6": { "color": "#4cc", "global": true },
"purple1": { "color": "#b8d", "global": true },
"purple2": { "color": "#628", "global": true },
"purple3": { "color": "#605", "global": true },
@@ -230,11 +230,11 @@
"grey1": { "color": "#444", "global": true },
"grey2": { "color": "#ccc", "global": true },
"blue1": { "color": "#3af", "global": true },
-   "blue2": { "color": "#01e", "global": true },
+   "blue2": { "color": "#24e", "global": true },
"blue3": { "color": "#abcdef", "global": true },
"blue4": { "color": "#159", "global": true },
"blue5": { "color": "#008", "global": true },
-   "blue6": { "color": "#4ca", "global": true },
+   "blue6": { "color": "#4cc", "global": true },
"purple1": { "color": "#b8d", "global": true },
"purple2": { "color": "#628", "global": true },
"purple3": { "color": "#605", "global": true },

-- 
To view, visit https://gerrit.wikimedia.org/r/318367
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15d3f8a0c5e580ae72a3bd93b9535d9601e428ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make colour names properly match colours

2016-10-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318359

Change subject: Make colour names properly match colours
..

Make colour names properly match colours

Some of them didn't entirely match. Made them match. Also adjusted a couple of
values to be possibly better.

Bug: T149030
Change-Id: I9bb5225109e8a3fb321e6113eb82c4d0c9b6bd1f
---
M i18n/en.json
M modules/ext.CollaborationKit.mixins.less
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/59/318359/1

diff --git a/i18n/en.json b/i18n/en.json
index 15c9af9..758bf87 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -107,13 +107,13 @@
"collaborationkit-purple2": "Purple",
"collaborationkit-purple3": "Mauve",
"collaborationkit-purple4": "Light mauve",
-   "collaborationkit-purple5": "Pink",
+   "collaborationkit-purple5": "Salmon",
"collaborationkit-yellow1": "Orange",
"collaborationkit-yellow2": "Yellow",
"collaborationkit-yellow3": "Gold",
"collaborationkit-yellow4": "Pastel yellow",
-   "collaborationkit-green1": "Bright green",
-   "collaborationkit-green2": "Forest green",
+   "collaborationkit-green1": "Forest green",
+   "collaborationkit-green2": "Bright green",
"collaborationkit-green3": "Khaki",
"collaborationkit-black": "Black"
 }
diff --git a/modules/ext.CollaborationKit.mixins.less 
b/modules/ext.CollaborationKit.mixins.less
index d2a2c6b..13a377e 100644
--- a/modules/ext.CollaborationKit.mixins.less
+++ b/modules/ext.CollaborationKit.mixins.less
@@ -65,11 +65,11 @@
 @grey1: #444;
 @grey2: #ccc;
 @blue1: #3af;
-@blue2: #01e;
+@blue2: #24e;
 @blue3: #abcdef;
 @blue4: #159;
 @blue5: #008;
-@blue6: #4ca;
+@blue6: #4cc;
 @purple1: #b8d;
 @purple2: #628;
 @purple3: #605;

-- 
To view, visit https://gerrit.wikimedia.org/r/318359
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bb5225109e8a3fb321e6113eb82c4d0c9b6bd1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Cleanup invalid hub/list handling

2016-10-20 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316990

Change subject: Cleanup invalid hub/list handling
..

Cleanup invalid hub/list handling

* Made special editor for lists not activate on invalid lists
* Made invalid dump work with invalid json as well as wrong-schema
  json
* Fixed \n in message

Change-Id: I4db57588eefe7e394877a45af5a98562bc09c678
---
M includes/CollaborationListContentEditor.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationListContent.php
3 files changed, 17 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/90/316990/1

diff --git a/includes/CollaborationListContentEditor.php 
b/includes/CollaborationListContentEditor.php
index 51a5ee1..e49dbd9 100644
--- a/includes/CollaborationListContentEditor.php
+++ b/includes/CollaborationListContentEditor.php
@@ -8,7 +8,9 @@
parent::__construct( $page );
// Make human readable the default format for editing, but still
// save as json. Can be overriden by url 
?format=application/json param.
-   $this->contentFormat = 
CollaborationListContentHandler::FORMAT_WIKI;
+   if ( $this->getCurrentContent()->isValid() ) {
+   $this->contentFormat = 
CollaborationListContentHandler::FORMAT_WIKI;
+   }
}
 
protected function showContentForm() {
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 5197af0..e1c6e12 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -121,7 +121,12 @@
if ( $data ) {
if ( !$this->isValid() ) {
$this->displaymode = 'error';
-   $this->errortext = FormatJson::encode( $data, 
true, FormatJson::ALL_OK );
+   if ( !parent::isValid() ) {
+   // It's not even valid json
+   $this->errortext = htmlspecialchars( 
$this->getNativeData() );
+   } else {
+   $this->errortext = FormatJson::encode( 
$data, true, FormatJson::ALL_OK );
+   }
} else {
$this->displayName = isset( $data->display_name 
) ? $data->display_name : '';
$this->introduction = isset( 
$data->introduction ) ? $data->introduction : '';
@@ -224,7 +229,7 @@
// If error, then bypass all this and just show the offending 
JSON
 
if ( $this->displaymode == 'error' ) {
-   $html = '' . wfMessage( 
'collaborationkit-hub-invalid' ) . '\n' . $this->errortext . 
'';
+   $html = '' . wfMessage( 
'collaborationkit-hub-invalid' ) . "\n" . $this->errortext . 
'';
$output->setText( $html );
} else {
// set up hub with theme stuff
diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 438db6c..765c287 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -118,7 +118,12 @@
$data = $this->getData()->value;
if ( !$this->isValid() ) {
$this->displaymode = 'error';
-   $this->errortext = FormatJson::encode( $data, true, 
FormatJson::ALL_OK );
+   if ( !parent::isValid() ) {
+   // It's not even valid json
+   $this->errortext = htmlspecialchars( 
$this->getNativeData() );
+   } else {
+   $this->errortext = FormatJson::encode( $data, 
true, FormatJson::ALL_OK );
+   }
} else {
$this->displaymode = 'normal'; // For now, while this 
field is still optional
$this->description = $data->description;
@@ -195,7 +200,7 @@
// just return the plain JSON.
 
if ( $this->displaymode == 'error' ) {
-   $errorWikitext = '' . wfMessage( 
'collaborationkit-list-invalid' ) . '\n' . $this->errortext . 
'';
+   $errorWikitext = '' . wfMessage( 
'collaborationkit-list-invalid' ) . "\n" . $this->errortext . 
'';
return $errorWikitext;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/316990
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4db57588eefe7e394877a45af5a98562bc09c678
Gerrit-Patch

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Implement multilist support

2016-10-20 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316932

Change subject: Implement multilist support
..

Implement multilist support

Changes schema from top level->items to top level->columns->items, and
implements everything to basically handle that properly.
Columns also have fields for a label and some notes.
Batch editor does some weird -~-~- stuff to handle it.

Not done:
* Actual styles for multilists
* Options for multilist handling
* Interactive editing (all oojs tools currently broken)

bug: T148086
Change-Id: I2ea40c820e4b71588d23b2c9c59481cfd8838cbf
---
M i18n/en.json
M i18n/qqq.json
M includes/CollaborationListContentEditor.php
M includes/content/CollaborationListContent.php
M includes/content/CollaborationListContentHandler.php
M includes/content/CollaborationListContentSchema.php
6 files changed, 265 insertions(+), 160 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/32/316932/1

diff --git a/i18n/en.json b/i18n/en.json
index 2e9f509..be6b948 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -34,7 +34,8 @@
"collaborationkit-createhubfeature-editsummary": "Creating new feature",
"collaborationkit-createhubfeature-freetext": "Generic wiki page",
"collaborationkit-createhubfeature-articlelist": "List of pages",
-   "collaborationkit-list-isempty": "This list has no items in it.",
+   "collaborationkit-list-isempty": "This list has no columns or items.",
+   "collaborationkit-list-emptycolumn": "This list has no items in it.",
"collaborationkit-list-invalid": "This content does not meet the 
requirements of the CollaborationListContent schema. This may happen as a 
result of a software update. The content is reproduced below.",
"collaborationkit-list-notlist": "[[$1]] is not a CollaborationKit list 
page",
"collaborationkit-list-taglist": "'''{{PLURAL:$2|Tagged:|Tags:}}''' $1 
",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 815b4a5..e34739c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -35,6 +35,7 @@
"collaborationkit-createhubfeature-invalidcontenttype": "Error message 
on Special:CreateHubFeature in the unlikely event that an invalid content type 
is specified for a feature",
"collaborationkit-createhubfeature-editsummary": "Edit summary used by 
Special:CreateHubFeature when creating a new feature",
"collaborationkit-list-isempty": "Shown on lists that are empty 
immediately after the description",
+   "collaborationkit-list-emptycolumn": "Shown on lists with empty columns 
in lieu of column content",
"collaborationkit-list-invalid": "Message shown on lists that do not 
comply with the JSON Schema; shown before displaying the offending content",
"collaborationkit-list-notlist": "Error when 
{{#transcludelist:page}} is given a page that is not a 
CollaborationKit list page. $1 Name of page given.",
"collaborationkit-list-taglist": "Box for showing tags a specific item 
has on a list. $1 = comma separated list of tags. $2 = number of tags",
diff --git a/includes/CollaborationListContentEditor.php 
b/includes/CollaborationListContentEditor.php
index 51a5ee1..b078bf5 100644
--- a/includes/CollaborationListContentEditor.php
+++ b/includes/CollaborationListContentEditor.php
@@ -39,7 +39,7 @@
 
$out->addHtml( Html::Hidden( 'wpCollaborationKitOptions', 
$parts[1] ) );
 
-   $this->showTextbox1( null, $parts[2] );
+   $this->showTextbox1( null, trim( $parts[2] ) );
}
 
protected function importContentFormData( &$request ) {
diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 438db6c..cb927af 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -12,7 +12,13 @@
const MAX_LIST_SIZE = 2000; // Maybe should be a config option.
const RANDOM_CACHE_EXPIRY = 28800; // 8 hours
const MAX_TAGS = 50;
+
+   // Splitter for description and options
const HUMAN_DESC_SPLIT = "\n---\n";
+   // Splitter denoting the beginning of a list column
+   const HUMAN_COLUMN_SPLIT = "\n-~-~-\n";
+   // Splitter denoting the beginning og the list itself within the column
+   const HUMAN_COLUMN_SPLIT2 = "\n-\n";
 
/** @var $decoded boolean Have we decoded the data yet */
private $decoded = false;
@@ -20,8 +26,8 @@
protected $description;
/** @var $options StdClass Options for page */
protected $options;
-   /** @var $items Array List of items */
-   protected $items;
+   /** @var $items Array List of columns */
+   protected $columns;
/** @var $displaymode String The variety of list */
protected $di

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Revert "Creating basic editing interface for CollaborationHu...

2016-10-19 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316929

Change subject: Revert "Creating basic editing interface for 
CollaborationHubContent."
..

Revert "Creating basic editing interface for CollaborationHubContent."

This is totally broken and I do not understand why or how. Please resubmit it 
and get bawolff to figure it out.

This reverts commit 7f167255ac8d1960d8612a32d66075d2a5d7a2cc.

Change-Id: I697f02bf4afc9a46ede3dca74afc22c1fc932cff
---
M CollaborationKit.hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
D includes/CollaborationHubContentEditor.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
7 files changed, 25 insertions(+), 447 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/29/316929/1

diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
index fc28f01..e2d439e 100644
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -13,7 +13,7 @@
$title = $sktemplate->getTitle();
$request = $sktemplate->getRequest();
if ( isset( $links['views']['edit'] ) ) {
-   if ( $title->hasContentModel( 
'CollaborationListContent' ) || $title->hasContentModel( 
'CollaborationHubContent' ) ) {
+   if ( $title->hasContentModel( 
'CollaborationListContent' ) ) {
// Edit as JSON
$active = in_array( $request->getVal( 'action' 
), [ 'edit', 'submit' ] )
&& $request->getVal( 'format' ) === 
'application/json';
@@ -29,8 +29,7 @@
// Make it not be selected when editing 
json.
$links['views']['edit']['class'] = 
false;
}
-   }
-   if ( $title->hasContentModel( 'CollaborationHubContent' 
) ) {
+   } elseif ( $title->hasContentModel( 
'CollaborationHubContent' ) ) {
// Add feature
$links['actions']['addnewfeature'] = [
'class' => '',
diff --git a/extension.json b/extension.json
index ebc1cac..335ff7e 100644
--- a/extension.json
+++ b/extension.json
@@ -20,14 +20,13 @@
"CollaborationKitHooks": "CollaborationKit.hooks.php",
"CollaborationHubContent": 
"includes/content/CollaborationHubContent.php",
"CollaborationHubContentHandler": 
"includes/content/CollaborationHubContentHandler.php",
-   "CollaborationHubContentEditor": 
"includes/CollaborationHubContentEditor.php",
"CollaborationHubTOC": 
"includes/content/CollaborationHubTOC.php",
"CollaborationKitIcon": 
"includes/content/CollaborationKitIcon.php",
"CollaborationListContent": 
"includes/content/CollaborationListContent.php",
"CollaborationListContentHandler": 
"includes/content/CollaborationListContentHandler.php",
-   "CollaborationListContentEditor": 
"includes/CollaborationListContentEditor.php",
"SpecialCreateCollaborationHub": 
"includes/SpecialCreateCollaborationHub.php",
"SpecialCreateHubFeature": 
"includes/SpecialCreateHubFeature.php",
+   "CollaborationListContentEditor": 
"includes/CollaborationListContentEditor.php",
"ResourceLoaderListStyleModule": 
"includes/ResourceLoaderListStyleModule.php"
},
"ContentHandlers": {
@@ -64,8 +63,7 @@
"CollaborationListContent::onArticleViewHeader"
],
"CustomEditor": [
-   "CollaborationListContent::onCustomEditor",
-   "CollaborationHubContent::onCustomEditor"
+   "CollaborationListContent::onCustomEditor"
],
"OutputPageBeforeHTML": [
"CollaborationKitHooks::onOutputPageBeforeHTML"
diff --git a/i18n/en.json b/i18n/en.json
index 2e9f509..806b387 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -61,12 +61,6 @@
"collaborationkit-list-newitem-description": "Description (optional)",
"collaborationkit-listedit-description": "Description",
"collaborationkit-listedit-list": "List items",
-   "collaborationkit-hubedit-displayname": "Name to display",
-   "collaborationkit-hubedit-introduction": "Introduction",
-   "collaborationkit-hubedit-footer": "Footer",
-   "collaborationkit-hubedit-image": "Hub image",
-   "collaborationkit-hubedit-colour": "Color",
-   "collaborationkit-hubedit-content": "Features",
"collaborationkit-editjsontab": "Edit as JSON",
"collaborationkit-hub-announ

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Add links/buttons for adding features/managing (editing) pro...

2016-10-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315192

Change subject: Add links/buttons for adding features/managing (editing) project
..

Add links/buttons for adding features/managing (editing) project

Also add some comments, styling, etc.

bug: I can't find a bug for this.
Change-Id: I0511420372a363a6c9e9e6fde2d1b3b2185b2981
---
M CollaborationKit.hooks.php
M i18n/en.json
M i18n/qqq.json
M includes/content/CollaborationHubContent.php
M modules/ext.CollaborationKit.hub.styles.less
M modules/ext.CollaborationKit.mixins.less
6 files changed, 69 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/92/315192/1

diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
index 9191d31..e2d439e 100644
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -4,7 +4,7 @@
 class CollaborationKitHooks {
 
/**
-* Override the Edit tab for for CollaborationHub pages; stolen from 
massmessage
+* Some extra tabs for editing
 * @param &$sktemplate SkinTemplate
 * @param &$links array
 * @return bool
@@ -14,6 +14,7 @@
$request = $sktemplate->getRequest();
if ( isset( $links['views']['edit'] ) ) {
if ( $title->hasContentModel( 
'CollaborationListContent' ) ) {
+   // Edit as JSON
$active = in_array( $request->getVal( 'action' 
), [ 'edit', 'submit' ] )
&& $request->getVal( 'format' ) === 
'application/json';
$links['actions']['editasjson'] = [
@@ -28,11 +29,23 @@
// Make it not be selected when editing 
json.
$links['views']['edit']['class'] = 
false;
}
+   } elseif ( $title->hasContentModel( 
'CollaborationHubContent' ) ) {
+   // Add feature
+   $links['actions']['addnewfeature'] = [
+   'class' => '',
+   'href' => SpecialPage::getTitleFor( 
'CreateHubFeature' )->getFullUrl( [ 'collaborationhub' => $title->getFullText() 
] ),
+   'text' => wfMessage( 
'collaborationkit-hub-addpage' )->text()
+   ];
}
}
return true;
}
 
+   /**
+* TODO DOCUMENT I'M SURE THIS IS IMPORTANT, BUT I HAVE NO IDEA WHY OR 
WHAT FOR
+*
+* @param $parser Parser
+*/
public static function onParserFirstCallInit( $parser ) {
$parser->setFunctionHook( 'transcludelist', 
'CollaborationListContent::transcludeHook' );
// Hack for transclusion.
diff --git a/i18n/en.json b/i18n/en.json
index 4d5d4b6..22e18d9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -75,6 +75,8 @@
"collaborationkit-hub-edit-apierror": "API edit error: $1",
"collaborationkit-hub-edit-tojsonerror": "Error converting to JSON",
"collaborationkit-hub-toc-label": "Project contents",
+   "collaborationkit-hub-addpage": "Add feature",
+   "collaborationkit-hub-manage": "Manage project",
"collaborationkit-subpage-toc-label": "Part of a project:",
"collaborationkit-red1": "Dark red",
"collaborationkit-red2": "Red",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index e641a8a..a83df17 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -75,6 +75,8 @@
"collaborationkit-hub-edit-apierror": "Error message for API edit 
error",
"collaborationkit-hub-edit-tojsonerror": "Error message when something 
went wrong converting to JSON",
"collaborationkit-hub-toc-label": "Label for the toc on a Collaboration 
Hub mainpage",
+   "collaborationkit-hub-addpage": "Label for button/link to add a new 
subpage/feature to a Collaboration Hub",
+   "collaborationkit-hub-manage": "Label for extra button/link to edit 
Collaboration Hub",
"collaborationkit-subpage-toc-label": "Label for the toc on a 
Collaboration Hub subpage",
"collaborationkit-red1": "Color label",
"collaborationkit-red2": "Color label",
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index cbadc7b..91fa4a5 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -258,6 +258,11 @@
[ 'class' => 'wp-footer' ],
$this->getParsedFooter( $title, $options )
);
+   $html .= Html::rawElement(
+   'div',
+   [ 'class' => 'wp-footeractions' ],
+  

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make size of members list entries smaller on hubpage

2016-10-10 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged.

Change subject: Make size of members list entries smaller on hubpage
..


Make size of members list entries smaller on hubpage

Sizes are made smaller for no icon; we need better handling for fine-tuning of
normal icons (on-wiki files).
Also hided the description, as we don't care in the simple memberlist.

Change-Id: Ifba3d431a1123341cb7a10e9599b4bd6e0e90483
---
M modules/ext.CollaborationKit.hub.styles.less
1 file changed, 14 insertions(+), 2 deletions(-)

Approvals:
  Isarra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ext.CollaborationKit.hub.styles.less 
b/modules/ext.CollaborationKit.hub.styles.less
index 45b6240..710c9f9 100644
--- a/modules/ext.CollaborationKit.hub.styles.less
+++ b/modules/ext.CollaborationKit.hub.styles.less
@@ -87,7 +87,7 @@
border-radius: 3px;
}
 }
-.wp-members {
+.mw-body .wp-members {
.grey-box();
 
float: right;
@@ -97,10 +97,22 @@
width: 25%;
 
h3 {
-   margin: 0 0 .75em;
+   margin: 0;
+   margin-bottom: .5em;
padding: 0;
text-align: center;
}
+   .mw-collabkit-list-img,
+   .mw-collabkit-list-noimageplaceholder {
+   height: 32px;
+   width: 32px;
+   }
+   .mw-collabkit-list-container {
+   height: 32px;
+   }
+   .mw-collabkit-list-notes {
+   display: none;
+   }
 }
 .wp-members-buttons {
margin-top: 1em;

-- 
To view, visit https://gerrit.wikimedia.org/r/315155
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifba3d431a1123341cb7a10e9599b4bd6e0e90483
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make uls not overlap images on hubs

2016-10-10 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged.

Change subject: Make uls not overlap images on hubs
..


Make uls not overlap images on hubs

Change-Id: Icae95d4e6a3495d832a9b4f6c36d732cfe542e29
---
M modules/ext.CollaborationKit.hub.styles.less
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Isarra: Verified; Looks good to me, approved



diff --git a/modules/ext.CollaborationKit.hub.styles.less 
b/modules/ext.CollaborationKit.hub.styles.less
index 710c9f9..fae44f3 100644
--- a/modules/ext.CollaborationKit.hub.styles.less
+++ b/modules/ext.CollaborationKit.hub.styles.less
@@ -72,6 +72,9 @@
}
}
 }
+.wp-collaborationhub ul {
+   display: inline-block;
+}
 
 .wp-header-image {
float: left;

-- 
To view, visit https://gerrit.wikimedia.org/r/315169
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icae95d4e6a3495d832a9b4f6c36d732cfe542e29
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make uls not overlap images on hubs

2016-10-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315169

Change subject: Make uls not overlap images on hubs
..

Make uls not overlap images on hubs

Change-Id: Icae95d4e6a3495d832a9b4f6c36d732cfe542e29
---
M modules/ext.CollaborationKit.hub.styles.less
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/69/315169/1

diff --git a/modules/ext.CollaborationKit.hub.styles.less 
b/modules/ext.CollaborationKit.hub.styles.less
index 710c9f9..fae44f3 100644
--- a/modules/ext.CollaborationKit.hub.styles.less
+++ b/modules/ext.CollaborationKit.hub.styles.less
@@ -72,6 +72,9 @@
}
}
 }
+.wp-collaborationhub ul {
+   display: inline-block;
+}
 
 .wp-header-image {
float: left;

-- 
To view, visit https://gerrit.wikimedia.org/r/315169
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icae95d4e6a3495d832a9b4f6c36d732cfe542e29
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make size of members list entries smaller on hubpage

2016-10-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315155

Change subject: Make size of members list entries smaller on hubpage
..

Make size of members list entries smaller on hubpage

Sizes are made smaller for no icon; we need better handling for fine-tuning of
normal icons (on-wiki files).
Also hided the description, as we don't care in the simple memberlist.

Change-Id: Ifba3d431a1123341cb7a10e9599b4bd6e0e90483
---
M modules/ext.CollaborationKit.hub.styles.less
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/55/315155/1

diff --git a/modules/ext.CollaborationKit.hub.styles.less 
b/modules/ext.CollaborationKit.hub.styles.less
index 45b6240..710c9f9 100644
--- a/modules/ext.CollaborationKit.hub.styles.less
+++ b/modules/ext.CollaborationKit.hub.styles.less
@@ -87,7 +87,7 @@
border-radius: 3px;
}
 }
-.wp-members {
+.mw-body .wp-members {
.grey-box();
 
float: right;
@@ -97,10 +97,22 @@
width: 25%;
 
h3 {
-   margin: 0 0 .75em;
+   margin: 0;
+   margin-bottom: .5em;
padding: 0;
text-align: center;
}
+   .mw-collabkit-list-img,
+   .mw-collabkit-list-noimageplaceholder {
+   height: 32px;
+   width: 32px;
+   }
+   .mw-collabkit-list-container {
+   height: 32px;
+   }
+   .mw-collabkit-list-notes {
+   display: none;
+   }
 }
 .wp-members-buttons {
margin-top: 1em;

-- 
To view, visit https://gerrit.wikimedia.org/r/315155
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifba3d431a1123341cb7a10e9599b4bd6e0e90483
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Clean up style, and some style bugs

2016-10-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315147

Change subject: Clean up style, and some style bugs
..

Clean up style, and some style bugs

More coding style and some random css, redid subpage toc structure to be
distinct from mainpage everything structure

Change-Id: Ib0fcd9803011494edf782fc6d8aa0125ebfe2c8d
---
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentSchema.php
M includes/content/CollaborationHubTOC.php
M includes/content/CollaborationListContentSchema.php
M modules/ext.CollaborationKit.hub.styles.less
M modules/ext.CollaborationKit.hub.subpage.styles.less
M modules/ext.CollaborationKit.mixins.less
7 files changed, 84 insertions(+), 98 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/47/315147/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index f85d132..cbadc7b 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -327,7 +327,7 @@
// rawElement is used because we don't want [edit] 
links or usual header behavior
$membersHeader = Html::rawElement(
'h3',
-   [ 'style' => 'text-align: center; 
padding-bottom: 1em;' ],
+   [],
wfMessage( 
'collaborationkit-hub-members-header' )
);
 
diff --git a/includes/content/CollaborationHubContentSchema.php 
b/includes/content/CollaborationHubContentSchema.php
index 1509e4c..ee959c4 100644
--- a/includes/content/CollaborationHubContentSchema.php
+++ b/includes/content/CollaborationHubContentSchema.php
@@ -61,74 +61,50 @@
],
] ],
],
-   'scope' =>
-   [
+   'scope' => [
'type' => 'object',
-   'properties' =>
-   [
-   'included_categories' =>
-   [
+   'properties' => [
+   'included_categories' => [
'type' => 'array',
-   'items' =>
-   [
-   [
-   'type' => 'object',
-   'properties' =>
-   [
-   'category_name' 
=>
-   [
-   'type' 
=> 'string'
-   ],
-   
'category_depth' =>
-   [
-   'type' 
=> 'number',
-   
'default' => 9
-   ]
+   'items' => [ [
+   'type' => 'object',
+   'properties' => [
+   'category_name' => [
+   'type' => 
'string'
+   ],
+   'category_depth' => [
+   'type' => 
'number',
+   'default' => 9
]
]
-   ]
+   ] ]
],
-   'excluded_categories' =>
-   [
+   'excluded_categories' => [
'type' => 'array',
-   'items' =>
-   [
-   [
-   'type' => 'object',
-   'properties' =>
-   [
-   'category_

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fix coding style, remove some outdated comments, extra var_dumb

2016-10-10 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315117

Change subject: Fix coding style, remove some outdated comments, extra var_dumb
..

Fix coding style, remove some outdated comments, extra var_dumb

Change-Id: Ia2a94ca954080721dcc5b7b7dec902bb3a672cb0
---
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentSchema.php
M includes/content/CollaborationListContent.php
3 files changed, 51 insertions(+), 67 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/17/315117/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 62c359d..f85d132 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -220,7 +220,6 @@
$html .= Html::rawElement(
'div',
[ 'class' => 'wp-header-image' ],
-   // TODO move all image stuff to ToC class (what is that 
class even going to be, anyway?)
$this->getParsedImage( $this->getImage(), 200 )
);
// get members list
@@ -316,31 +315,31 @@
if ( $membersTitle->exists() ) {
$membersContent = Revision::newFromTitle( $membersTitle 
)->getContent();
$wikitext = $membersContent->convertToWikitext(
-   $lang,
-   [
-   'includeDesc' 
=> false,
-   'maxItems' => 3,
-   'defaultSort' 
=> 'random'
-   ]
-   );
+   $lang,
+   [
+   'includeDesc' => false,
+   'maxItems' => 3,
+   'defaultSort' => 'random'
+   ]
+   );
$membersListHtml = $wgParser->parse( $wikitext, 
$membersTitle, $options )->getText();
 
// rawElement is used because we don't want [edit] 
links or usual header behavior
$membersHeader = Html::rawElement(
-   
'h3',
-   
[ 'style' => 'text-align: center; padding-bottom: 1em;' ],
-   
wfMessage( 'collaborationkit-hub-members-header' )
-   );
+   'h3',
+   [ 'style' => 'text-align: center; 
padding-bottom: 1em;' ],
+   wfMessage( 
'collaborationkit-hub-members-header' )
+   );
 
$membersViewButton = new OOUI\ButtonWidget( [
-   
'label' => wfMessage( 'collaborationkit-hub-members-view' 
)->inContentLanguage()->text(),
-   
'href' => $membersTitle->getLinkURL()
-   ] );
+   'label' => wfMessage( 
'collaborationkit-hub-members-view' )->inContentLanguage()->text(),
+   'href' => $membersTitle->getLinkURL()
+   ] );
$membersJoinButton = new OOUI\ButtonWidget( [
-   
'label' => wfMessage( 'collaborationkit-hub-members-signup' 
)->inContentLanguage()->text(),
-   
'href' => $membersTitle->getEditURL(), // Going through editor is non-JS 
fallback
-   
'flags' => [ 'primary', 'progressive' ]
-   ] );
+   'label' => wfMessage( 
'collaborationkit-hub-members-signup' )->inContentLanguage()->text(),
+   'href' => $membersTitle->getEditURL(), // Going 
through editor is non-JS fallback
+   'flags' => [ 'primary', 'progressive' ]
+   ] );
 
OutputPage::setupOOUI();
$text

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Consistentify format of @param comments

2016-09-29 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/313457

Change subject: Consistentify format of @param comments
..

Consistentify format of @param comments

Some were of format @param Title $title. Now they're all of format
@param $title Title.

Change-Id: I712972f1bd7cf095d73c3b306e8aeaff006c21a2
---
M includes/CollaborationKit.php
M includes/SpecialCreateCollaborationHub.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationHubDiffEngine.php
M includes/content/CollaborationHubTOC.php
M includes/content/CollaborationKitIcon.php
M includes/content/CollaborationListContent.php
M includes/content/CollaborationListContentHandler.php
9 files changed, 75 insertions(+), 71 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/57/313457/1

diff --git a/includes/CollaborationKit.php b/includes/CollaborationKit.php
index 623d3dc..aaa7662 100644
--- a/includes/CollaborationKit.php
+++ b/includes/CollaborationKit.php
@@ -5,8 +5,8 @@
 
/**
 * Override the Edit tab for for CollaborationHub pages; stolen from 
massmessage
-* @param SkinTemplate &$sktemplate
-* @param array &$links
+* @param &$sktemplate SkinTemplate
+* @param &$links array
 * @return bool
 */
public static function onSkinTemplateNavigation( &$sktemplate, &$links 
) {
@@ -43,8 +43,8 @@
 * Declares JSON as the code editor language for CollaborationKit pages.
 *
 * This hook only runs if the CodeEditor extension is enabled.
-* @param Title $title
-* @param string &$lang Page language.
+* @param $title Title
+* @param &$lang string Page language.
 * @return bool
 */
public static function onCodeEditorGetPageLanguage( $title, &$lang ) {
diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index db7307c..e073ebf 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -14,7 +14,7 @@
}
 
/**
-* @param string $par
+* @param $par string
 */
public function execute( $par ) {
parent::execute( $par );
@@ -89,7 +89,7 @@
 
/**
 * Build and return the aossociative array for the content source field.
-* @param array $mapping
+* @param $mapping array
 * @return array
 */
protected function getOptions( $mapping ) {
@@ -101,7 +101,7 @@
}
 
/**
-* @param array $data
+* @param $data array
 * @return Status
 */
public function onSubmit( array $data ) {
@@ -217,7 +217,7 @@
 
/**
 * Set the form format to ooui for consistency with the rest of the ck 
stuff
-* @param HTMLForm $form
+* @param $form HTMLForm
 *
 */
protected function getDisplayFormat() {
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 805f0e6..d39a11f 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -228,11 +228,11 @@
 
/**
 * Fill $output with information derived from the content.
-* @param Title $title
-* @param int $revId
-* @param ParserOptions $options
-* @param bool $generateHtml
-* @param ParserOutput $output
+* @param $title Title
+* @param $revId int
+* @param $options ParserOptions
+* @param $generateHtml bool
+* @param $output ParserOutput
 */
protected function fillParserOutput( Title $title, $revId, 
ParserOptions $options,
$generateHtml, ParserOutput &$output
@@ -325,8 +325,8 @@
 
/**
 * Helper function for fillParserOutput
-* @param Title $title
-* @param ParserOptions $options
+* @param $title Title
+* @param $options ParserOptions
 * @return string
 */
protected function getMembersBlock( Title $title, ParserOptions 
$options ) {
@@ -384,8 +384,8 @@
 
/**
 * Helper function for fillParserOutput
-* @param Title $title
-* @param ParserOptions $options
+* @param $title Title
+* @param $options ParserOptions
 * @return string
 */
protected function getParsedIntroduction( Title $title, ParserOptions 
$options ) {
@@ -397,8 +397,8 @@
 
/**
 * Helper function for fillParserOutput
-* @param Title $title
-* @param ParserOptions $options
+* @param $title Title
+* @param $options ParserOptions
 * @return string
 */
protected function ge

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Add names for theme colours, and use dropdown for theme colo...

2016-09-28 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/313307

Change subject: Add names for theme colours, and use dropdown for theme colours 
on specialcreatecollaborationhub fallback (currently only interface, but we'll 
be adding a fancier js colour selection thing later)
..

Add names for theme colours, and use dropdown for theme colours
on specialcreatecollaborationhub fallback (currently only interface,
but we'll be adding a fancier js colour selection thing later)

Instead of a protected variable $themeColours, CollaborationHubContent
now has a static function getThemeColours().

Change-Id: I65086dc57e2941a0531222520cbff25d2ac765c1
---
M i18n/en.json
M i18n/qqq.json
M includes/SpecialCreateCollaborationHub.php
M includes/content/CollaborationHubContent.php
4 files changed, 90 insertions(+), 35 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/07/313307/1

diff --git a/i18n/en.json b/i18n/en.json
index a601db3..ae14ca9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -69,5 +69,28 @@
"collaborationkit-hub-subpage-remove": "Remove feature",
"collaborationkit-hub-edit-apierror": "API edit error: $1",
"collaborationkit-hub-edit-tojsonerror": "Error converting to JSON",
-   "collaborationkit-hub-toc-label": "Project contents"
+   "collaborationkit-hub-toc-label": "Project contents",
+   "collaborationkit-red1": "Dark red",
+   "collaborationkit-red2": "Red",
+   "collaborationkit-grey1": "Dark grey",
+   "collaborationkit-grey2": "Light grey",
+   "collaborationkit-blue1": "Sky blue",
+   "collaborationkit-blue2": "Blue",
+   "collaborationkit-blue3": "Blue grey",
+   "collaborationkit-blue4": "Navy blue",
+   "collaborationkit-blue5": "Dark blue",
+   "collaborationkit-blue6": "Aquamarine",
+   "collaborationkit-purple1": "Violet",
+   "collaborationkit-purple2": "Purple",
+   "collaborationkit-purple3": "Mauve",
+   "collaborationkit-purple4": "Light mauve",
+   "collaborationkit-purple5": "Pink",
+   "collaborationkit-yellow1": "Orange",
+   "collaborationkit-yellow2": "Yellow",
+   "collaborationkit-yellow3": "Gold",
+   "collaborationkit-yellow4": "Pastel yellow",
+   "collaborationkit-green1": "Bright green",
+   "collaborationkit-green2": "Forest green",
+   "collaborationkit-green3": "Khaki",
+   "collaborationkit-black": "Black"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 8fbd18f..937c96b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -69,5 +69,28 @@
"collaborationkit-hub-subpage-remove": "Remove link label for subpages 
on Collaboration Hub mainpages",
"collaborationkit-hub-edit-apierror": "Error message for API edit 
error",
"collaborationkit-hub-edit-tojsonerror": "Error message when something 
went wrong converting to JSON",
-   "collaborationkit-hub-toc-label": "Label for the toc on a Collaboration 
Hub mainpage"
+   "collaborationkit-hub-toc-label": "Label for the toc on a Collaboration 
Hub mainpage",
+   "collaborationkit-red1": "Color label",
+   "collaborationkit-red2": "Color label",
+   "collaborationkit-grey1": "Color label",
+   "collaborationkit-grey2": "Color label",
+   "collaborationkit-blue1": "Color label",
+   "collaborationkit-blue2": "Color label",
+   "collaborationkit-blue3": "Color label",
+   "collaborationkit-blue4": "Color label",
+   "collaborationkit-blue5": "Color label",
+   "collaborationkit-blue6": "Color label",
+   "collaborationkit-purple1": "Color label",
+   "collaborationkit-purple2": "Color label",
+   "collaborationkit-purple3": "Color label",
+   "collaborationkit-purple4": "Color label",
+   "collaborationkit-purple5": "Color label",
+   "collaborationkit-yellow1": "Color label",
+   "collaborationkit-yellow2": "Color label",
+   "collaborationkit-yellow3": "Color label",
+   "collaborationkit-yellow4": "Color label",
+   "collaborationkit-green1": "Color label",
+   "collaborationkit-green2": "Color label",
+   "collaborationkit-green3": "Color label",
+   "collaborationkit-black": "Color label"
 }
diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index 8c50214..db7307c 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -44,12 +44,18 @@
'cssclass' => 'mw-ck-iconinput',
'label-message' => 
'collaborationkit-createhub-image',
],
-   // Colours for the hub styles
-   'colour' => [
-   'type' => 'text',
-   'cssclass' => 'mw-ck-colourinput',
-

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Add AllowedNamespaces configuration variables for hubs and l...

2016-09-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/313182

Change subject: Add AllowedNamespaces configuration variables for hubs and lists
..

Add AllowedNamespaces configuration variables for hubs and lists

Users* may want to change the namespaces in which hubs/lists are
allowed in order to fullfill unexpected use cases. We don't care;
we'll just leave it an option.

Separate variables are used for hubs and lists as uses may vary for
each.

Hubs now also specifically check if subpages are allowed for the
namespace in case a user misconfigures their wiki.

Allowed namespaces are set to user (2) and project (4) by default.
Unless that's the other way around. I've forgotten already, but it's
those two.

* All mentions of 'users' here refers to sysadmins with localsettings
access, not onwiki users.

This is a follow-up on initial implementation for T141004.

Change-Id: If70bff87c8324f425d32511d94beaac17017cf41
---
M extension.json
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationListContentHandler.php
3 files changed, 19 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/82/313182/1

diff --git a/extension.json b/extension.json
index dbdfeb3..8637e25 100644
--- a/extension.json
+++ b/extension.json
@@ -33,6 +33,16 @@
"CollaborationHubContent": "CollaborationHubContentHandler",
"CollaborationListContent": "CollaborationListContentHandler"
},
+   "config": {
+   "CollaborationHubAllowedNamespaces": [
+   2,
+   4
+   ],
+   "CollaborationListAllowedNamespaces": [
+   2,
+   4
+   ]
+   },
"SpecialPages": {
"CreateCollaborationHub": "SpecialCreateCollaborationHub",
"CreateHubFeature": "SpecialCreateHubFeature"
diff --git a/includes/content/CollaborationHubContentHandler.php 
b/includes/content/CollaborationHubContentHandler.php
index d6a8e0e..11e8969 100644
--- a/includes/content/CollaborationHubContentHandler.php
+++ b/includes/content/CollaborationHubContentHandler.php
@@ -7,7 +7,12 @@
}
 
public function canBeUsedOn( Title $title ) {
-   if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( 
NS_USER ) ) {
+   global $wgCollaborationHubAllowedNamespaces;
+
+   $namespace = $title->getNamespace();
+   if ( in_array( $namespace, $wgCollaborationHubAllowedNamespaces 
)
+   && MWNamespace::hasSubpages( $namespace ) ) {
+
return true;
}
return false;
diff --git a/includes/content/CollaborationListContentHandler.php 
b/includes/content/CollaborationListContentHandler.php
index b10da7c..2fcb69a 100644
--- a/includes/content/CollaborationListContentHandler.php
+++ b/includes/content/CollaborationListContentHandler.php
@@ -20,7 +20,9 @@
}
 
public function canBeUsedOn( Title $title ) {
-   if ( $title->inNamespace( NS_PROJECT ) || $title->inNamespace( 
NS_USER ) ) {
+   global $wgCollaborationListAllowedNamespaces;
+
+   if ( in_array( $title->getNamespace(), 
$wgCollaborationListAllowedNamespaces ) ) {
return true;
}
return false;

-- 
To view, visit https://gerrit.wikimedia.org/r/313182
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If70bff87c8324f425d32511d94beaac17017cf41
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Add alias for Special:CreateHubFeature

2016-09-27 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/313167

Change subject: Add alias for Special:CreateHubFeature
..

Add alias for Special:CreateHubFeature

Change-Id: I5ad3632962da3c4a9a9a4118f53a28758211ab32
---
M CollaborationKit.alias.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/67/313167/1

diff --git a/CollaborationKit.alias.php b/CollaborationKit.alias.php
index 052c9ba..51e9f23 100644
--- a/CollaborationKit.alias.php
+++ b/CollaborationKit.alias.php
@@ -9,5 +9,6 @@
 
 /** English (English) */
 $specialPageAliases['en'] = [
-   'CreateCollaborationHub' => [ 'CreateCollaborationHub' ]
+   'CreateCollaborationHub' => [ 'CreateCollaborationHub' ],
+   'CreateHubFeature' => [ 'CreateHubFeature' ]
 ];

-- 
To view, visit https://gerrit.wikimedia.org/r/313167
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ad3632962da3c4a9a9a4118f53a28758211ab32
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: I don't actually remember what all I was doing.

2016-09-19 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311603

Change subject: I don't actually remember what all I was doing.
..

I don't actually remember what all I was doing.

Made a ToC class; partially implemented.
Made an icon class, partially used.

bug: T140170
Change-Id: I3126a963c603c2bd4ca38b0552eb52e14697eaa2
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/content/CollaborationHubContent.php
A includes/content/CollaborationHubTOC.php
A includes/content/CollaborationKitIcon.php
M modules/ext.CollaborationKit.hub.styles.less
7 files changed, 409 insertions(+), 152 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/03/311603/1

diff --git a/extension.json b/extension.json
index 2fd2145..21a2faa 100644
--- a/extension.json
+++ b/extension.json
@@ -20,6 +20,8 @@
"CollaborationKitHooks": "includes/CollaborationKit.php",
"CollaborationHubContent": 
"includes/content/CollaborationHubContent.php",
"CollaborationHubContentHandler": 
"includes/content/CollaborationHubContentHandler.php",
+   "CollaborationHubTOC": 
"includes/content/CollaborationHubTOC.php",
+   "CollaborationKitIcon": 
"includes/content/CollaborationKitIcon.php",
"CollaborationListContent": 
"includes/content/CollaborationListContent.php",
"CollaborationListContentHandler": 
"includes/content/CollaborationListContentHandler.php",
"SpecialCreateCollaborationHub": 
"includes/SpecialCreateCollaborationHub.php",
diff --git a/i18n/en.json b/i18n/en.json
index f7501e5..8f9951b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -49,5 +49,6 @@
"collaborationkit-hub-subpage-view": "View",
"collaborationkit-hub-subpage-remove": "Remove feature",
"collaborationkit-hub-edit-apierror": "API edit error: $1",
-   "collaborationkit-hub-edit-tojsonerror": "Error converting to JSON"
+   "collaborationkit-hub-edit-tojsonerror": "Error converting to JSON",
+   "collaborationkit-hub-toc-label": "Project contents"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3d02923..a830742 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -49,5 +49,6 @@
"collaborationkit-hub-subpage-view": "View link label for subpages on 
Collaboration Hub mainpages",
"collaborationkit-hub-subpage-remove": "Remove link label for subpages 
on Collaboration Hub mainpages",
"collaborationkit-hub-edit-apierror": "Error message for API edit 
error",
-   "collaborationkit-hub-edit-tojsonerror": "Error message when something 
went wrong converting to JSON"
+   "collaborationkit-hub-edit-tojsonerror": "Error message when something 
went wrong converting to JSON",
+   "collaborationkit-hub-toc-label": "Label for the toc on a Collaboration 
Hub mainpage"
 }
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index f72f9e2..a28c41a 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -252,7 +252,7 @@
'div',
[ 'class' => 'wp-header-image' ],
// TODO move all image stuff to ToC class (what is that 
class even going to be, anyway?)
-   $this->getParsedImage( $this->getImage(), 200 )
+   $this->getParsedImage( $title, $this->getImage(), 200 )
);
// get members list
$html .= Html::rawElement(
@@ -270,7 +270,7 @@
$html .= Html::rawElement(
'div',
[ 'class' => 'wp-toc' ],
-   $this->getTableofContents( $title, $options )
+   $this->getTableOfContents( $title, $options )
);
// get transcluded content
$html .= Html::rawElement(
@@ -443,7 +443,7 @@
$text = Html::rawElement(
'div',
[ 'class' => 'wp-header-image' 
],
-   $spContent->getParsedImage( 
$spContent->getImage(), 100 )
+   $spContent->getParsedImage( 
$spTitle, $spContent->getImage(), 100 )
);
$text .= 
$spContent->getParsedIntroduction( $spTitle, $options );
} elseif ( $spContentModel == 
'CollaborationListContent' ) {
@@ -636,98 +636,10 @@
 * @param ParserOptions $options
 * @return string
 */
-   protected function getTableofContents( Title $title, ParserOptions 
$options ) {
-   // This is going to be mov

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Start CH thing for noincludes/includeonlies for wikitext sub...

2016-09-08 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309391

Change subject: Start CH thing for noincludes/includeonlies for wikitext 
subpages
..

Start CH thing for noincludes/includeonlies for wikitext subpages

...

bug: T144530
Change-Id: Icab17860ef74168a09ea5072b714f13e3421d2e3
---
M includes/content/CollaborationHubContent.php
1 file changed, 12 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/91/309391/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 7e7016f..0f8487f 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -416,6 +416,11 @@
protected function getParsedContent( Title $title, ParserOptions 
$options, ParserOutput &$output ) {
global $wgParser;
 
+   $lang = $options->getTargetLanguage();
+   if ( !$lang ) {
+   $lang = $title->getPageLanguage();
+   }
+
$html = '';
 
foreach ( $this->getContent() as $item ) {
@@ -442,10 +447,6 @@
);
$text .= 
$spContent->getParsedIntroduction( $spTitle, $options );
} elseif ( $spContentModel == 
'CollaborationListContent' ) {
-   $lang = $options->getTargetLanguage();
-   if ( !$lang ) {
-   $lang = 
$title->getPageLanguage();
-   }
// convert to wikitext with maxItems 
limit in place
$wikitext = 
$spContent->convertToWikitext(
$lang,
@@ -457,11 +458,14 @@
]
);
$text = $wgParser->parse( $wikitext, 
$spTitle, $options )->getText();
+   } elseif ( $spContentModel == 'wikitext' ) {
+   // to grab first section only
+   $spContent = $spContent->getSection( 0 
);
+
+   // Do template preproccessing magic
+   // ... parse, get text into $text
+   $text = '...';
} else {
-   if ( $spContentModel == 'wikitext' ) {
-   // to grab first section only
-   $spContent = 
$spContent->getSection( 0 );
-   }
// Parse whatever (else) as whatever
$contentOutput = 
$spContent->getParserOutput( $spTitle, $spRev, $options );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/309391
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icab17860ef74168a09ea5072b714f13e3421d2e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make collaborationhub page image 200px wide instead of 150

2016-09-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309177

Change subject: Make collaborationhub page image 200px wide instead of 150
..

Make collaborationhub page image 200px wide instead of 150

Bigger is better.

bug: T141583
Change-Id: I9da1650fec7ef1a8e129a6c797b20f9c2278e534
---
M includes/content/CollaborationHubContent.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/77/309177/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 300b071..e6c1a44 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -252,7 +252,7 @@
'div',
[ 'class' => 'wp-header-image' ],
// TODO move all image stuff to ToC class (what is that 
class even going to be, anyway?)
-   $this->getParsedImage( $this->getImage(), 150 )
+   $this->getParsedImage( $this->getImage(), 200 )
);
// get members list
$html .= Html::rawElement(
@@ -596,7 +596,7 @@
 * @param $link string html of the link itself
 * @return string html
 */
-   protected function makeEditSectionLink( $link ) {
+   protected function makeEditSectionLink( string $link ) {
$html = Html::rawElement(
'span',
[ 'class' => 'mw-editsection' ],
@@ -639,7 +639,7 @@
 * @param string $icon data: either an icon id or anything to use as a 
seed
 * @return string
 */
-   protected function makeIcon( $icon ) {
+   protected function makeIcon( string $icon ) {
// Keep this synced with the icons listed in the module in 
extension.json
$iconsPreset = [
// Randomly selectable items

-- 
To view, visit https://gerrit.wikimedia.org/r/309177
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9da1650fec7ef1a8e129a6c797b20f9c2278e534
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make theme colours better for various displays

2016-09-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309171

Change subject: Make theme colours better for various displays
..

Make theme colours better for various displays

Theme colours should no longer be offensively bright on improperly calibrated
displays, ridiculously dark on the vast majority of displays, and generally
just not very good.

I may have accidentally rearranged them, too, but since nothing's really using
any of them anyway nobody cares.

bug: T141585
Change-Id: I5eab08c2df87d98be02bb4a243497f14f8878214
---
M extension.json
M modules/ext.CollaborationKit.mixins.less
2 files changed, 54 insertions(+), 54 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/71/309171/1

diff --git a/extension.json b/extension.json
index 5221ba6..2fd2145 100644
--- a/extension.json
+++ b/extension.json
@@ -97,27 +97,27 @@
"class": "ResourceLoaderListStyleModule",
"variants": {
"red1": { "color": "#700", "global": true },
-   "red2": { "color": "#d00", "global": true },
+   "red2": { "color": "#b11", "global": true },
"grey1": { "color": "#444", "global": true },
"grey2": { "color": "#ccc", "global": true },
-   "blue1": { "color": "#4dc", "global": true },
-   "blue2": { "color": "#07d", "global": true },
+   "blue1": { "color": "#3af", "global": true },
+   "blue2": { "color": "#01e", "global": true },
"blue3": { "color": "#abcdef", "global": true },
-   "blue4": { "color": "#00f", "global": true },
-   "blue5": { "color": "#036", "global": true },
-   "blue6": { "color": "#008", "global": true },
-   "purple1": { "color": "#908", "global": true },
-   "purple2": { "color": "#b79", "global": true },
-   "purple3": { "color": "#60a", "global": true },
-   "purple4": { "color": "#c3f", "global": true },
-   "purple5": { "color": "#f99", "global": true },
-   "yellow1": { "color": "#ff3", "global": true },
-   "yellow2": { "color": "#fc0", "global": true },
-   "yellow3": { "color": "#e61", "global": true },
-   "yellow4": { "color": "#860", "global": true },
-   "green1": { "color": "#0b3", "global": true },
-   "green2": { "color": "#7f0", "global": true },
-   "green3": { "color": "#462", "global": true }
+   "blue4": { "color": "#159", "global": true },
+   "blue5": { "color": "#008", "global": true },
+   "blue6": { "color": "#4ca", "global": true },
+   "purple1": { "color": "#b8d", "global": true },
+   "purple2": { "color": "#628", "global": true },
+   "purple3": { "color": "#605", "global": true },
+   "purple4": { "color": "#936", "global": true },
+   "purple5": { "color": "#faa", "global": true },
+   "yellow1": { "color": "#d52", "global": true },
+   "yellow2": { "color": "#fc3", "global": true },
+   "yellow3": { "color": "#b91", "global": true },
+   "yellow4": { "color": "#ffb", "global": true },
+   "green1": { "color": "#051", "global": true },
+   "green2": { "color": "#af5", "global": true },
+   "green3": { "color": "#663", "global": true }
},
"images": {
"square": "images/blot.svg"
@@ -129,27 +129,27 @@
"class": "ResourceLoaderImageModule",
"variants": {
"red1": { "color": "#700", "global": true },
-   "red2": { "color": "#d00", "global": true },
+   "red2": { "color": "#b11", "global": true },
"grey1": { "color": "#444", "global": true },
"grey2": { "color": "#ccc", "global": true },
-   "blue1": { "color": "#4dc", "global": true },
-   "blue

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Make CollaborationHubs only display a subset of the content ...

2016-09-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309067

Change subject: Make CollaborationHubs only display a subset of the content of 
subpages
..

Make CollaborationHubs only display a subset of the content of subpages

* Wikitext etc displays the first section
* CollaborationLists display the description and a subset of items
* CollaborationHubs display the introduction block

bug: T144529
Change-Id: I3a143073582cc58223324150473842c3af4c6560
---
M includes/content/CollaborationHubContent.php
1 file changed, 44 insertions(+), 17 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/67/309067/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 5d88177..c701925 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -247,19 +247,6 @@
'div',
[ 'class' => $this->getHubClasses() ]
);
-   // get page image
-   $html .= Html::rawElement(
-   'div',
-   [ 'class' => 'wp-header-image' ],
-   // TODO move all image stuff to ToC class (what is that 
class even going to be, anyway?)
-   $this->getParsedImage( $this->getImage(), 150 )
-   );
-   // get members list
-   $html .= Html::rawElement(
-   'div',
-   [ 'class' => 'wp-members' ],
-   $this->getMembersBlock( $title, $options )
-   );
// get parsed intro
$html .= Html::rawElement(
'div',
@@ -388,9 +375,24 @@
 */
protected function getParsedIntroduction( Title $title, ParserOptions 
$options ) {
global $wgParser;
+
+   // get page image
+   $html = Html::rawElement(
+   'div',
+   [ 'class' => 'wp-header-image' ],
+   // TODO move all image stuff to ToC class (what is that 
class even going to be, anyway?)
+   $this->getParsedImage( $this->getImage(), 150 )
+   );
+   // get members list
+   $html .= Html::rawElement(
+   'div',
+   [ 'class' => 'wp-members' ],
+   $this->getMembersBlock( $title, $options )
+   );
+
$tempOutput = $wgParser->parse( $this->getIntroduction(), 
$title, $options );
 
-   return $tempOutput->getText();
+   return $html . $tempOutput->getText();
}
 
/**
@@ -433,10 +435,35 @@
$spContent = $spRev->getContent();
$spContentModel = $spRev->getContentModel();
 
-   // TODO: needed options: remove section 
markers, first section etc for wikitext; add all this later
-   $contentOutput = $spContent->getParserOutput( 
$spTitle, $spRev, $options );
+   switch ( $spContentModel ) {
+   case 'CollaborationList':
+   $lang = 
$options->getTargetLanguage();
+   if ( !$lang ) {
+   $lang = 
$title->getPageLanguage();
+   }
+   // convert to wikitext with 
maxItems limit in place
+   $spContent = 
$spContent->convertToWikitext(
+   $lang,
+   [
+   'includeDesc' 
=> false,
+   'maxItems' => 1,
+   'defaultSort' 
=> 'natural'
+   ]
+   );
+   case 'CollaborationHub':
+   // get intro
+   $text = 
$spContent->getParsedIntroduction( $spTitle, $options );
+   break;
+   case 'wikitext':
+   // to grab first section only
+   $spContent = 
$spContent->getSection( 0 );
+   default:
+

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Fix SpeciaCreateCollaborationHub so it actually works (wrong...

2016-09-01 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/308080

Change subject: Fix SpeciaCreateCollaborationHub so it actually works (wrong 
content content for update content model)
..

Fix SpeciaCreateCollaborationHub so it actually works (wrong content content
for update content model)

Should be an empty array always on create. Nothing else at present.

Change-Id: I0507e85494b4f4bb63371e5845628ba9ce19e269
---
M i18n/en.json
M includes/SpecialCreateCollaborationHub.php
M includes/content/CollaborationHubContentHandler.php
3 files changed, 7 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/80/308080/1

diff --git a/i18n/en.json b/i18n/en.json
index 6c5f5b8..f7501e5 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -48,6 +48,6 @@
"collaborationkit-hub-missingpage-create": "Create feature",
"collaborationkit-hub-subpage-view": "View",
"collaborationkit-hub-subpage-remove": "Remove feature",
-   "collaborationkit-hub-edit-apierror": "API edit error",
+   "collaborationkit-hub-edit-apierror": "API edit error: $1",
"collaborationkit-hub-edit-tojsonerror": "Error converting to JSON"
 }
diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index 06c147f..0cbff26 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -71,11 +71,11 @@
'cssclass' => 'mw-ck-sourceinput'
];
 
-   $fields['description'] = [
+   $fields['introduction'] = [
'type' => 'textarea',
'rows' => 5,
'label-message' => 
'collaborationkit-createhub-introduction',
-   'cssclass' => 'mw-ck-descriptioninput'
+   'cssclass' => 'mw-ck-introductioninput'
];
 
return $fields;
@@ -112,11 +112,6 @@
return Status::newFatal( 
'collaborationhkit-createhub-nopermission' );
}
 
-   $content = [
-   'type' => 'subpage-list',
-   'items' => []
-   ];
-
// ACTUAL STUFF HERE
if ( $data['content_source'] !== 'new' ) { // Importing from 
wikitext
$source = Title::newFromText( $data['source'] );
@@ -152,8 +147,9 @@
$data['display_name'],
$data['icon'],
$data['colour'],
-   $data['description'],
-   $content,
+   $data['introduction'],
+   '',
+   [],
$this->msg( 'collaborationkit-createhub-editsummary' 
)->inContentLanguage()->plain(),
$this->getContext()
);
diff --git a/includes/content/CollaborationHubContentHandler.php 
b/includes/content/CollaborationHubContentHandler.php
index 4cef2b4..9dd3024 100644
--- a/includes/content/CollaborationHubContentHandler.php
+++ b/includes/content/CollaborationHubContentHandler.php
@@ -57,7 +57,7 @@
 * @param string $colour
 * @param string $introduction
 * @param string $footer
-* @param array|string $content
+* @param array $content
 * @param string $summary Message key for edit summary
 * @param IContextSource $context The calling context
 * @return Status

-- 
To view, visit https://gerrit.wikimedia.org/r/308080
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0507e85494b4f4bb63371e5845628ba9ce19e269
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...grabbers[master]: Various fixes to grabNewText.php

2016-08-25 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged.

Change subject: Various fixes to grabNewText.php
..


Various fixes to grabNewText.php

OMG how did this script even worked?

Important change: Some parts of the script were assuming blindly that local
and remote ids (like page or revision) were the same, while others weren't.
That's not reliable and people using this script should use mwdumper instead
of MediaWiki's importDump.php, which would preserve ids and is more efficient.

PROBLEM: logevents api parameter letype doesn't accept multiple values.
Multiple values work only on wikia but breaks compatibility

SOLVED: by removing the filter, since it doesn't matter to have additional
entries anyway

PROBLEM: On 1.25 inserts on page fail because page_counter was removed from
core in 1.25

SOLVED: Check if wiki supports page counters before attempting to use
this field

PROBLEM: rev_parent_id was always 0 on inserted revisions, resulting in
wrong delta sizes in page histories, and contributions/recent changes
treating each change as page creation.

SOLVED: Now it won't insert a 0 but a null, so you can run
populateParentId.php to fix only the newly added entries.

PROBLEM: minor edits weren't marked as such

SOLVED: Caused by a typo in the $revision variable name when retrieving
the property from api

PROBLEM: If a page is created and then moved within the scope of recent
changes that grabs the script, the move fails because it attempts to do
the move on a not-yet-existing page. Edits are inserted but on the original
page title rather than the new one

SOLVED:
- Ignore page move if the title before the move doesn't exist in our
  database.
- Added processing of log entries in recentchanges to also grab the
  original page if the move left a redirect.
- Page title is now retrieved from api using the page id, to insert
  revisions on the correct title.

PROBLEM: calls to api revisions fails when using continuation parameters
if we provided a start date, since continuation parameters can't be
provided with also a start date

SOLVED: removed the start date after doing the initial call, so next calls
don't have it. Also, provided a smarter way of adding continuation
parameters without checking for a specific parameter name

PROBLEM: rev_sha1 wasn't being populated.
SOLVED: Populate it using Revision::base36Sha1( $text )

PROBLEM: restoring pages didn't work because it was trying to get revisions
on remote wiki based on page id, which we don't have when we're restoring
and the page doesn't exist on the local database
SOLVED: allow processPage to use namespace and title if page id is null

Other cleanups on processPage:
- $result['query']['pages'] is never null even if page does not exist,
  so removing pointless check. Use 'missing' instead
- Now getting page info from api to get additional fields that were
  mostly guessing like lenght, redirect, etc
- page_random was wrong: it should be a number between 0 and 1, but
  we were using rand()...

The content inserted on the text table is now compressed if
$wgCompressRevisions is enabled. The same text id will be reused on the
revision table if the same text exists as an old revision of the same page,
by comparing the rev_sha1 field.

Page restores now inserts deleted revisions from the remote wiki to guard
against selective restoration of pages, so deleted revisions still in the
archive table are kept. Fails gracefully if the user doesn't have permissions
to see deleted revisions.

Now it processes page protections. There was stub code for doing it but
wasn't being in use anywhere.

Moved various globals into member variables.

Using dbw->selectRow instead of select + fetchObject where possible.

Second parameter of $this->error should be a number. Changed from true to 1.

Error if the script fails to login. The script already supports not providing
username and password.

pagesProcessed now contains a list of page ids and not titles, because we use
the page id everywhere, and page moves carry the same page id, so it's safer
to rely on page id than title. Also, since the id changes on page deletions and
restores, we can add it in such cases to not process those pages again.

Using a single DB_MASTER connection instead of a reader and a writer, because
we're doing massive changes to the database and we don't want in any case to
fetch stale data from a lagged slave that may cause an error, or be locked
on an opened transaction by the writer.

Check if user can see deleted revisions for page restores. Otherwise just
ignore them.

updateDeleted is now archiveAndDeletePage and requires the page ID, so we don't
need to query it again on places where we already have it.

Rewrite completely the logic of page moves. In case a page is moved several
times, optionally with deletions and restores involved, or several pages in a
round, the current method fails when the target page already exists and it's
a dif

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Reimplement content (transcluded features) for collaboration...

2016-08-24 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/306617

Change subject: Reimplement content (transcluded features) for collaborationhubs
..

Reimplement content (transcluded features) for collaborationhubs

This implements agnostic transclusion, makes everything a whole lot
neater than it was, and generally raises far more questions than it
answers.

I need to file a bunch of bugs to follow up on this, and it's probably
full of holes to boot. Something about how no styles are being applied
from collaborationlists (probably the same for sub-hubs, though
haven't tested, but the collaborationlist styles are something we
want here), instantcommons isn't working (possibly unrelated),
galleries weren't working (haven't tested them now), we need it to
only include part of the page, not all of it (and probably respect
noincludes etc)...

Not sure the subpages are actually registered as dependencies, either.
(templates)

Should we just be doing them as templates literally?

bug: T136785
Change-Id: Ifab7ea02b22e720435c6cc7f77f8d1d2937df654
---
M CollaborationKit.alias.php
M i18n/en.json
M i18n/qqq.json
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
5 files changed, 162 insertions(+), 40 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/17/306617/1

diff --git a/CollaborationKit.alias.php b/CollaborationKit.alias.php
index 8e10d22..052c9ba 100644
--- a/CollaborationKit.alias.php
+++ b/CollaborationKit.alias.php
@@ -9,6 +9,5 @@
 
 /** English (English) */
 $specialPageAliases['en'] = [
-   'CreateCollaborationHub' => [ 'CreateCollaborationHub' ],
-   'EditCollaborationHub' => [ 'EditCollaborationHub' ],
+   'CreateCollaborationHub' => [ 'CreateCollaborationHub' ]
 ];
diff --git a/i18n/en.json b/i18n/en.json
index 9dc47a5..6c5f5b8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -45,5 +45,9 @@
"collaborationkit-hub-members-signup": "Join Project",
"collaborationkit-hub-members-view": "View full list",
"collaborationkit-hub-missingpage-note": "This feature does not exist. 
You can create a new project feature using the button below.",
-   "collaborationkit-hub-missingpage-create": "Create feature"
+   "collaborationkit-hub-missingpage-create": "Create feature",
+   "collaborationkit-hub-subpage-view": "View",
+   "collaborationkit-hub-subpage-remove": "Remove feature",
+   "collaborationkit-hub-edit-apierror": "API edit error",
+   "collaborationkit-hub-edit-tojsonerror": "Error converting to JSON"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4199157..c1725f6 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -45,5 +45,7 @@
"collaborationkit-hub-members-signup": "Label for the 'join' button in 
the members block",
"collaborationkit-hub-members-view": "Label for the 'view all' button 
in the members block",
"collaborationkit-hub-missingpage-note": "Note and helpt text for 
missing feature sections (subpages) on a collaboration hub mainpage",
-   "collaborationkit-hub-missingpage-create": "Button label for creating a 
new feature (subpage)"
+   "collaborationkit-hub-missingpage-create": "Button label for creating a 
new feature (subpage)",
+   "collaborationkit-hub-edit-apierror": "Error message for API edit 
error",
+   "collaborationkit-hub-edit-tojsonerror": "Error message when something 
went wrong converting to JSON"
 }
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index dc8a72f..68b363e 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -293,7 +293,6 @@
$output->addModules( 'ext.CollaborationKit.icons' );
$output->addModules( 'ext.CollaborationKit.blots' );
$output->setEnableOOUI( true );
-   OutputPage::setupOOUI();
}
 
/**
@@ -415,16 +414,55 @@
 * @return string
 */
protected function getParsedContent( Title $title, ParserOptions 
$options, ParserOutput &$output ) {
-   // global $wgParser;
-   return $html = 'CONTENT APPEARS HERE (PENDING T136785)';
+   global $wgParser;
 
-   /*
-   $linkRenderer = $wgParser->getLinkRenderer();
-   $list = '';
+   $html = '';
 
foreach ( $this->getContent() as $item ) {
+   if ( !isset( $item['title'] ) ) {
+   continue;
+   }
+   $spTitle = Title::newFromText( $item['title'] );
+   $spRev = Revision::newFromTitle( $spTitle );
 
-   // TODO check if subpage exists
+   // open element
+

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Get rid of Notice: Undefined property: stdClass::$image that...

2016-08-17 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/305405

Change subject: Get rid of Notice: Undefined property: stdClass::$image that 
pops up on collaborationlists when initially opening to edit with preview
..

Get rid of Notice: Undefined property: stdClass::$image that pops up on
collaborationlists when initially opening to edit with preview

We might as well just check if the image is set before checking if it's
a string.

Change-Id: Ibeee3c066f13133cce01efba03028c1bd7e61f02
---
M includes/content/CollaborationListContent.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/05/305405/1

diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 3bedad3..2b9d775 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -374,7 +374,7 @@
if ( class_exists( 'PageImages' ) ) {
$image = PageImages::getPageImage( 
$titleForItem );
}
-   } elseif ( is_string( $item->image ) ) {
+   } elseif ( isset( $item->image ) && is_string( 
$item->image ) ) {
$imageTitle = Title::newFromText( $item->image, 
NS_FILE );
if ( $imageTitle ) {
$image = wfFindFile( $imageTitle );

-- 
To view, visit https://gerrit.wikimedia.org/r/305405
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibeee3c066f13133cce01efba03028c1bd7e61f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Finish cleaning up i18n for what's already there

2016-08-17 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/305389

Change subject: Finish cleaning up i18n for what's already there
..

Finish cleaning up i18n for what's already there

* Proper i18n messages for all alerts and such in the js (error handling
  not done as we need better error handling anyway; we may still
  messagise what's there later if we wind up releasing as-is, but for
  now let's not assume that's the case)
* Hopefully better/more consistent referencing of hubs as 'Collaboration
  Hubs' and 'projects' as technical and colloquial terms, respectively
* More consistent referencing of subpages as 'features'

Bug: T141006
Change-Id: I978a7d6c496b25fc994f7851cfc5b662a563a56d
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/ext.CollaborationKit.list.edit.js
4 files changed, 27 insertions(+), 17 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/89/305389/1

diff --git a/extension.json b/extension.json
index 9486644..5221ba6 100644
--- a/extension.json
+++ b/extension.json
@@ -77,8 +77,12 @@
"collaborationkit-list-add-summary",
"collaborationkit-list-delete",
"collaborationkit-list-delete-summary",
+   "collaborationkit-list-delete-popup",
+   "collaborationkit-list-delete-popup-title",
"collaborationkit-list-move",
"collaborationkit-list-move-summary",
+   "collaborationkit-list-move-popup",
+   "collaborationkit-list-move-popup-title",
"collaborationkit-list-newitem-title",
"collaborationkit-list-newitem-label",
"collaborationkit-list-newitem-page",
diff --git a/i18n/en.json b/i18n/en.json
index 132f57a..9dc47a5 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,8 +3,8 @@
"authors": [ "Isarra", "Harej", "bawolff" ]
},
"colaborationkit-desc": "Next-generation WikiProjects and collaborative 
workspaces for wikis",
-   "createcollaborationhub": "Create new Collaboration Hub",
-   "collaborationkit-createhub-title": "New page title",
+   "createcollaborationhub": "Create new Collaboration Hub project",
+   "collaborationkit-createhub-title": "Page title",
"collaborationkit-createhub-displayname": "Project display name",
"collaborationkit-createhub-image": "Project image",
"collaborationkit-createhub-colour": "Theme color",
@@ -16,7 +16,7 @@
"collaborationkit-createhub-introduction": "Project introduction",
"collaborationkit-createhub-invalidtitle": "The specified title is 
invalid",
"collaborationkit-createhub-exists": "A page already exists with the 
specified title, and there is no support yet for imports",
-   "collaborationkit-createhub-nopermission": "You do not have permission 
to create a hub with this title",
+   "collaborationkit-createhub-nopermission": "You do not have permission 
to create a Collaboration Hub with this title",
"collaborationkit-createhub-invalidsource": "The specified source 
cannot be used",
"collaborationkit-createhub-editsummary": "Create new Collaboration 
Hub",
"collaborationkit-list-isempty": "This list has no items in it.",
@@ -25,10 +25,14 @@
"collaborationkit-list-toomanytags": "You are not allowed to specify 
more than {{PLURAL:$1|one tag|$1 tags}}",
"collaborationkit-list-delete": "Remove item",
"collaborationkit-list-delete-summary": "/* $1 */ Deleting from list.",
+   "collaborationkit-list-delete-popup": "List was saved with $1 deleted.",
+   "collaborationkit-list-delete-popup-title": "Item Deleted",
"collaborationkit-list-add": "Add new item to list",
"collaborationkit-list-add-summary": "/* $1 */ Adding to list.",
"collaborationkit-list-move": "Re-order this item",
"collaborationkit-list-move-summary": "/* $1 */ Reordering item [[$1]]",
+   "collaborationkit-list-move-popup": "List was saved with new order for 
$1",
+   "collaborationkit-list-move-popup-title": "Page Saved",
"collaborationkit-list-newitem-title": "Add item to list",
"collaborationkit-list-newitem-label": "Add to list",
"collaborationkit-list-newitem-page": "Page to add",
@@ -38,8 +42,8 @@
"collaborationkit-listedit-list": "List items",
"collaborationkit-editjsontab": "Edit as JSON",
"collaborationkit-hub-members-header": "Members",
-   "collaborationkit-hub-members-signup": "Join WikiProject",
+   "collaborationkit-hub-members-signup": "Join Project",
"collaborationkit-hub-members-view": "View full list

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Consistentify i18n keys

2016-08-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/303503

Change subject: Consistentify i18n keys
..

Consistentify i18n keys

Half-done, not tested. I got lost somewhere in the list editing js,
needs a lot of messages added and stuff, and I need to figure out how
to test it.
Also need to update the qqq file to match the en file.
Also the en is probably just plain broken currently anyway.

Change-Id: Ie9321441e21e5acb8f4b1cb2b7e74510ee7f9f82
---
M i18n/en.json
M includes/SpecialCreateCollaborationHub.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationListContent.php
M modules/ext.CollaborationKit.list.edit.js
5 files changed, 62 insertions(+), 55 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/03/303503/1

diff --git a/i18n/en.json b/i18n/en.json
index 6e75944..c26f4d5 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,36 +4,43 @@
},
"colaborationkit-desc": "Next-generation WikiProjects and collaborative 
workspaces for wikis",
"createcollaborationhub": "Create new Collaboration Hub",
-   "collaborationkit-create-title": "New page title",
-   "collaborationkit-create-page-name": "Project display name",
-   "collaborationkit-create-page-icon": "Project image",
-   "collaborationkit-create-page-colour": "Theme color",
-   "collaborationhub-create-new": "None",
-   "collaborationhub-create-import": "Wikitext",
-   "collaborationhub-create-clone": "Clone existing Collaboration Hub",
-   "collaborationkit-create-content": "Content import",
-   "collaborationkit-create-source": "Source",
-   "collaborationhub-create-invalidtitle": "The specified title is 
invalid",
-   "collaborationhub-create-exists": "A page already exists with the 
specified title, and there is no support yet for imports",
-   "collaborationhub-create-nopermission": "You do not have permission to 
create a hub with this title",
-   "collaborationhub-create-invalidsource": "The specified source cannot 
be used",
-   "collaborationhub-create-editsummary": "Create new Collaboration Hub",
-   "collaborationkit-taglist": "'''{{PLURAL:$2|Tagged:|Tags:}}''' $1 ",
-   "collaborationkit-listempty": "This list has no items in it.",
-   "collaborationkit-listcontent-toomanytags": "You are not allowed to 
specify more than {{PLURAL:$1|one tag|$1 tags}}",
-   "collaborationkit-listcontent-notlist": "[[$1]] is not a 
CollaborationKit list page",
-   "collabkit-list-delete-summary": "/* $1 */ Deleting from list.",
-   "collabkit-list-add-summary": "/* $1 */ Adding to list.",
-   "collaborationkit-list-add-button": "Add new item to list",
-   "collaborationkit-members-header": "Members",
-   "collaborationkit-members-signup": "Join WikiProject",
-   "collaborationkit-members-view": "View full list",
-   "collabkit-list-delete": "Remove item",
-   "collaborationkit-editjsontab": "Edit as JSON",
-   "collaborationkit-missing-note": "This page does not exist. You can 
create a new project subpage using the button below.",
-   "collaborationkit-create-subpage": "Create subpage",
+   "collaborationkit-createhub-title": "New page title",
+   "collaborationkit-createhub-displayname": "Project display name",
+   "collaborationkit-createhub-image": "Project image",
+   "collaborationkit-createhub-colour": "Theme color",
+   "collaborationkit-createhub-new": "None",
+   "collaborationkit-createhub-import": "Wikitext",
+   "collaborationkit-createhub-clone": "Clone existing Collaboration Hub",
+   "collaborationkit-createhub-content": "Content import",
+   "collaborationkit-createhub-source": "Source",
+   "collaborationkit-createhub-introduction": "Project introduction",
+   "collaborationkit-createhub-invalidtitle": "The specified title is 
invalid",
+   "collaborationkit-createhub-exists": "A page already exists with the 
specified title, and there is no support yet for imports",
+   "collaborationkit-createhub-nopermission": "You do not have permission 
to create a hub with this title",
+   "collaborationkit-createhub-invalidsource": "The specified source 
cannot be used",
+   "collaborationkit-createhub-editsummary": "Create new Collaboration 
Hub",
+   "collaborationkit-list-isempty": "This list has no items in it.",
+   "collaborationkit-list-notlist": "[[$1]] is not a CollaborationKit list 
page",
+   "collaborationkit-list-taglist": "'''{{PLURAL:$2|Tagged:|Tags:}}''' $1 
",
+   "collaborationkit-list-toomanytags": "You are not allowed to specify 
more than {{PLURAL:$1|one tag|$1 tags}}",
+   "collaborationkit-list-delete": "Remove item",
+   "collaborationkit-list-delete-summary": "/* $1 */ Deleting from list.",
+   "collaborationkit-list-add": "Add n

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Clean up and refactor CollaborationHubContent

2016-08-04 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/302971

Change subject: Clean up and refactor CollaborationHubContent
..

Clean up and refactor CollaborationHubContent




Change-Id: I52d555078cb998a157d5ee47cb20dfaf51e933ca
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CollaborationKit.php
M includes/SpecialCreateCollaborationHub.php
D includes/SpecialEditCollaborationHub.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
D modules/ext.CollaborationKit.edit.css
D modules/ext.CollaborationKit.edit.js
M modules/ext.CollaborationKit.hub.styles.less
M modules/ext.CollaborationKit.mixins.less
12 files changed, 411 insertions(+), 1,298 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/71/302971/1

diff --git a/extension.json b/extension.json
index 52c302e..5d70482 100644
--- a/extension.json
+++ b/extension.json
@@ -24,7 +24,6 @@
"CollaborationListContent": 
"includes/content/CollaborationListContent.php",
"CollaborationListContentHandler": 
"includes/content/CollaborationListContentHandler.php",
"SpecialCreateCollaborationHub": 
"includes/SpecialCreateCollaborationHub.php",
-   "SpecialEditCollaborationHub": 
"includes/SpecialEditCollaborationHub.php",
"CollaborationListContentEditor": 
"includes/CollaborationListContentEditor.php",
"ResourceLoaderListStyleModule": 
"includes/ResourceLoaderListStyleModule.php"
},
@@ -33,13 +32,9 @@
"CollaborationListContent": "CollaborationListContentHandler"
},
"SpecialPages": {
-   "EditCollaborationHub": "SpecialEditCollaborationHub",
"CreateCollaborationHub": "SpecialCreateCollaborationHub"
},
"Hooks": {
-   "SkinTemplateNavigation": [
-   "CollaborationKitHooks::onSkinTemplateNavigation"
-   ],
"UnitTestsList": [
"CollaborationKitHooks::onUnitTestsList"
],
@@ -59,10 +54,6 @@
"@fixme": "Does having ext.CollaborationKit.list.styles as a dependency 
double load from addModuleStyles?",
"@todo FIXME": "Should this actually load oojs-ui-core, or something 
else",
"ResourceModules": {
-   "ext.CollaborationKit.edit": {
-   "scripts": "ext.CollaborationKit.edit.js",
-   "styles": "ext.CollaborationKit.edit.css"
-   },
"ext.CollaborationKit.main": {
"styles": "ext.CollaborationKit.hub.styles.less"
},
diff --git a/i18n/en.json b/i18n/en.json
index 5725c4a..dd878a1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,26 +1,14 @@
 {
"@metadata": {
-   "authors": [ "Isarra", "Harej" ]
+   "authors": [ "Isarra", "Harej", "bawolff" ]
},
"colaborationkit-desc": "Next-generation WikiProjects and collaborative 
workspaces for wikis",
"collaborationkit-edit-invalidtitle": "Invalid title or incorrect 
content model of target",
-   "editcollaborationhub": "Edit Collaboration Hub page",
-   "editcollaborationhub-legend": "Edit Collaboration Hub",
"createcollaborationhub": "Create new Collaboration Hub",
-   "createcollaborationhub-legend": "Create Collaboration Hub",
-   "collaborationkit-edit-nopermission": "You do not have permission to 
edit this page.",
-   "collaborationkit-edit-header": "",
-   "collaborationkit-edit-pagetitle": "Editing $1",
-   "collaborationkit-edit-hub-name": "Collaboration Hub display name",
-   "collaborationkit-edit-page-name": "Page display name",
-   "collaborationjit-edit-hub-icon": "Project image",
-   "collaborationjit-edit-page-icon": "Page icon",
-   "collaborationkit-edit-page-type": "Page type",
-   "collaborationkit-edit-description": "Project introduction",
-   "collaborationkit-edit-content": "Content",
-   "collaborationkit-edit-summary": "Edit summary",
-   "collaborationkit-create-title": "Page title",
+   "collaborationkit-create-title": "New page title",
"collaborationkit-create-page-name": "Project display name",
+   "collaborationkit-create-page-icon": "Project image",
+   "collaborationkit-create-page-colour": "Theme color",
"collaborationhub-create-new": "None",
"collaborationhub-create-import": "Wikitext",
"collaborationhub-create-clone": "Clone existing Collaboration Hub",
@@ -31,14 +19,6 @@
"collaborationhub-create-nopermission": "You do not have permission to 
create a hub with this title",
"collaborationhub-create-invalidsource": "The specified source cannot 
be used",
"collaborationhub-create-editsummary": "Crea

[MediaWiki-commits] [Gerrit] mediawiki...Splash[master]: Make search toc-like thing not have extra bluts

2016-07-30 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/301935

Change subject: Make search toc-like thing not have extra bluts
..

Make search toc-like thing not have extra bluts

Change-Id: Ia7c3818f9aba6add554b9f961e7a99132fa64403
---
M resources/screen.less
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Splash 
refs/changes/35/301935/1

diff --git a/resources/screen.less b/resources/screen.less
index f6f25d2..f45ea8f 100644
--- a/resources/screen.less
+++ b/resources/screen.less
@@ -755,6 +755,9 @@
margin: 0.1em 0;
}
 
+   .search-types ul {
+   list-style: none;
+   }
.toc,
#toc {
display: inline-block;

-- 
To view, visit https://gerrit.wikimedia.org/r/301935
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7c3818f9aba6add554b9f961e7a99132fa64403
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Splash
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Clean up createcollaborationhub form a bit

2016-07-28 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/301728

Change subject: Clean up createcollaborationhub form a bit
..

Clean up createcollaborationhub form a bit

* Add colour/icon fields to create hub form
* Add i18n for image/colour fields in createcollaborationhub form
* Make some other i18n strings more clear
* Add css classes to createcollaborationhub form
* Make default content when creating collaborationhubs consistent with
  expected content
* Get rid of some of the excess fields from collaborationhub editing
* Make colour validation accept empty strings as default blue colour

Change-Id: I3a980992fd73cc846e30a9cf96a910deed7d321b
---
M i18n/en.json
M includes/SpecialCreateCollaborationHub.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
4 files changed, 42 insertions(+), 29 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/28/301728/1

diff --git a/i18n/en.json b/i18n/en.json
index 7219620..5725c4a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -16,11 +16,11 @@
"collaborationjit-edit-hub-icon": "Project image",
"collaborationjit-edit-page-icon": "Page icon",
"collaborationkit-edit-page-type": "Page type",
-   "collaborationkit-edit-description": "Description",
+   "collaborationkit-edit-description": "Project introduction",
"collaborationkit-edit-content": "Content",
"collaborationkit-edit-summary": "Edit summary",
-   "collaborationkit-create-title": "Title",
-   "collaborationkit-create-page-name": "Display name",
+   "collaborationkit-create-title": "Page title",
+   "collaborationkit-create-page-name": "Project display name",
"collaborationhub-create-new": "None",
"collaborationhub-create-import": "Wikitext",
"collaborationhub-create-clone": "Clone existing Collaboration Hub",
@@ -56,5 +56,7 @@
"collaborationkit-listedit-desc": "Description",
"collaborationkit-listedit-list": "List items",
"collaborationhub-toc-partof": "A part of: ",
-   "collaborationkit-toc-label": "Project contents: "
+   "collaborationkit-toc-label": "Project contents: ",
+   "collaborationkit-create-page-icon": "Project image",
+   "collaborationkit-create-page-colour": "Theme color"
 }
diff --git a/includes/SpecialCreateCollaborationHub.php 
b/includes/SpecialCreateCollaborationHub.php
index f14938e..10f93dd 100644
--- a/includes/SpecialCreateCollaborationHub.php
+++ b/includes/SpecialCreateCollaborationHub.php
@@ -37,12 +37,26 @@
// autofilled from how they got here, hopefully
'title' => [
'type' => 'text',
+   'cssclass' => 'mw-ck-title',
'label-message' => 
'collaborationkit-create-title',
],
// Display name can be different from page title
'display_name' => [
'type' => 'text',
+   'cssclass' => 'mw-ck-display',
'label-message' => 
'collaborationkit-create-page-name',
+   ],
+   // Hub image/icon thing
+   'icon' => [
+   'type' => 'text',
+   'cssclass' => 'mw-ck-icon',
+   'label-message' => 
'collaborationkit-create-page-icon',
+   ],
+   // Colours for the hub styles
+   'colour' => [
+   'type' => 'text',
+   'cssclass' => 'mw-ck-colour',
+   'label-message' => 
'collaborationkit-create-page-colour',
]
];
 
@@ -97,13 +111,15 @@
return Status::newFatal( 
'collaborationhub-create-exists' );
} elseif (
!$title->userCan( 'edit' ) ||
-   !$title->userCan( 'create' ) ||
-   !$title->userCan( 'editcontentmodel' )
+   !$title->userCan( 'create' )
) {
return Status::newFatal( 
'collaborationhub-create-nopermission' );
}
 
-   $content = [];
+   $content = [
+   'type' => 'subpage-list',
+   'items' => []
+   ];
 
// ACTUAL STUFF HERE
if ( $data['content_source'] !== 'new' ) { // Importing from 
wikitext
@@ -138,8 +154,8 @@
$result = CollaborationHubContentHandler::edit(
$title,
$data['display_name'],
-

[MediaWiki-commits] [Gerrit] Convert an [], remove a bad css? Maybe? - change (mediawiki...CollaborationKit)

2016-07-22 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/300664

Change subject: Convert an [], remove a bad css? Maybe?
..

Convert an [], remove a bad css? Maybe?

Change-Id: If8aeb085e34abe4ed78b793ab81ff10c57432862
---
M CollaborationKit.alias.php
M modules/ext.CollaborationKit.edit.css
2 files changed, 5 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/64/300664/1

diff --git a/CollaborationKit.alias.php b/CollaborationKit.alias.php
index 2318d48..8e10d22 100644
--- a/CollaborationKit.alias.php
+++ b/CollaborationKit.alias.php
@@ -5,10 +5,10 @@
  */
 // @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'CreateCollaborationHub' => array( 'CreateCollaborationHub' ),
-   'EditCollaborationHub' => array( 'EditCollaborationHub' ),
-);
+$specialPageAliases['en'] = [
+   'CreateCollaborationHub' => [ 'CreateCollaborationHub' ],
+   'EditCollaborationHub' => [ 'EditCollaborationHub' ],
+];
diff --git a/modules/ext.CollaborationKit.edit.css 
b/modules/ext.CollaborationKit.edit.css
index d9bfec2..e69de29 100644
--- a/modules/ext.CollaborationKit.edit.css
+++ b/modules/ext.CollaborationKit.edit.css
@@ -1,4 +0,0 @@
-
-.ext-ck-edit-pagetype.hidden {
-   display: none;
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/300664
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8aeb085e34abe4ed78b793ab81ff10c57432862
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Make some styles better, add toc label to label it as a toc ... - change (mediawiki...CollaborationKit)

2016-07-22 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/300602

Change subject: Make some styles better, add toc label to label it as a toc or 
stuff
..

Make some styles better, add toc label to label it as a toc or stuff

Change-Id: Ia56be06eece12022cd44766e674a80b4ceef59b0
---
M i18n/en.json
M i18n/qqq.json
M includes/content/CollaborationHubContent.php
M modules/ext.CollaborationKitMainHubViewFile.less
4 files changed, 37 insertions(+), 12 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/02/300602/1

diff --git a/i18n/en.json b/i18n/en.json
index 856b804..7219620 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -55,5 +55,6 @@
"collaborationkit-create-subpage": "Create subpage",
"collaborationkit-listedit-desc": "Description",
"collaborationkit-listedit-list": "List items",
-   "collaborationhub-toc-partof": "A part of: "
+   "collaborationhub-toc-partof": "A part of: ",
+   "collaborationkit-toc-label": "Project contents: "
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d7a90df..20f73db 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -55,5 +55,6 @@
"collaborationkit-create-subpage": "Button label for creating a new 
subpage",
"collaborationkit-listedit-desc": "Header on edit page for the list 
description text box",
"collaborationkit-listedit-list": "Header on edit page for the main 
body of the list",
-   "collaborationhub-toc-partof": "Label for the Collaboration Hub that 
the feature (subpage) is a part of"
+   "collaborationhub-toc-partof": "Label for the Collaboration Hub that 
the feature (subpage) is a part of",
+   "collaborationkit-toc-label": "Label for the Collaboration Hub table of 
contents"
 }
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 16dda42..c31c28a 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -265,7 +265,7 @@
// Image
$prependiture = Html::rawElement(
'div',
-   [ 'id' => 'wp-header-icon', 'class' => 
'wp-junk' ],
+   [ 'id' => 'wp-header-icon' ],
$this->getImage( 'none', 120 )
);
 
@@ -276,7 +276,7 @@
 
$prependiture .= Html::openElement(
'div',
-   [ 'id' => 'wp-header-members', 'class' 
=> 'wp-junk' ]
+   [ 'id' => 'wp-header-members' ]
);
$prependiture .= Html::element(
'h2',
@@ -334,7 +334,7 @@
if ( $this->getIcon() !== '' ) {
$prependiture .= Html::rawElement(
'div',
-   [ 'id' => 'wp-header-icon', 'class' => 
'wp-junk' ],
+   [ 'id' => 'wp-header-icon' ],
$this->getImage( 'none', 40 )
);
}
@@ -708,6 +708,14 @@
}
$html .= Html::openElement( 'div', [ 'class' => 
'wp-toc' ] );
 
+   if ( $type == 'main' ) {
+   $html .= Html::rawElement(
+   'div',
+   [ 'class' => 'toc-label' ],
+   wfMessage( 
'collaborationkit-toc-label' )->inContentLanguage()->text()
+   );
+   }
+
$html .= Html::openElement( 'ul' );
 
foreach ( $ToCItems as $item => $linkJunk ) {
diff --git a/modules/ext.CollaborationKitMainHubViewFile.less 
b/modules/ext.CollaborationKitMainHubViewFile.less
index 5c9f58a..0526967 100644
--- a/modules/ext.CollaborationKitMainHubViewFile.less
+++ b/modules/ext.CollaborationKitMainHubViewFile.less
@@ -29,7 +29,7 @@
 
 // Mainpage hub layout (.mw-body included because vector has excessively 
specific rules)
 .mw-body .wp-mainpage {
-   border-top: solid 10px #7af;
+   border-top: solid 7px #7af;
padding-top: 1em;
 
#wp-header-icon {
@@ -41,17 +41,26 @@
 
float: right;
margin: 0 0 2em 2em;
-   max-width: 20em;
-   min-width: 12em;
+   max-width: 15em;
+   min-width: 10em;
width: 25%;
}
.wp-intro {
f

[MediaWiki-commits] [Gerrit] Styles! - change (mediawiki...CollaborationKit)

2016-07-08 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/298048

Change subject: Styles!
..

Styles!

Change-Id: I4042110574590e07312dadd55dceb0a61862ffa9
---
M includes/content/CollaborationHubContent.php
M modules/ext.CollaborationKitMainHubViewFile.less
2 files changed, 83 insertions(+), 28 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/48/298048/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 0e24ccd..11aa341 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -276,7 +276,7 @@
 
$prependiture .= Html::openElement(
'div',
-   array( 'id' => 'wp-header-members', 
'class' => 'toc wp-junk' )
+   array( 'id' => 'wp-header-members', 
'class' => 'wp-junk' )
);
$prependiture .= Html::element(
'h2',
@@ -465,6 +465,10 @@
}
$sectionLinksHtml = '';
foreach ( $sectionLinks as $link => 
$linkString ) {
+   $sectionLinksHtml .= 
Html::openElement(
+   'span',
+   [ 'class' => 
'mw-editsection' ]
+   );
$sectionLinksHtml .= 
Html::element(
'span',
[ 'class' => 
'mw-editsection-bracket' ],
@@ -472,7 +476,7 @@
);
$sectionLinksHtml .= 
Html::rawElement(
'span',
-   [ 'class' => 
'mw-editsection' ],
+   [],
$linkString
);
$sectionLinksHtml .= 
Html::element(
@@ -480,6 +484,7 @@
[ 'class' => 
'mw-editsection-bracket' ],
']'
);
+   $sectionLinksHtml .= 
Html::closeElement( 'span' );
}
 
Html::rawElement(
@@ -575,6 +580,16 @@
 
if ( $rev->getContentModel() == 
'CollaborationHubContent' ) {
$ToCItems = array();
+
+   // Add project mainpage to toc for subpages
+   if ( $type != 'main' ) {
+
+   $display = Html::element( 'span', [], 
$sourceContent->getPageName() );
+   $display = $sourceContent->getImage( 
'puzzlepiece', 40 ) . $display;
+
+   
$ToCItems[$sourceContent->getPageName()] = Linker::Link( $title, $display );
+   }
+
foreach ( $sourceContent->getContent() as $item 
) {
$spTitle = Title::newFromText( 
$item['item'] );
$spRev = Revision::newFromTitle( 
$spTitle );
@@ -614,14 +629,7 @@
$ToCItems[$item] = Linker::Link( $link, 
$display );
}
$html .= Html::openElement( 'div', array( 
'class' => 'wp-toc' ) );
-   if ( $type != 'main' ) {
-   // TODO Make this proper
-   $html .= Html::rawElement(
-   'h3',
-   array(),
-   Linker::Link( $title, 
$sourceContent->getPageName() )
-   );
-   }
+
$html .= Html::openElement( 'ul' );
 
foreach ( $ToCItems as $item => $linkTitle ) {
@@ -736,7 +744,7 @@
 
/**
 * Helper function for fillParserOutput to actually generate an image 
out of the icon value
-* @param string $fallback for what t

[MediaWiki-commits] [Gerrit] Add some buttons and links to hub mainpages so they're actua... - change (mediawiki...CollaborationKit)

2016-07-07 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/297836

Change subject: Add some buttons and links to hub mainpages so they're actually 
navigable
..

Add some buttons and links to hub mainpages so they're actually navigable

Buttons added to members block for html signup and viewing.
Editsection links added for view, edit, delete for subpage items.

This is all terrible.

Change-Id: I3df4ceb2ed26a99804be6abd81545b70d310d6e0
---
M i18n/en.json
M i18n/qqq.json
M includes/content/CollaborationHubContent.php
3 files changed, 98 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/36/297836/1

diff --git a/i18n/en.json b/i18n/en.json
index b36a625..94c024c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -47,6 +47,8 @@
"collabkit-list-add-summary": "/* $1 */ Adding to list.",
"collaborationkit-list-add-button": "Add new item to list",
"collaborationkit-members-header": "Members",
+   "collaborationkit-members-signup": "Join WikiProject",
+   "collaborationkit-members-view": "View members",
"collabkit-list-delete": "Remove item",
"collaborationkit-editjsontab": "Edit as JSON"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index db9c4df..a1cf844 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -47,6 +47,8 @@
"collabkit-list-add-summary": "Edit summary when adding a new item to 
CollaborationKit list page",
"collaborationkit-list-add-button": "Text of button to add a new item 
to a CollaborationKit list page.",
"collaborationkit-members-header": "Members header for CH mainpages; 
also used for subpage name",
+   "collaborationkit-members-signup": "Label for the 'join' button in the 
members block",
+   "collaborationkit-members-view": "Label for the 'view all' button in 
the members block",
"collabkit-list-delete": "Tooltip for trash can icon on list editor",
"collaborationkit-editjsontab": "Text of the tab used to edit the page 
as JSON."
 }
diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 4c2d4b3..9960343 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -255,6 +255,11 @@
$this->getParsedDescription( $title, $options )
) );
 
+   // Set up OOUI for buttons and stuff
+   // TODO figure out where this is actually used and only use it 
there
+   $output->setEnableOOUI( true );
+   OutputPage::setupOOUI();
+
if ( $this->getPageType() == 'main' ) {
 
// Image
@@ -268,6 +273,7 @@
$membersTitle = Title::newFromText( 
$title->getFullText() . '/' . wfMessage( 'collaborationkit-members-header' 
)->inContentLanguage()->text() );
$membersTitleRev = $title ? Revision::newFromTitle( 
$membersTitle ) : null;
if ( $membersTitleRev ) {
+
$prependiture .= Html::openElement(
'div',
array( 'id' => 'wp-header-members', 
'class' => 'toc wp-junk' )
@@ -282,6 +288,31 @@
[],
Revision::newFromTitle( $membersTitle 
)->getContent()->generateList( $title, $options )
);
+
+   // BUTTONS
+   $membersSignupUrl = SpecialPage::getTitleFor(
+   'EditCollaborationHub',
+   $membersTitle->getPrefixedUrl()
+   )->getLinkUrl();
+
+   $signupButton = new OOUI\ButtonWidget( [
+   'label' => wfMessage( 
'collaborationkit-members-signup' )->inContentLanguage()->text(),
+   'href' => $membersSignupUrl,
+   'id' => 'wp-signup',
+   'flags' => [ 'progressive' ]
+   ] );
+   $seeAllButton = new OOUI\ButtonWidget( [
+   'label' => wfMessage( 
'collaborationkit-members-view' )->inContentLanguage()->text(),
+   'href' => $membersTitle->getLinkUrl(),
+   'id' => 'wp-seeall'
+   ] );
+   $prependiture .= Html::rawElement(
+   'div',
+   [ 'id' => 'wp-members-buttons' ],
+   $signupButton . ' ' . $seeAllButton
+ 

[MediaWiki-commits] [Gerrit] Make the header a real header with styles and stuff - change (mediawiki...CollaborationKit)

2016-06-24 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/295965

Change subject: Make the header a real header with styles and stuff
..

Make the header a real header with styles and stuff

Change-Id: Id8b4c3d8c3431dcc81369684d7eb4646dc2033ef
---
M includes/content/CollaborationHubContent.php
M modules/ext.CollaborationKitMainHubViewFile.less
2 files changed, 36 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/65/295965/1

diff --git a/includes/content/CollaborationHubContent.php 
b/includes/content/CollaborationHubContent.php
index 981ce7e..321ff4a 100644
--- a/includes/content/CollaborationHubContent.php
+++ b/includes/content/CollaborationHubContent.php
@@ -286,6 +286,7 @@
}
 
$output->setText(
+   // Add page class
Html::openElement(
'div',
array( 'class' => 'wp-mainpage 
wp-collaborationhub' )
@@ -301,6 +302,7 @@
}
 
$output->setText(
+   // Add page class
Html::openElement(
'div',
array( 'class' => 'wp-subpage 
wp-collaborationhub' )
@@ -543,6 +545,7 @@
);
}
$html .= Html::closeElement( 'ul' );
+   $html .= '';
$html .= Html::closeElement( 'div' );
} else {
$html = 'Page not found, ToC not possible';
@@ -551,6 +554,7 @@
$html = '';
}
 
+
return $html;
}
 
diff --git a/modules/ext.CollaborationKitMainHubViewFile.less 
b/modules/ext.CollaborationKitMainHubViewFile.less
index 6f49376..a5a850b 100644
--- a/modules/ext.CollaborationKitMainHubViewFile.less
+++ b/modules/ext.CollaborationKitMainHubViewFile.less
@@ -119,3 +119,35 @@
 }
 
 // WTF THERE HAS TO BE A BETTER WAY TO DO THIS
+
+// Mainpage hub layout
+.wp-mainpage {
+   #wp-header-icon {
+   float: left;
+   padding: 0 2em 2em 0;
+   }
+   #wp-header-members {
+   float: right;
+   margin: 0 0 2em 2em;
+   }
+   .wp-toc {
+   clear: both;
+   margin: 1em 0;
+
+   ul {
+   padding: 0;
+   margin: 0;
+   list-style: none;
+   }
+   li {
+   float: left;
+   margin: .5em 1.25em .5em 0;
+   }
+   div {
+   margin: auto;
+   }
+   }
+   .wp-intro{
+   font-size: 115%;
+   }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/295965
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8b4c3d8c3431dcc81369684d7eb4646dc2033ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


  1   2   3   4   >