π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
revert(ListHeader):beyond-scope-view-changes
Aswin Asok5dd14472f05c
diff --git a/web/apps/photos/src/components/Collections/CollectionHeader.tsx b/web/apps/photos/src/components/Collections/CollectionHeader.tsxindex fbfaedc961..0839282c7c 100644--- a/web/apps/photos/src/components/Collections/CollectionHeader.tsx+++ b/web/apps/photos/src/components/Collections/CollectionHeader.tsx@@ -97,7 +97,7 @@ export interface CollectionHeaderProps {}export const CollectionHeader: React.FC<CollectionHeaderProps> = (props) => {- const { activeCollection, collectionSummary } = props;+ const { collectionSummary } = props;const { name, type, attributes, fileCount } = collectionSummary;@@ -121,9 +121,6 @@ export const CollectionHeader: React.FC<CollectionHeaderProps> = (props) => {<GalleryItemsSummaryname={name}fileCount={fileCount}- description={- activeCollection?.pubMagicMetadata?.data.caption- }endIcon={<EndIcon />}/>{shouldShowOptions(type) && (diff --git a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsxindex ac2b725151..5b60d83103 100644--- a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx+++ b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx@@ -23,7 +23,6 @@ import type { Collection } from "ente-media/collection";import {GalleryItemsHeaderAdapter,GalleryItemsSummary,- galleryItemsSummaryDescriptionHeight,} from "ente-new/photos/components/gallery/ListHeader";import {collectionsSortBy,@@ -210,12 +209,7 @@ export const GalleryBarAndListHeader: React.FC<) : (<></>),- height:- 68 +- (shouldRenderCollectionHeader &&- activeCollection?.pubMagicMetadata?.data.caption?.trim()- ? galleryItemsSummaryDescriptionHeight- : 0),+ height: 68,});// eslint-disable-next-line react-hooks/exhaustive-deps}, [diff --git a/web/packages/new/photos/components/gallery/ListHeader.tsx b/web/packages/new/photos/components/gallery/ListHeader.tsxindex 1dec44a081..bce71a4456 100644--- a/web/packages/new/photos/components/gallery/ListHeader.tsx+++ b/web/packages/new/photos/components/gallery/ListHeader.tsx@@ -12,25 +12,15 @@ interface GalleryItemsSummaryProps {name: string;nameProps?: TypographyProps;fileCount: number;- description?: string;endIcon?: React.ReactNode;// This cannot be the only way to invoke the action; it is mouse-only.onNameClick?: () => void;}-const descriptionMaxLines = 3;-const descriptionLineHeight = 17;-const descriptionTopSpacing = 8;--// ponytail: fixed 3-line reserve, measure if short descriptions leave visible slack.-export const galleryItemsSummaryDescriptionHeight =- descriptionTopSpacing + descriptionMaxLines * descriptionLineHeight;-export const GalleryItemsSummary: React.FC<GalleryItemsSummaryProps> = ({name,nameProps,fileCount,- description,endIcon,onNameClick,}) => (@@ -56,24 +46,6 @@ export const GalleryItemsSummary: React.FC<GalleryItemsSummaryProps> = ({</Box>)}</Stack>- {description?.trim() && (- <Typography- variant="small"- sx={{- color: "text.muted",- mt: `${descriptionTopSpacing}px`,- height: `${descriptionMaxLines * descriptionLineHeight}px`,- lineHeight: `${descriptionLineHeight}px`,- overflow: "hidden",- textOverflow: "ellipsis",- display: "-webkit-box",- WebkitLineClamp: descriptionMaxLines,- WebkitBoxOrient: "vertical",- }}- >- {description.trim()}- </Typography>- )}</div>);