Matthias Mullie has uploaded a new change for review.

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


Change subject: Make condensed view more condensed
......................................................................

Make condensed view more condensed

Mingle: 599
Change-Id: Ib934d73f20d2b01e4ddb898476fc6371372d6b32
---
M Flow.i18n.php
M modules/discussion/styles/collapse.less
M templates/topic.html.php
3 files changed, 49 insertions(+), 24 deletions(-)


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

diff --git a/Flow.i18n.php b/Flow.i18n.php
index 47ee50f..39af72d 100644
--- a/Flow.i18n.php
+++ b/Flow.i18n.php
@@ -147,7 +147,6 @@
        'flow-history-pages-post' => 'Appears on [$1 $2]',
        'flow-topic-participants' => '{{PLURAL:$1|$3 started this 
topic|{{GENDER:$3|$3}}, {{GENDER:$4|$4}}, {{GENDER:$5|$5}} and $2 
{{PLURAL:$2|other|others}}|0=No participation yet|2={{GENDER:$3|$3}} and 
{{GENDER:$4|$4}}|3={{GENDER:$3|$3}}, {{GENDER:$4|$4}} and {{GENDER:$5|$5}}}}',
        'flow-topic-comments' => '{{PLURAL:$1|Comment ($1)|Comments 
($1)|0={{GENDER:$2|Be the first}} to comment!}}',
-       'flow-topic-meta-minimal' => '{{PLURAL:$1|0={{GENDER:$3|Be the first}} 
to comment!|$1 {{PLURAL:$1|comment|comments}} by $2 {{PLURAL:$2|user|users}}}}',
 
        'flow-comment-restored' => 'Restored comment',
        'flow-comment-deleted' => 'Deleted comment',
@@ -674,17 +673,7 @@
 
 Parameters:
 * $1 - the number of comments on this topic, can be used for PLURAL
-* $2 - the name of the current user, can be used for GENDER
-See also:
-* {{msg-mw|Flow-topic-meta-minimal}}',
-       'flow-topic-meta-minimal' => 'Message to display the amount of users 
and comments in a topic in the collapsed topic views.
-
-Parameters:
-* $1 - the number of comments in this topic, can be used for PLURAL
-* $2 - the number of users participating in this topic, can be used for PLURAL
-* $3 - the name of the current user, can be used for GENDER
-See also:
-* {{msg-mw|Flow-topic-comments}}',
+* $2 - the name of the current user, can be used for GENDER',
        'flow-comment-restored' => 'Used as revision comment when the post has 
been restored.
 
 See also:
diff --git a/modules/discussion/styles/collapse.less 
b/modules/discussion/styles/collapse.less
index 89bfa43..97af1ee 100644
--- a/modules/discussion/styles/collapse.less
+++ b/modules/discussion/styles/collapse.less
@@ -45,18 +45,60 @@
                display: none;
                margin: 0;
        }
+
        &.topic-collapsed-one-line .flow-topic-closed {
-               .flow-realtitle {
-                       text-overflow: ellipsis;
+               .flow-topic-title {
                        overflow: hidden;
                        white-space: nowrap;
+                       padding: 0;
+
+                       .flow-realtitle {
+                               text-overflow: ellipsis;
+                       }
                }
 
-               .flow-topic-posts-meta {
+
+               .flow-topic-posts-meta,
+               .flow-datestamp {
                        display: none;
                }
+
                .flow-topic-posts-meta-minimal {
                        display: block;
+
+                       // position in upper right hand corner
+                       position: absolute;
+                       right: 22px;
+                       top: 15px;
+
+                       font-weight: bold;
+                       color: #FFF;
+                       background-color: #CCC;
+
+                       // title height = 30px; this only 22, so add 4px margin 
bottom & top
+                       line-height: 22px;
+                       height: 22px;
+                       margin: 4px 0;
+                       padding: 0 10px;
+
+                       // this creates the small bottom-right arrow
+                       &:after {
+                               // :after should have some content in order to 
show up
+                               content: '.';
+                               text-indent: -9999px;
+                               display: block;
+
+                               width: 0;
+                               height: 0;
+                               border-top: 5px solid transparent;
+                               border-left: 5px solid #CCC;
+
+                               position: relative;
+                               bottom: 5px; // "icon" height - arrow height
+                               // calc's are LESS-escaped below because I want 
CSS to do the
+                               // calc, not LESS (which incorrectly returns 
110%)
+                               left: calc(~"100% + 10px"); // "icon" width + 
"icon" padding-right
+                       }
                }
        }
 }
diff --git a/templates/topic.html.php b/templates/topic.html.php
index a525e74..2df1023 100644
--- a/templates/topic.html.php
+++ b/templates/topic.html.php
@@ -190,15 +190,9 @@
                                </a>
                        </li>
                </ul>
-               <ul class="flow-topic-posts-meta-minimal">
-                       <?php
-                               $userCount = count( $root->getRecursiveResult( 
$indexParticipants ) );
-                               echo wfMessage( 'flow-topic-meta-minimal' )
-                                       ->numParams( $comments, $userCount )
-                                       ->params( $user->getName() )
-                                       ->escaped();
-                       ?>
-               </ul>
+               <p class="flow-topic-posts-meta-minimal">
+                       <?php echo count( $root->getRecursiveResult( 
$indexParticipants ) ); ?>
+               </p>
 
                <?php
                        echo Html::element(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib934d73f20d2b01e4ddb898476fc6371372d6b32
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>

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

Reply via email to