Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/359906 )

Change subject: Improve layout of special page
......................................................................

Improve layout of special page

- Use OO.ui.
- Remove the width limitation, which is not present on similar special
  pages (Special:NewItem, Special:SetLabel, …).
- Change the two explanation divs with a line break between them to a
  single explanation div containing two paragraphs.

Change-Id: I1273d183621f0a11aa49a0fd54303a87faa81481
---
M modules/SpecialConstraintReportPage.css
M specials/SpecialConstraintReport.php
2 files changed, 10 insertions(+), 17 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
 refs/changes/06/359906/1

diff --git a/modules/SpecialConstraintReportPage.css 
b/modules/SpecialConstraintReportPage.css
index efe4657..faf0d85 100644
--- a/modules/SpecialConstraintReportPage.css
+++ b/modules/SpecialConstraintReportPage.css
@@ -1,11 +1,6 @@
 /* Entity id form */
 form {
        margin-bottom: 20px;
-       width: 250px;
-}
-
-.wbqc-constraintreport-form-entity-id {
-       width: 120px;
 }
 
 /* Notices */
@@ -16,11 +11,6 @@
 .wbqc-constraintreport-notice-error {
        font-weight: bold;
        color: #ba0000;
-}
-
-/* Explanation infobox */
-.wbqc-explanation {
-       width: 50%;
 }
 
 /* Statuses */
diff --git a/specials/SpecialConstraintReport.php 
b/specials/SpecialConstraintReport.php
index b6bd285..9c51150 100644
--- a/specials/SpecialConstraintReport.php
+++ b/specials/SpecialConstraintReport.php
@@ -266,7 +266,7 @@
                                'placeholder' => $this->msg( 
'wbqc-constraintreport-form-entityid-placeholder' )->escaped()
                        ]
                ];
-               $htmlForm = new HTMLForm( $formDescriptor, $this->getContext(), 
'wbqc-constraintreport-form' );
+               $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, 
$this->getContext(), 'wbqc-constraintreport-form' );
                $htmlForm->setSubmitText( $this->msg( 
'wbqc-constraintreport-form-submit-label' )->escaped() );
                $htmlForm->setSubmitCallback( function() {
                        return false;
@@ -312,16 +312,19 @@
         */
        private function getExplanationText() {
                return Html::rawElement(
-                               'div',
-                               [ 'class' => 'wbqc-explanation' ],
+                       'div',
+                       [ 'class' => 'wbqc-explanation' ],
+                       Html::rawElement(
+                               'p',
+                               [],
                                $this->msg( 
'wbqc-constraintreport-explanation-part-one' )->escaped()
                        )
-                       . Html::element( 'br' )
                        . Html::rawElement(
-                               'div',
-                               [ 'class' => 'wbqc-explanation' ],
+                               'p',
+                               [],
                                $this->msg( 
'wbqc-constraintreport-explanation-part-two' )->escaped()
-                       );
+                       )
+               );
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1273d183621f0a11aa49a0fd54303a87faa81481
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de>

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

Reply via email to