jenkins-bot has submitted this change and it was merged.

Change subject: Shift divs about
......................................................................


Shift divs about

Have a div for the top, then a div for the bottom, and split those into
two sets of things each.

Also some minor design changes.

Bug: 54789
Change-Id: I96cda7abbe6051903d2d8887ec3a31feaff39f59
---
M css/betafeatures.css
M includes/HTMLFeatureField.php
2 files changed, 104 insertions(+), 79 deletions(-)

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



diff --git a/css/betafeatures.css b/css/betafeatures.css
index b1d3fd5..518675a 100644
--- a/css/betafeatures.css
+++ b/css/betafeatures.css
@@ -56,19 +56,23 @@
        font-size: 24px;
 }
 
-/* line 146, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-feature-title,
-.mw-ui-feature-info-links.filled {
+.mw-ui-feature-header {
        width: 100%;
        border-bottom: 1px solid #e5e5e5;
 }
 
-/* line 156, sourcefiles/scss/components/default/_forms.scss */
+.mw-ui-feature-meta,
+.mw-ui-feature-screenshot-contain,
+.mw-ui-feature-title-contain,
+.mw-ui-feature-info-links {
+       width: 50%;
+}
+
+.mw-ui-feature-info-links,
 .mw-ui-feature-info-link-contain,
+.mw-ui-feature-title-contain,
 .mw-ui-feature-discussion-link-contain,
-.mw-ui-feature-checkbox,
-.mw-ui-feature-contain,
-.mw-ui-feature-main,
+.mw-ui-feature-screenshot-contain,
 .mw-ui-feature-meta {
        display: inline-block;
 }
@@ -104,9 +108,8 @@
 }
 
 /* line 180, sourcefiles/scss/components/default/_forms.scss */
-.mw-ui-feature-main,
-.mw-ui-feature-meta {
-       width: 50%;
+.mw-ui-feature-main {
+       width: 100%;
        vertical-align: top;
 }
 
@@ -147,16 +150,12 @@
 /* line 214, sourcefiles/scss/components/default/_forms.scss */
 .mw-ui-feature-screenshot-contain {
        padding-top: 28px;
-       width: 100%;
 }
 
 /* line 219, sourcefiles/scss/components/default/_forms.scss */
 .mw-ui-feature-screenshot {
-       border: 1px solid #e5e5e5;
        max-height: 150px;
        max-width: 100%;
-       background: #fff;
-       padding: 8px;
 }
 
 /* line 225, sourcefiles/scss/components/default/_forms.scss */
diff --git a/includes/HTMLFeatureField.php b/includes/HTMLFeatureField.php
index 573eee9..8f63f7a 100644
--- a/includes/HTMLFeatureField.php
+++ b/includes/HTMLFeatureField.php
@@ -32,79 +32,21 @@
                parent::__construct( $options );
        }
 
