MarkTraceur has uploaded a new change for review.

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

Change subject: Move towards a more consistent display
......................................................................

Move towards a more consistent display

Each type now pretty much follows the same pattern and looks similar.

Change-Id: Ia6236a0e6b25509359c42d43dfdd629df6619a4b
---
M ApiFileAnnotations.php
M resources/src/FileAnnotator.less
2 files changed, 19 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileAnnotations 
refs/changes/40/311740/1

diff --git a/ApiFileAnnotations.php b/ApiFileAnnotations.php
index fe090a5..8686e20 100644
--- a/ApiFileAnnotations.php
+++ b/ApiFileAnnotations.php
@@ -317,9 +317,6 @@
                                }
 
                                $html = '<div 
class="wikidata-entity-annotation">';
-                               if ( !is_null( $imageHtml ) ) {
-                                       $html .= $imageHtml;
-                               }
                                if ( !is_null( $label ) || !is_null( 
$description ) ) {
                                        $html .= '<div class="text-content">';
                                        if ( !is_null( $label ) ) {
@@ -328,7 +325,13 @@
                                        if ( !is_null( $description ) ) {
                                                $html .= $description;
                                        }
+                                       $html .= '</div>';
                                }
+                               if ( !is_null( $imageHtml ) ) {
+                                       $html .= $imageHtml;
+                               }
+
+                               $html .= '</div>';
 
                                $setOpts['staleTTL'] = self::MAX_CACHE_TTL;
                                if ( self::maybePurge( $safeAsOf, $oldValue, 
$html, $cache, $cacheKey ) ) {
diff --git a/resources/src/FileAnnotator.less b/resources/src/FileAnnotator.less
index 1eefa36..60dd71f 100644
--- a/resources/src/FileAnnotator.less
+++ b/resources/src/FileAnnotator.less
@@ -23,8 +23,15 @@
                        z-index: 1;
 
                        .file-annotation {
+                               padding: 5px;
+                               width: 560px;
+
+                               * {
+                                       margin-right: auto;
+                                       margin-left: auto;
+                               }
+
                                .commons-category-annotation {
-                                       padding: 5px;
                                        text-align: center;
 
                                        .category-members {
@@ -46,8 +53,7 @@
                                }
 
                                .wikipedia-article-annotation {
-                                       width: 510px;
-                                       padding: 5px;
+                                       width: 550px;
 
                                        > p {
                                                width: 250px;
@@ -64,15 +70,18 @@
                                }
 
                                .wikidata-entity-annotation {
-                                       width: 200px;
+                                       width: 550px;
 
                                        .text-content {
+                                               width: 250px;
                                                padding: 5px;
+                                               display: inline-block;
                                        }
 
                                        .wikidata-image {
                                                width: 200px;
                                                text-align: center;
+                                               display: inline-block;
                                        }
                                }
                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6236a0e6b25509359c42d43dfdd629df6619a4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileAnnotations
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <mholmqu...@wikimedia.org>

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

Reply via email to