From b5dd7baa083cc0983fb2a321da87a2b157c9a3bb Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Mon, 19 Oct 2020 10:39:21 -0700 Subject: [PATCH] Item label can now use overflow hidden Since the icon is applied to the link element it is now possible to apply overflow hidden to the label itself when its wrapped in a span. Bug: T264339 Change-Id: Ifdc1d152702c1f5338fd2969cccf07971d622fc7 --- includes/EchoHooks.php | 2 ++ modules/nojs/mw.echo.badge.less | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/includes/EchoHooks.php b/includes/EchoHooks.php index 81c3da91f..52f66f3c0 100644 --- a/includes/EchoHooks.php +++ b/includes/EchoHooks.php @@ -1103,6 +1103,7 @@ class EchoHooks implements RecentChange_saveHook { 'text' => $alertText, 'active' => ( $url == $title->getLocalURL() ), 'class' => $alertLinkClasses, + 'text-wrapper' => 'span', 'data' => [ 'counter-num' => $alertCount, 'counter-text' => $alertFormattedCount, @@ -1118,6 +1119,7 @@ class EchoHooks implements RecentChange_saveHook { 'text' => $msgText, 'active' => ( $url == $title->getLocalURL() ), 'class' => $msgLinkClasses, + 'text-wrapper' => 'span', 'data' => [ 'counter-num' => $msgCount, 'counter-text' => $msgFormattedCount, diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less index dd7e4f1cc..a384fcac9 100644 --- a/modules/nojs/mw.echo.badge.less +++ b/modules/nojs/mw.echo.badge.less @@ -75,6 +75,12 @@ visibility: hidden; } } + + span { + overflow: hidden; + width: 100%; + display: inline-block; + } } &.oo-ui-flaggedElement-unseen,