Skip to content

Commit 81becc5

Browse files
Merge pull request #13474 from sg00dwin/truncate-catalog-source-badge-bug
OCPBUGS-25771: Enable catalog source badge to truncate for long names
2 parents 8297907 + b385451 commit 81becc5

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-items.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
EmptyStateVariant,
88
EmptyStateHeader,
99
EmptyStateFooter,
10+
Truncate,
1011
} from '@patternfly/react-core';
1112
import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
1213
import * as classNames from 'classnames';
@@ -93,7 +94,7 @@ const filterByArchAndOS = (items: OperatorHubItem[]): OperatorHubItem[] => {
9394

9495
const Badge = ({ text }) => (
9596
<span key={text} className="pf-v5-c-badge pf-m-read">
96-
{text}
97+
<Truncate className="pf-v5-c-truncate--no-min-width" content={text} />
9798
</span>
9899
);
99100

frontend/public/style/_overrides.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,3 +401,7 @@ ul {
401401
.pf-v5-c-popover {
402402
min-width: var(--pf-v5-c-popover--MinWidth) !important;
403403
}
404+
405+
.pf-v5-c-truncate--no-min-width {
406+
--pf-v5-c-truncate--MinWidth: 0 !important;
407+
}

0 commit comments

Comments
 (0)