Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Truncation fixes

Tim Wilson5c3e70547bb8
diff --git a/apps/web/ui/folders/folder-card.tsx b/apps/web/ui/folders/folder-card.tsx
index 0ca8b3f22f..98130d023d 100644
--- a/apps/web/ui/folders/folder-card.tsx
+++ b/apps/web/ui/folders/folder-card.tsx
@@ -174,8 +174,8 @@ export const FolderCard = ({ folder }: { folder: Folder }) => {
</div>
<div>
- <span className="inline-flex items-center justify-start gap-1.5 truncate text-sm font-medium text-gray-900">
- {folder.name}
+ <span className="flex items-center justify-start gap-1.5 truncate text-sm font-medium text-gray-900">
+ <span className="truncate">{folder.name}</span>
{folder.id === "unsorted" && (
<div className="rounded bg-gray-100 p-1">
diff --git a/apps/web/ui/folders/folder-switcher.tsx b/apps/web/ui/folders/folder-switcher.tsx
index 9378a3f897..679f2399f3 100644
--- a/apps/web/ui/folders/folder-switcher.tsx
+++ b/apps/web/ui/folders/folder-switcher.tsx
@@ -82,7 +82,7 @@ export const FolderSwitcher = () => {
}
return (
- <>
+ <div className="flex items-center">
<AddFolderModal />
{!isAllLinksFolderSelected && (
@@ -110,8 +110,8 @@ export const FolderSwitcher = () => {
setOpenPopover={setOpenPopover}
align="start"
>
- <button className="group -my-1 flex items-center gap-2 rounded-lg py-1 pl-2 pr-1 transition-colors duration-75 hover:bg-gray-100 data-[state=open]:bg-gray-200">
- <h1 className="text-xl font-semibold leading-7 text-neutral-900 md:text-2xl">
+ <button className="group -my-1 flex min-w-0 items-center gap-2 rounded-lg py-1 pl-2 pr-1 transition-colors duration-75 hover:bg-gray-100 data-[state=open]:bg-gray-200">
+ <h1 className="min-w-0 truncate text-left text-xl font-semibold leading-7 text-neutral-900 md:text-2xl">
{selectedFolder?.name}
</h1>
<ChevronsUpDown
@@ -127,7 +127,7 @@ export const FolderSwitcher = () => {
onDelete={() => onFolderSelect(allLinksOverview)}
/>
)}
- </>
+ </div>
);
};
@@ -176,11 +176,11 @@ const FolderList = ({
>
<FolderAccessIcon folder={folder} withBorder={false} />
<span
- className={`inline-flex items-center justify-start gap-1.5 truncate text-sm sm:max-w-[140px] ${
+ className={`flex items-center justify-start gap-1.5 text-sm sm:max-w-[140px] ${
selectedFolder?.id === folder.id ? "font-medium" : "font-normal"
}`}
>
- {folder.name}
+ <span className="truncate">{folder.name}</span>
{folder.id === "unsorted" && (
<div className="rounded bg-gray-100 p-1">
diff --git a/apps/web/ui/layout/page-content/index.tsx b/apps/web/ui/layout/page-content/index.tsx
index b246683e1c..e8659e41e1 100644
--- a/apps/web/ui/layout/page-content/index.tsx
+++ b/apps/web/ui/layout/page-content/index.tsx
@@ -16,10 +16,10 @@ export function PageContent({
<div className="bg-neutral-100 md:bg-white">
<MaxWidthWrapper className={cn("mt-3", hasTitle && "md:mt-6 md:py-3")}>
<div className="flex items-center justify-between gap-4">
- <div className="flex items-center gap-4">
+ <div className="flex min-w-0 items-center gap-4">
<NavButton />
{hasTitle && (
- <TitleComponent className="text-xl font-semibold leading-7 text-neutral-900 md:text-2xl">
+ <TitleComponent className="min-w-0 text-xl font-semibold leading-7 text-neutral-900 md:text-2xl">
{title}
</TitleComponent>
)}