jenkins-bot has submitted this change and it was merged.

Change subject: Moderated post/topic styling: * Actually apply classes that 
were supposed to be applied. * Remove coloured icons on hover; they falsely 
imply that the element is hot.
......................................................................


Moderated post/topic styling:
* Actually apply classes that were supposed to be applied.
* Remove coloured icons on hover; they falsely imply that the element is hot.

Bug: 56793
Change-Id: If1ff218d05d80ba5f37ce9fe2c622ac151fa8d9b
---
M modules/discussion/styles/post.less
M modules/discussion/styles/topic.less
M templates/topic.html.php
3 files changed, 10 insertions(+), 28 deletions(-)

Approvals:
  Matthias Mullie: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/discussion/styles/post.less 
b/modules/discussion/styles/post.less
index 661524f..de1f4dd 100644
--- a/modules/discussion/styles/post.less
+++ b/modules/discussion/styles/post.less
@@ -289,26 +289,14 @@
 
                        &.flow-post-moderated-hide {
                                
.background-image-svg('../../base/images/hidden_normal.svg', 
'../../base/images/hidden_normal.png');
-
-                               &:hover {
-                                       
.background-image-svg('../../base/images/hidden_hover.svg', 
'../../base/images/hidden_hover.png');
-                               }
                        }
 
                        &.flow-post-moderated-delete {
                                
.background-image-svg('../../base/images/deleted_normal.svg', 
'../../base/images/deleted_normal.png');
-
-                               &:hover {
-                                       
.background-image-svg('../../base/images/deleted_hover.svg', 
'../../base/images/deleted_hover.png');
-                               }
                        }
 
                        &.flow-post-moderated-censor {
                                
.background-image-svg('../../base/images/suppressed_normal.svg', 
'../../base/images/suppressed_normal.png');
-
-                               &:hover {
-                                       
.background-image-svg('../../base/images/suppressed_hover.svg', 
'../../base/images/suppressed_hover.png');
-                               }
                        }
                }
 
diff --git a/modules/discussion/styles/topic.less 
b/modules/discussion/styles/topic.less
index 76688fa..8df1d6e 100644
--- a/modules/discussion/styles/topic.less
+++ b/modules/discussion/styles/topic.less
@@ -20,9 +20,7 @@
                }
        }
 
-       .flow-topic-moderated-hide,
-       .flow-topic-moderated-deleted,
-       .flow-topic-moderated-suppressed {
+       .flow-topic-moderated {
                padding-left: 22px !important;
 
                background-position: left;
@@ -34,11 +32,11 @@
                
.background-image-svg('../../base/images/moderate_menu_hidden_normal.svg', 
'../../base/images/moderate_menu_hidden_normal.png');
        }
 
-       .flow-topic-moderated-deleted {
+       .flow-topic-moderated-delete {
                .background-image-svg('../../base/images/moderated_normal.svg', 
'../../base/images/moderated_normal.png');
        }
 
-       .flow-topic-moderated-censored {
+       .flow-topic-moderated-censor {
                
.background-image-svg('../../base/images/suppressed_normal.svg', 
'../../base/images/suppressed_normal.png');
        }
 
@@ -61,16 +59,6 @@
                &:hover,
                &.mw-ui-hover {
                        background: @topic-titlebar-background-color;
-
-                       .flow-topic-moderated-censored {
-                               
.background-image-svg('../../base/images/suppressed_hover.svg', 
'../../base/images/suppressed_hover.png');
-                       }
-                       .flow-topic-moderated-deleted {
-                               
.background-image-svg('../../base/images/moderated_hover.svg', 
'../../base/images/moderated_hover.png');
-                       }
-                       .flow-topic-moderated-hide {
-                               
.background-image-svg('../../base/images/moderate_menu_hidden_hover.svg', 
'../../base/images/moderate_menu_hidden_hover.png');
-                       }
                }
 
                .flow-topic-title {
diff --git a/templates/topic.html.php b/templates/topic.html.php
index 1e71589..33caa26 100644
--- a/templates/topic.html.php
+++ b/templates/topic.html.php
@@ -59,9 +59,15 @@
 //
 // Content starts here
 //
+$moderationClass = '';
+
+if ( $root->isModerated() ) {
+       $moderationClass .= ' flow-topic-moderated';
+       $moderationClass .= ' 
flow-topic-moderated-'.$root->getModerationState();
+}
 
 echo Html::openElement( 'div', array(
-       'class' => 'flow-topic-container flow-topic-full' . ( 
$root->isModerated() ? ' flow-topic-moderated' : '' ),
+       'class' => 'flow-topic-container flow-topic-full' . $moderationClass,
        'id' => 'flow-topic-' . $topic->getId()->getHex(),
        'data-topic-id' => $topic->getId()->getHex(),
        'data-creator-name' => $this->getCreatorText( $root, $user ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1ff218d05d80ba5f37ce9fe2c622ac151fa8d9b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Werdna <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Matthias Mullie <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to