π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Revert "[web][photos] Reserve two lines for mobile gallery titles"
AswinAsok2442b3c481f1
diff --git a/web/apps/photos/src/components/collections/CollectionHeader.tsx b/web/apps/photos/src/components/collections/CollectionHeader.tsxindex 44c123973d..b6cd49b643 100644--- a/web/apps/photos/src/components/collections/CollectionHeader.tsx+++ b/web/apps/photos/src/components/collections/CollectionHeader.tsx@@ -1,8 +1,4 @@import type { RemotePullOpts } from "@/components/gallery";-import {- isAlbumSummary,- twoLineMobileTitleSx,-} from "@/components/gallery/header-layout";import { downloadAndSaveCollectionFiles } from "@/services/save";import {CleanIcon,@@ -186,7 +182,9 @@ export const CollectionHeader: React.FC<CollectionHeaderProps> = (props) => {)}<GalleryItemsSummarynameProps={- isAlbum ? { sx: twoLineMobileTitleSx } : undefined+ isAlbum+ ? { sx: { overflowWrap: "anywhere" } }+ : undefined}name={name}description={isAlbum ? undefined : description}@@ -220,6 +218,9 @@ export const CollectionHeader: React.FC<CollectionHeaderProps> = (props) => {);};+const isAlbumSummary = ({ type }: CollectionSummary) =>+ type == "album" || type == "folder" || type == "sharedIncoming";+const shouldShowOptions = (type: CollectionSummaryType) =>type != "all" && type != "archiveItems";diff --git a/web/apps/photos/src/components/collections/GalleryBarAndListHeader.tsx b/web/apps/photos/src/components/collections/GalleryBarAndListHeader.tsxindex ecc0d20081..bc0ede89f6 100644--- a/web/apps/photos/src/components/collections/GalleryBarAndListHeader.tsx+++ b/web/apps/photos/src/components/collections/GalleryBarAndListHeader.tsx@@ -1,4 +1,3 @@-import { isAlbumSummary } from "@/components/gallery/header-layout";// TODO: Audit this fileimport {CollectionShare,@@ -8,7 +7,6 @@ import {import type { FileListHeaderOrFooter } from "@/components/FileList";import { PeopleHeader } from "@/components/gallery/PeopleHeader";import type { GalleryBarMode } from "@/components/gallery/reducer";-import { useIsSmallWidth } from "ente-base/components/utils/hooks";import { useModalVisibility } from "ente-base/components/utils/modal";import type { Collection } from "ente-media/collection";import {@@ -100,12 +98,6 @@ export const GalleryBarAndListHeader: React.FC<collectionShareVisibilityProps.onClose();}, [collectionShareVisibilityProps]);- const isSmallWidth = useIsSmallWidth();- const hasTwoLineTitle =- isSmallWidth &&- (!!activePerson ||- (!!collectionSummary && isAlbumSummary(collectionSummary)));-const albumDescription =activeCollection?.pubMagicMetadata?.data.caption?.trim();const [descriptionHeight, setDescriptionHeight] = useState(0);@@ -157,10 +149,7 @@ export const GalleryBarAndListHeader: React.FC<) : (<></>),- height:- 72 +- (hasTwoLineTitle ? 32 : 0) +- (albumDescription ? descriptionHeight : 0),+ height: 72 + (albumDescription ? descriptionHeight : 0),});// eslint-disable-next-line react-hooks/exhaustive-deps}, [@@ -181,7 +170,6 @@ export const GalleryBarAndListHeader: React.FC<onCollectionSlideshow,onBackToAlbums,onEditAlbumDetails,- hasTwoLineTitle,albumDescription,descriptionHeight,// TODO: Clusterdiff --git a/web/apps/photos/src/components/gallery/PeopleHeader.tsx b/web/apps/photos/src/components/gallery/PeopleHeader.tsxindex 59f8e5c37e..2c9790eed1 100644--- a/web/apps/photos/src/components/gallery/PeopleHeader.tsx+++ b/web/apps/photos/src/components/gallery/PeopleHeader.tsx@@ -1,4 +1,3 @@-import { twoLineMobileTitleSx } from "@/components/gallery/header-layout";import { useWrapAsyncOperation } from "@/components/utils/use-wrap-async";import AddIcon from "@mui/icons-material/Add";import CheckIcon from "@mui/icons-material/Check";@@ -146,7 +145,7 @@ const PersonHeaderSummary = ({fileCount={person.fileIDs.length}nameProps={{...summaryProps.nameProps,- sx: twoLineMobileTitleSx,+ sx: { overflowWrap: "anywhere" },}}/></Stack>diff --git a/web/apps/photos/src/components/gallery/header-layout.ts b/web/apps/photos/src/components/gallery/header-layout.tsdeleted file mode 100644index ae9f8971f9..0000000000--- a/web/apps/photos/src/components/gallery/header-layout.ts+++ /dev/null@@ -1,13 +0,0 @@-import type { CollectionSummary } from "ente-new/photos/services/collection-summary";--export const isAlbumSummary = ({ type }: CollectionSummary) =>- type == "album" || type == "folder" || type == "sharedIncoming";--export const twoLineMobileTitleSx = {- overflowWrap: "anywhere",- minHeight: { xs: "64px", sm: 0 },- display: { xs: "-webkit-box", sm: "block" },- overflow: { xs: "hidden", sm: "visible" },- WebkitBoxOrient: "vertical",- WebkitLineClamp: { xs: 2, sm: "unset" },-} as const;