Skip to content

Commit cb9b4f7

Browse files
[WEB-5784] fix: truncation issue in wi properties (#8422)
* fix: update background surface 2 variables in tailwind config * fix: improve layout and truncation handling in issue link and list items
1 parent 7a3cebd commit cb9b4f7

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

apps/web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/list-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const SubIssuesListItem = observer(function SubIssuesListItem(props: Prop
160160
</div>
161161
</WithDisplayPropertiesHOC>
162162
<Tooltip tooltipContent={issue.name} isMobile={isMobile}>
163-
<span className="w-full truncate text-13 text-primary">{issue.name}</span>
163+
<span className="flex-1 w-0 truncate text-13 text-primary">{issue.name}</span>
164164
</Tooltip>
165165
</div>
166166

apps/web/core/components/issues/issue-detail/links/link-item.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,24 @@ export const IssueLinkItem = observer(function IssueLinkItem(props: TIssueLinkIt
4949
key={linkId}
5050
className="group col-span-12 lg:col-span-6 xl:col-span-4 2xl:col-span-3 3xl:col-span-2 flex items-center justify-between gap-3 h-10 flex-shrink-0 px-3 bg-surface-2 hover:bg-layer-1 border-[0.5px] border-subtle rounded-sm"
5151
>
52-
<div className="flex items-center gap-2.5 truncate flex-grow">
52+
<div className="flex items-center gap-2.5 min-w-0 flex-1">
5353
{faviconUrl ? (
54-
<img src={faviconUrl} alt="favicon" className="size-4" />
54+
<img src={faviconUrl} alt="favicon" className="size-4 flex-shrink-0" />
5555
) : (
56-
<Link className="size-4 text-tertiary group-hover:text-primary" />
56+
<Link className="size-4 text-tertiary group-hover:text-primary flex-shrink-0" />
5757
)}
5858
<Tooltip tooltipContent={linkDetail.url} isMobile={isMobile}>
5959
<a
6060
href={linkDetail.url}
6161
target="_blank"
6262
rel="noopener noreferrer"
63-
className="truncate text-body-xs-regular cursor-pointer flex-grow flex items-center gap-3"
63+
className="flex-1 w-0 text-body-xs-regular cursor-pointer flex items-center gap-3"
6464
>
65-
{linkDetail.title && linkDetail.title !== "" ? linkDetail.title : linkDetail.url}
66-
65+
<span className="truncate">
66+
{linkDetail.title && linkDetail.title !== "" ? linkDetail.title : linkDetail.url}
67+
</span>
6768
{linkTitle && linkTitle !== "" && (
68-
<span className="text-placeholder text-caption-sm-regular">{linkTitle}</span>
69+
<span className="text-placeholder text-caption-sm-regular flex-shrink-0">{linkTitle}</span>
6970
)}
7071
</a>
7172
</Tooltip>

apps/web/core/components/issues/relations/issue-list-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const RelationIssueListItem = observer(function RelationIssueListItem(pro
126126
{issue && (
127127
<div className="group relative flex min-h-11 h-full w-full items-center px-1.5 py-1 transition-all hover:bg-surface-2">
128128
<span className="size-5 flex-shrink-0" />
129-
<div className="flex w-full truncate cursor-pointer items-center gap-3">
129+
<div className="flex flex-1 min-w-0 cursor-pointer items-center gap-3">
130130
<div className="flex-shrink-0">
131131
{projectDetail && (
132132
<IssueIdentifier
@@ -141,7 +141,7 @@ export const RelationIssueListItem = observer(function RelationIssueListItem(pro
141141
</div>
142142

143143
<Tooltip tooltipContent={issue.name} isMobile={isMobile}>
144-
<span className="w-full truncate text-13 text-primary">{issue.name}</span>
144+
<span className="flex-1 w-0 truncate text-13 text-primary">{issue.name}</span>
145145
</Tooltip>
146146
</div>
147147
<div

packages/tailwind-config/variables.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
/* Background colors */
298298
--background-color-canvas: var(--color-neutral-300);
299299
--background-color-surface-1: var(--color-neutral-white);
300-
--background-color-surface-2: var(--color-neutral-200);
300+
--background-color-surface-2: var(--color-neutral-100);
301301
--background-color-layer-1: var(--color-neutral-200);
302302
--background-color-layer-1-hover: var(--color-neutral-300);
303303
--background-color-layer-1-active: var(--color-neutral-400);
@@ -621,7 +621,7 @@
621621
/* Background colors */
622622
--background-color-canvas: var(--color-neutral-black);
623623
--background-color-surface-1: var(--color-neutral-100);
624-
--background-color-surface-2: var(--color-neutral-100);
624+
--background-color-surface-2: var(--color-neutral-200);
625625
--background-color-layer-1: var(--color-neutral-200);
626626
--background-color-layer-1-hover: var(--color-neutral-300);
627627
--background-color-layer-1-active: var(--color-neutral-400);

0 commit comments

Comments
 (0)