From 0ab982038cc62edc8532e19b4b52613078b1327b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rui=20Tom=C3=A9?=
<108268980+r-tome@users.noreply.github.com>
Date: Mon, 12 Jun 2023 10:56:03 +0100
Subject: [PATCH] [AC-1088] Truncating collection names on Groups table (#5236)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* [AC-1088] Set no-wrap to 'select all' column on groups table
* [AC-1088] Using EllipsisPipe on GroupsComponent to truncate group names
* [AC-1088] Reverted using no-wrap on column header
* [AC-1088] Removed truncateCollectionNames
* [AC-1088] Added 'truncate' option to badge and badge-list components
* [AC-1088] Truncating collection names on groups component
* [AC-1088] Marked EllipsisPipe as deprecated
* [AC-1088] Removed EllipsisPipe from GroupsComponent
* [AC-1088] Added badge truncate to storybook stories
* [AC-1088] Setting badge css requirements for truncate
* [AC-1088] Added storybook stories for truncated badges
* [AC-1088] Set badges truncate default value to true
* [AC-1088] Set badges to use class tw-inline-block and tw-align-text-top
* [AC-1088] Set title on each badge list item if truncated
* [AC-1088] Set title on badge if truncated
* [AC-1088] Removed duplicate truncate on badge-list component
* [AC-1088] Swapped setting badge title from ngAfterContentInit to HostBinding
* [AC-1088] Configured badge stories to have the truncate option
* [AC-1088] Fixed badges tooltip to not include commas added for screen readers on badge lists
* [AC-1088] Added lengthy text to single badge on storybook
* [AC-1088] In badge-list moved the commas out from the badges
* [AC-1088] Removed irrelevant comment and moved the text align class next to other font classes
---
libs/angular/src/platform/pipes/ellipsis.pipe.ts | 3 +++
.../src/badge-list/badge-list.component.html | 8 +++++---
.../src/badge-list/badge-list.component.ts | 1 +
.../src/badge-list/badge-list.stories.ts | 14 +++++++++++++-
libs/components/src/badge/badge.directive.ts | 12 +++++++++---
libs/components/src/badge/badge.stories.ts | 14 +++++++++++---
6 files changed, 42 insertions(+), 10 deletions(-)
diff --git a/libs/angular/src/platform/pipes/ellipsis.pipe.ts b/libs/angular/src/platform/pipes/ellipsis.pipe.ts
index 081dba11ab..dd271f9462 100644
--- a/libs/angular/src/platform/pipes/ellipsis.pipe.ts
+++ b/libs/angular/src/platform/pipes/ellipsis.pipe.ts
@@ -3,6 +3,9 @@ import { Pipe, PipeTransform } from "@angular/core";
@Pipe({
name: "ellipsis",
})
+/**
+ * @deprecated Use the tailwind class 'tw-truncate' instead
+ */
export class EllipsisPipe implements PipeTransform {
transform(value: string, limit = 25, completeWords = false, ellipsis = "...") {
if (value.length <= limit) {
diff --git a/libs/components/src/badge-list/badge-list.component.html b/libs/components/src/badge-list/badge-list.component.html
index cd0310d889..3e429b9430 100644
--- a/libs/components/src/badge-list/badge-list.component.html
+++ b/libs/components/src/badge-list/badge-list.component.html
@@ -1,8 +1,10 @@