-       function getInputHTML( $value ) {
-               $parent = $this->mParent;
-               $html = '';
-
-               $attrs = $this->getTooltipAndAccessKey();
-               $attrs['id'] = $this->mID;
-               $attrs['class'] = 'mw-ui-feature-toggle';
-
-               $divClasses = array(
-                       'mw-ui-feature-field',
-               );
-
-               // Use 'cssclass' to populate this. Separate from 'class', of 
course.
-               if ( $this->mClass !== '' ) {
-                       $divClasses[] = $this->mClass;
-               }
-
-               if ( isset( $this->mParams['disabled'] ) &&
-                               $this->mParams['disabled'] === true ) {
-                       $attrs['disabled'] = true;
-               }
-
-               $html .= Html::openElement( 'div', array(
-                       'class' => implode( ' ', $divClasses ),
-               ) );
-
-               $html .= Html::rawElement( 'div', array(
-                       'class' => 'mw-ui-feature-checkbox',
-               ), $this->getCheckboxHTML( $value, $attrs ) );
-
-               $html .= Html::openElement( 'div', array(
-                       'class' => 'mw-ui-feature-contain',
+       function getHeaderHTML( $value ) {
+               $html = Html::openElement( 'div', array(
+                       'class' => 'mw-ui-feature-header',
                ) );
 
                $html .= Html::openElement( 'div', array(
-                       'class' => 'mw-ui-feature-main',
+                       'class' => 'mw-ui-feature-title-contain',
                ) );
 
                $html .= Html::rawElement( 'p', array(
                        'class' => 'mw-ui-feature-title',
                ), $this->getPostCheckboxLabelHTML() );
 
-               if ( isset( $this->mParams['user-count'] ) ) {
-                       $userCountMsg = 'mw-ui-feature-user-count';
-
-                       if ( isset( $this->mParams['user-count-msg'] ) ) {
-                               $userCountMsg = 
$this->mParams['user-count-msg'];
-                       }
-
-                       $html .= Html::rawElement(
-                               'p',
-                               array( 'class' => 'mw-ui-feature-user-count' ),
-                               $parent->msg( $userCountMsg )->numParams( 
$this->mParams['user-count'] )->escaped()
-                       );
-
-                       $attrs['data-count'] = $this->mParams['user-count'];
-               }
-
-               if ( isset( $this->mParams['desc-message'] ) ) {
-                       $html .= Html::rawElement(
-                               'p',
-                               array(
-                                       'class' => 'mw-ui-feature-description',
-                               ),
-                               $parent->msg( $this->mParams['desc-message'] 
)->escaped() );
-               }
-
-               // mw-ui-feature-main
+               // Close -title-contain
                $html .= Html::closeElement( 'div' );
-
-               $html .= Html::openElement( 'div', array(
-                       'class' => 'mw-ui-feature-meta',
-               ) );
 
                $hasInfoLink = isset( $this->mParams['info-link'] );
                $hasDiscussionLink = isset( $this->mParams['discussion-link'] );
@@ -153,6 +95,51 @@
                // mw-ui-feature-info-links
                $html .= Html::closeElement( 'div' );
 
+               // Close -header
+               $html .= Html::closeElement( 'div' );
+
+               return $html;
+       }
+
+       function getMainHTML( $value ) {
+               $parent = $this->mParent;
+
+               $html = Html::openElement( 'div', array(
+                       'class' => 'mw-ui-feature-main',
+               ) );
+
+               $html .= Html::openElement( 'div', array(
+                       'class' => 'mw-ui-feature-meta',
+               ) );
+
+               if ( isset( $this->mParams['user-count'] ) ) {
+                       $userCountMsg = 'mw-ui-feature-user-count';
+
+                       if ( isset( $this->mParams['user-count-msg'] ) ) {
+                               $userCountMsg = 
$this->mParams['user-count-msg'];
+                       }
+
+                       $html .= Html::rawElement(
+                               'p',
+                               array( 'class' => 'mw-ui-feature-user-count' ),
+                               $parent->msg( $userCountMsg )->numParams( 
$this->mParams['user-count'] )->escaped()
+                       );
+
+                       $attrs['data-count'] = $this->mParams['user-count'];
+               }
+
+               if ( isset( $this->mParams['desc-message'] ) ) {
+                       $html .= Html::rawElement(
+                               'p',
+                               array(
+                                       'class' => 'mw-ui-feature-description',
+                               ),
+                               $parent->msg( $this->mParams['desc-message'] 
)->escaped() );
+               }
+
+               // Close -meta
+               $html .= Html::closeElement( 'div' );
+
                $html .= Html::openElement( 'div', array(
                        'class' => 'mw-ui-feature-screenshot-contain',
                ) );
@@ -164,12 +151,51 @@
                        ) );
                }
 
-               // mw-ui-feature-screenshot
+               // Close -screenshot-contain
                $html .= Html::closeElement( 'div' );
 
-               // mw-ui-feature-meta
+               // Close -main
                $html .= Html::closeElement( 'div' );
 
+               return $html;
+       }
+
+       function getInputHTML( $value ) {
+               $html = '';
+
+               $attrs = $this->getTooltipAndAccessKey();
+               $attrs['id'] = $this->mID;
+               $attrs['class'] = 'mw-ui-feature-toggle';
+
+               $divClasses = array(
+                       'mw-ui-feature-field',
+               );
+
+               // Use 'cssclass' to populate this. Separate from 'class', of 
course.
+               if ( $this->mClass !== '' ) {
+                       $divClasses[] = $this->mClass;
+               }
+
+               if ( isset( $this->mParams['disabled'] ) &&
+                               $this->mParams['disabled'] === true ) {
+                       $attrs['disabled'] = true;
+               }
+
+               $html .= Html::openElement( 'div', array(
+                       'class' => implode( ' ', $divClasses ),
+               ) );
+
+               $html .= Html::rawElement( 'div', array(
+                       'class' => 'mw-ui-feature-checkbox',
+               ), $this->getCheckboxHTML( $value, $attrs ) );
+
+               $html .= Html::openElement( 'div', array(
+                       'class' => 'mw-ui-feature-contain',
+               ) );
+
+               $html .= $this->getHeaderHTML( $value );
+               $html .= $this->getMainHTML( $value );
+
                // mw-ui-feature-contain
                $html .= Html::closeElement( 'div' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96cda7abbe6051903d2d8887ec3a31feaff39f59
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to