Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/153731
Change subject: Truncate text in Echo notifications
......................................................................
Truncate text in Echo notifications
Automatically truncate text with ellipsis on single lines of title
Change-Id: I0ef9eeb9f9d3403f79ee9960b075fb7062150a1d
---
M modules/overlay/ext.echo.overlay.less
M modules/special/ext.echo.special.less
2 files changed, 36 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/31/153731/1
diff --git a/modules/overlay/ext.echo.overlay.less
b/modules/overlay/ext.echo.overlay.less
index bad9439..ef96d1c 100644
--- a/modules/overlay/ext.echo.overlay.less
+++ b/modules/overlay/ext.echo.overlay.less
@@ -38,6 +38,16 @@
}
.mw-echo-title {
+ // Automatically makes any text too long in a single line capped by
ellipsis
+ // @todo .truncated-text() doesn't really apply here because we don't
want white-space changed
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+
+ // Helper class to be used to force single-line text in overlay
+ .mw-echo-title-heading {
+ white-space: nowrap;
+ }
+
a {
font-weight: bold;
}
diff --git a/modules/special/ext.echo.special.less
b/modules/special/ext.echo.special.less
index 57cb9c2..f8dc542 100644
--- a/modules/special/ext.echo.special.less
+++ b/modules/special/ext.echo.special.less
@@ -1,3 +1,24 @@
+// Begin Mixins
+
+// FIXME: Use a core mixin.
+// truncated-text
+//
+// Add the truncated-text mixin to any element where long text is
+// expected, and truncating improves the UX.
+// Can be used with .truncated-text(true) to undo text truncation.
+//
+// Use in Flow, Echo and MobileFrontend extensions.
+.truncated-text(@undo: false) when not (@undo) {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.truncated-text(@undo: false) when (@undo) {
+ white-space: inherit;
+ overflow: inherit;
+ text-overflow: inherit;
+}
+
/* Echo specific CSS */
#mw-echo-more {
@@ -69,6 +90,11 @@
padding: 0;
margin: 30px 0 0 0;
max-width: 600px;
+
+ // Helper class to be used to force single-line text capped by ellipsis
in container
+ .mw-echo-title-heading {
+ .truncated-text();
+ }
}
.mw-echo-notification {
--
To view, visit https://gerrit.wikimedia.org/r/153731
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ef9eeb9f9d3403f79ee9960b075fb7062150a1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: two_tabs
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits