jenkins-bot has submitted this change and it was merged. Change subject: Make condensed view more condensed ......................................................................
Make condensed view more condensed Based on https://upload.wikimedia.org/wikipedia/commons/c/c1/Flow_collapsed_Collapsed_1Line.png Mingle: 599 Change-Id: Ib934d73f20d2b01e4ddb898476fc6371372d6b32 --- M Flow.i18n.php M modules/base/styles/preview.less M modules/discussion/styles/collapse.less M modules/discussion/styles/topic.less M templates/topic.html.php 5 files changed, 83 insertions(+), 26 deletions(-) Approvals: EBernhardson: Looks good to me, approved jenkins-bot: Verified diff --git a/Flow.i18n.php b/Flow.i18n.php index bf42fc6..6097f8a 100644 --- a/Flow.i18n.php +++ b/Flow.i18n.php @@ -160,7 +160,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|$1 comment|$1 comments|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', @@ -700,17 +699,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/base/styles/preview.less b/modules/base/styles/preview.less index f14b1ae..3472fb8 100644 --- a/modules/base/styles/preview.less +++ b/modules/base/styles/preview.less @@ -5,6 +5,7 @@ display: none; margin-top: 5px; margin-bottom: 5px; + white-space: normal; .flow-preview-sub-container { margin-top: 5px; diff --git a/modules/discussion/styles/collapse.less b/modules/discussion/styles/collapse.less index 89bfa43..d076b55 100644 --- a/modules/discussion/styles/collapse.less +++ b/modules/discussion/styles/collapse.less @@ -45,18 +45,63 @@ display: none; margin: 0; } + &.topic-collapsed-one-line .flow-topic-closed { - .flow-realtitle { - text-overflow: ellipsis; + .flow-titlebar { + height: 30px; + } + .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/modules/discussion/styles/topic.less b/modules/discussion/styles/topic.less index c4abad4..b3165ed 100644 --- a/modules/discussion/styles/topic.less +++ b/modules/discussion/styles/topic.less @@ -11,6 +11,7 @@ padding-bottom: 10px; } + &.flow-topic-moderated { .flow-topic-title { padding-left: 22px !important; @@ -24,13 +25,33 @@ .flow-realtitle { display: block; } + // position moderated title even with the timestamp + .flow-titlebar { + padding-bottom: 10px; + } + .flow-topic-title { + margin-bottom: 0; + } + // shrink the moderated title .flow-moderated-title { - display: none; + font-size: 10pt; } } - &.flow-topic-closed { + .flow-titlebar { + height: 30px; + .flow-topic-title { + overflow: hidden; + white-space: nowrap; + padding: 0; + + .flow-moderated-title { + overflow: ellipsis; + } + } + } + .flow-topic-children-container { display: none; } @@ -113,6 +134,11 @@ border: none; padding: 0; margin: 0; + + &.flow-topic-moderated { + font-size: 18px; + color: #aaa; + } } } diff --git a/templates/topic.html.php b/templates/topic.html.php index 4151473..0eaeffc 100644 --- a/templates/topic.html.php +++ b/templates/topic.html.php @@ -177,6 +177,7 @@ */ ?> + <?php if ( !$root->isModerated() ): ?> <ul class="flow-topic-posts-meta"> <li class="flow-topic-participants"> <?php echo $this->printParticipants( $root, $indexParticipants ); ?> @@ -195,15 +196,10 @@ </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 endif; ?> <?php echo Html::element( -- To view, visit https://gerrit.wikimedia.org/r/102707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib934d73f20d2b01e4ddb898476fc6371372d6b32 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Matthias Mullie <[email protected]> Gerrit-Reviewer: Bsitu <[email protected]> Gerrit-Reviewer: EBernhardson <[email protected]> Gerrit-Reviewer: Siebrand <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
