Fix truncation of threads/workspaces (#3610)

* fix truncation of threads/workspaces

* remove unneeded import
This commit is contained in:
Sean Hatfield 2025-04-07 17:42:00 -07:00 committed by GitHub
parent e2562133c6
commit 2c69b45cfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 5 deletions

View File

@ -10,7 +10,6 @@ import {
} from "@phosphor-icons/react";
import { useEffect, useRef, useState } from "react";
import { useParams } from "react-router-dom";
import truncate from "truncate";
const THREAD_CALLOUT_DETAIL_WIDTH = 26;
export default function ThreadItem({
@ -92,15 +91,15 @@ export default function ThreadItem({
href={
window.location.pathname === linkTo || ctrlPressed ? "#" : linkTo
}
className="w-full pl-2 py-1"
className="w-full pl-2 py-1 overflow-hidden"
aria-current={isActive ? "page" : ""}
>
<p
className={`text-left text-sm ${
className={`text-left text-sm truncate max-w-[165px] ${
isActive ? "font-medium text-white" : "text-theme-text-primary"
}`}
>
{truncate(thread.name, 25)}
{thread.name}
</p>
</a>
)}

View File

@ -134,7 +134,7 @@ export default function ActiveWorkspaces() {
className={`
text-[14px] leading-loose whitespace-nowrap overflow-hidden text-white
${isActive ? "font-bold" : "font-medium"} truncate
w-full group-hover:w-[100px] group-hover:font-bold group-hover:duration-200
w-full group-hover:w-[130px] group-hover:font-bold group-hover:duration-200
`}
>
{workspace.name}