Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

deprecate half

Manav Rathid8d5e628882a
diff --git a/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx b/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx
index 9f23770ec5..8d8939350d 100644
--- a/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx
+++ b/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx
@@ -1,8 +1,9 @@
+import { AllCollectionTile } from "@/new/photos/components/ItemCards";
import type { CollectionSummary } from "@/new/photos/types/collection";
import { Typography } from "@mui/material";
import { t } from "i18next";
import CollectionCard from "../CollectionCard";
-import { AllCollectionTile, AllCollectionTileText } from "../styledComponents";
+import { AllCollectionTileText } from "../styledComponents";
interface Iprops {
collectionSummary: CollectionSummary;
diff --git a/web/apps/photos/src/components/Collections/CollectionSelector/AddCollectionButton.tsx b/web/apps/photos/src/components/Collections/CollectionSelector/AddCollectionButton.tsx
index 0b2245744c..1037b7031e 100644
--- a/web/apps/photos/src/components/Collections/CollectionSelector/AddCollectionButton.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionSelector/AddCollectionButton.tsx
@@ -1,10 +1,8 @@
+import { AllCollectionTile } from "@/new/photos/components/ItemCards";
import { CenteredFlex, Overlay } from "@ente/shared/components/Container";
import { styled } from "@mui/material";
import CollectionCard from "components/Collections/CollectionCard";
-import {
- AllCollectionTile,
- AllCollectionTileText,
-} from "components/Collections/styledComponents";
+import { AllCollectionTileText } from "components/Collections/styledComponents";
import { t } from "i18next";
const ImageContainer = styled(Overlay)`
diff --git a/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx b/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx
index 0642e49df9..5299703ecb 100644
--- a/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx
@@ -1,7 +1,8 @@
+import { AllCollectionTile } from "@/new/photos/components/ItemCards";
import type { CollectionSummary } from "@/new/photos/types/collection";
import { Typography } from "@mui/material";
import CollectionCard from "../CollectionCard";
-import { AllCollectionTile, AllCollectionTileText } from "../styledComponents";
+import { AllCollectionTileText } from "../styledComponents";
interface Iprops {
collectionSummary: CollectionSummary;
diff --git a/web/apps/photos/src/components/Collections/styledComponents.ts b/web/apps/photos/src/components/Collections/styledComponents.ts
index daedc736b5..d6b7e1e9c0 100644
--- a/web/apps/photos/src/components/Collections/styledComponents.ts
+++ b/web/apps/photos/src/components/Collections/styledComponents.ts
@@ -10,27 +10,6 @@ export const ScrollContainer = styled("div")`
gap: 4px;
`;
-/** See also: {@link ItemTile}. */
-export const CollectionTile = styled("div")`
- display: flex;
- position: relative;
- border-radius: 4px;
- overflow: hidden;
- cursor: pointer;
- & > img {
- object-fit: cover;
- width: 100%;
- height: 100%;
- pointer-events: none;
- }
- user-select: none;
-`;
-
-export const AllCollectionTile = styled(CollectionTile)`
- width: 150px;
- height: 150px;
-`;
-
export const AllCollectionTileText = styled(Overlay)`
padding: 8px;
background: linear-gradient(
diff --git a/web/packages/new/photos/components/ItemCards.tsx b/web/packages/new/photos/components/ItemCards.tsx
index 2153e51854..f16ca95777 100644
--- a/web/packages/new/photos/components/ItemCards.tsx
+++ b/web/packages/new/photos/components/ItemCards.tsx
@@ -61,10 +61,8 @@ export const ItemCard: React.FC<React.PropsWithChildren<ItemCardProps>> = ({
};
/**
- * A generic "base" tile, meant to be used as the {@link TileComponent} provided
- * to an {@link ItemCard}.
- *
- * Currently a verbatim copy of the deprecated {@link CollectionTile}.
+ * A generic "base" tile, meant to be used (after setting dimensions) as the
+ * {@link TileComponent} provided to an {@link ItemCard}.
*/
export const ItemTile = styled("div")`
display: flex;
@@ -97,3 +95,12 @@ export const BarItemTile = styled(ItemTile)`
width: 90px;
height: 64px;
`;
+
+/**
+ * A large 150x150 TileComponent used when showing the list of all collections
+ * in the all collections view.
+ */
+export const AllCollectionTile = styled(ItemTile)`
+ width: 150px;
+ height: 150px;
+`;