From 4e5747b19bc3bd6390a8bd72fb08a8d5b916bfb0 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 9 Oct 2024 13:00:34 +0530 Subject: [PATCH] Inline --- web/packages/base/components/Typography.tsx | 4 ++-- .../new/photos/components/gallery/BarImpl.tsx | 23 ++++++------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/web/packages/base/components/Typography.tsx b/web/packages/base/components/Typography.tsx index ba118157d3..518bef28fb 100644 --- a/web/packages/base/components/Typography.tsx +++ b/web/packages/base/components/Typography.tsx @@ -10,8 +10,8 @@ import { styled, Typography } from "@mui/material"; */ export const EllipsizedTypography = styled(Typography)` /* Initial value of overflow is visible. Set overflow (the handling of - content that is too small for the container in the inline direction) to - hidden instead. */ + content that is too small for the container in the inline direction) to + hidden instead. */ overflow: hidden; /* Specify handling of text when it overflows, asking the browser to insert ellipsis instead of clipping. */ diff --git a/web/packages/new/photos/components/gallery/BarImpl.tsx b/web/packages/new/photos/components/gallery/BarImpl.tsx index e7b0d40cbb..e7607793cb 100644 --- a/web/packages/new/photos/components/gallery/BarImpl.tsx +++ b/web/packages/new/photos/components/gallery/BarImpl.tsx @@ -509,31 +509,21 @@ const CollectionBarCard: React.FC = ({ coverFile={collectionSummary.coverFile} onClick={() => onSelectCollectionID(collectionSummary.id)} > - + {collectionSummary.name} {activeCollectionID === collectionSummary.id && } ); -interface CardTextProps { - text: string; -} - -const CardText: React.FC = ({ text }) => ( +const CardText: React.FC = ({ children }) => ( - + + {children} + ); -const TruncatedText: React.FC = ({ text }) => ( - - - {text} - - -); - const Ellipsized = styled(Typography)` overflow: hidden; text-overflow: ellipsis; @@ -541,6 +531,7 @@ const Ellipsized = styled(Typography)` -webkit-line-clamp: 2; // number of lines to show line-clamp: 2; -webkit-box-orient: vertical; + word-break: break-word; `; interface CollectionBarCardIconProps { @@ -602,7 +593,7 @@ const PersonCard: React.FC = ({ coverFaceID={person.displayFaceID} onClick={() => onSelectPerson(person)} > - {person.name && } + {person.name && {person.name}} {activePerson?.id === person.id && }