π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix embed layout padding and thumbnail overflow issues
Manav Rathi9f72963e2331
diff --git a/web/CLAUDE.md b/web/CLAUDE.mdindex 0e9c199f9f..7d9dce5ba0 100644--- a/web/CLAUDE.md+++ b/web/CLAUDE.md@@ -5,7 +5,7 @@When making commits, follow these rules:- Keep messages CONCISE (no walls of text)-- Subject line under 72 chars (no body text - only Co-Authored-By line)+- Subject line under 72 chars as a single sentence (no body text, no bullets, no lists - only Co-Authored-By line)- NO emojis- NO promotional text or links (except Co-Authored-By line)- Use ONLY "Co-Authored-By: Claude <[email protected]>" for attributiondiff --git a/web/apps/embed/src/components/EmbedFileList.tsx b/web/apps/embed/src/components/EmbedFileList.tsxindex 15143cfcfe..9c1ac42ac5 100644--- a/web/apps/embed/src/components/EmbedFileList.tsx+++ b/web/apps/embed/src/components/EmbedFileList.tsx@@ -27,12 +27,17 @@ export interface EmbedFileListProps {const THUMBNAIL_SIZE = 200;const THUMBNAIL_GAP = 4;+const CONTAINER_PADDING = 4;export const EmbedFileList: React.FC<EmbedFileListProps> = memo(({ width, height, annotatedFiles, onItemClick, header, footer }) => {- const columns = Math.floor(width / (THUMBNAIL_SIZE + THUMBNAIL_GAP));+ const availableWidth = width - 2 * CONTAINER_PADDING;+ const columns = Math.max(+ 1,+ Math.floor(availableWidth / (THUMBNAIL_SIZE + THUMBNAIL_GAP)),+ );const actualThumbnailSize =- (width - (columns - 1) * THUMBNAIL_GAP) / columns;+ (availableWidth - (columns - 1) * THUMBNAIL_GAP) / columns;return (<Container style={{ width, height }}>@@ -139,12 +144,16 @@ const EmbedFileTile: React.FC<EmbedFileTileProps> = memo(EmbedFileTile.displayName = "EmbedFileTile";-const Container = styled("div")({ overflow: "auto", padding: THUMBNAIL_GAP });+const Container = styled("div")({+ overflow: "auto",+ padding: `${CONTAINER_PADDING}px`,+});const Grid = styled("div")<{ columns: number; gap: number }>(({ columns, gap }) => ({display: "grid",gridTemplateColumns: `repeat(${columns}, 1fr)`,+ gridAutoRows: "min-content",gap: `${gap}px`,}),);diff --git a/web/apps/embed/src/components/EmbedFileListWithViewer.tsx b/web/apps/embed/src/components/EmbedFileListWithViewer.tsxindex 2d759e4c3f..366d7c78e0 100644--- a/web/apps/embed/src/components/EmbedFileListWithViewer.tsx+++ b/web/apps/embed/src/components/EmbedFileListWithViewer.tsx@@ -75,7 +75,7 @@ export const EmbedFileListWithViewer: React.FC<display: "flex",flexDirection: "column",alignItems: "flex-end",- marginRight: "16px",+ marginRight: "4px",fontSize: "0.8em","&:hover .powered-text": {color: "text.base",