EBernhardson has uploaded a new change for review.

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

Change subject: Show rating name on mobile view, and other minor mobile cleanups
......................................................................

Show rating name on mobile view, and other minor mobile cleanups

Change-Id: I3bfd4d6b59b52774b4becc9015276ce0b64dbd11
---
M views/score_query.twig
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron 
refs/changes/34/286234/1

diff --git a/views/score_query.twig b/views/score_query.twig
index eb8ded1..17b2d6b 100644
--- a/views/score_query.twig
+++ b/views/score_query.twig
@@ -21,6 +21,10 @@
 {% block head %}
     {{ parent() }}
     <style type="text/css">
+        .result .row {
+            display: flex;
+            align-items: center;
+        }
         .row.relevant {
             background-color: green;
         }
@@ -59,7 +63,7 @@
 
     <h3>Score Result</h3>
     <div class="row">
-        <dl class="dl-horizontal col-md-8">
+        <dl class="dl-horizontal col-md-8 col-xs-8">
             <dt>Wiki</dt>
             <dd>{{ query.wiki }}</dd>
             <dt>Query</dt>
@@ -85,7 +89,7 @@
             {% if child.vars.name != '_token' %}
                 <div class="result">
                     <div class="row border-xs border-sm">
-                        <h5 class="click-for-next col-md-3">
+                        <h5 class="click-for-next col-md-3 col-xs-9">
                             <!-- Default hidden, javascript will manage them" 
-->
                             <span class="glyphicon glyphicon-chevron-down 
show-snippet hidden"></span>
                             <span class="glyphicon glyphicon-chevron-up 
hide-snippet hidden"></span>
@@ -100,6 +104,7 @@
                                 {{ form_widget(choice) }}
                             </div>
                         {% endfor %}
+                        <div class="hidden-md hidden-lg rating col-md-2 
click-for-next text-center"></div>
                     </div>
                     <div class="row snippet hidden">
                         <blockquote class="col-md-9">
@@ -127,6 +132,9 @@
                 $row.removeClass(valueToClass.join(' '));
                 if (!isNaN(value)) {
                     $row.addClass(valueToClass[value]);
+                    $row.find('.rating').text($this.siblings('label').text());
+                } else {
+                    $row.find('.rating').text('');
                 }
             },
             onClickForNext = function (evt) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bfd4d6b59b52774b4becc9015276ce0b64dbd11
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discernatron
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

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

Reply via email to