Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(web): fix clipping of reader view in smaller screens

Mohamed Bassem41d2f0d73887
diff --git a/apps/web/components/dashboard/preview/LinkContentSection.tsx b/apps/web/components/dashboard/preview/LinkContentSection.tsx
index f4e344ac..d6e2b61b 100644
--- a/apps/web/components/dashboard/preview/LinkContentSection.tsx
+++ b/apps/web/components/dashboard/preview/LinkContentSection.tsx
@@ -2,7 +2,6 @@ import Image from "next/image";
import Link from "next/link";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { buttonVariants } from "@/components/ui/button";
-import { ScrollArea } from "@/components/ui/scroll-area";
import {
Select,
SelectContent,
@@ -148,9 +147,9 @@ export default function LinkContentSection({
);
} else if (section === "cached") {
content = (
- <ScrollArea className="h-full">
+ <div className="h-full w-full overflow-y-auto overflow-x-hidden px-3 sm:px-4">
<ReaderView
- className="prose mx-auto dark:prose-invert"
+ className="prose prose-neutral mx-auto max-w-none break-words dark:prose-invert [&_code]:break-all [&_img]:h-auto [&_img]:max-w-full [&_pre]:overflow-x-auto [&_table]:block [&_table]:overflow-x-auto"
style={{
fontFamily: READER_FONT_FAMILIES[settings.fontFamily],
fontSize: `${settings.fontSize}px`,
@@ -159,7 +158,7 @@ export default function LinkContentSection({
bookmarkId={bookmark.id}
readOnly={!isOwner}
/>
- </ScrollArea>
+ </div>
);
} else if (section === "archive") {
content = <FullPageArchiveSection link={bookmark.content} />;
@@ -172,7 +171,7 @@ export default function LinkContentSection({
}
return (
- <div className="flex h-full flex-col items-center gap-2">
+ <div className="flex h-full w-full min-w-0 flex-col items-center gap-2 overflow-hidden">
<div className="flex items-center gap-2">
<Select onValueChange={setSection} value={section}>
<SelectTrigger className="w-fit">
@@ -286,7 +285,7 @@ export default function LinkContentSection({
</Tooltip>
)}
</div>
- {content}
+ <div className="h-full w-full min-w-0 flex-1">{content}</div>
</div>
);
}