Santhosh has uploaded a new change for review.

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

Change subject: Suggestions: Do not show the list heading for fallback 
suggestions(Featured)
......................................................................

Suggestions: Do not show the list heading for fallback suggestions(Featured)

Bug: T115006
Change-Id: Icd1a8f09e22bfd6b0b2ecb032c3e3958c14dbd4f
---
M modules/dashboard/ext.cx.suggestionlist.js
M modules/dashboard/styles/ext.cx.suggestionlist.less
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/03/249903/1

diff --git a/modules/dashboard/ext.cx.suggestionlist.js 
b/modules/dashboard/ext.cx.suggestionlist.js
index 2fd7e4e..610403b 100644
--- a/modules/dashboard/ext.cx.suggestionlist.js
+++ b/modules/dashboard/ext.cx.suggestionlist.js
@@ -325,7 +325,12 @@
                        list.$list = $( '<div>' )
                                .attr( 'data-listid', listId )
                                .addClass( 'cx-suggestionlist ' + list.name );
-                       $listHeading = $( '<h2>' ).text( list.displayName );
+                       if ( list.type === listTypes.TYPE_FEATURED ) {
+                               // No need to show heading for misc fallback 
suggestions shown at the end.
+                               $listHeading = $( '<h2>' );
+                       } else {
+                               $listHeading = $( '<h2>' ).text( 
list.displayName );
+                       }
                        list.$list.append( $listHeading );
 
                        if ( addtoTop && this.$container.find( 
'.cx-suggestionlist' ).length ) {
diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less 
b/modules/dashboard/styles/ext.cx.suggestionlist.less
index d84bfc9..ba028aa 100644
--- a/modules/dashboard/styles/ext.cx.suggestionlist.less
+++ b/modules/dashboard/styles/ext.cx.suggestionlist.less
@@ -5,6 +5,8 @@
 .cx-suggestionlist h2 {
        float: left;
        border-bottom: none;
+       /* Even empty headers need to take some space. For example: Featured 
list at the end */
+       min-height: 1em;
 }
 
 .cx-suggestionlist--expanded h2,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd1a8f09e22bfd6b0b2ecb032c3e3958c14dbd4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

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

Reply via email to