Skip to content

armgit / ente

Public Imported from GitHub
0

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

fix(photos):share-gallery-padding-with-people-overview

Aswin Asok68f784ff1db9
diff --git a/web/apps/photos/src/components/gallery/PeopleOverview.tsx b/web/apps/photos/src/components/gallery/PeopleOverview.tsx
index bb1da30e38..85f550a43e 100644
--- a/web/apps/photos/src/components/gallery/PeopleOverview.tsx
+++ b/web/apps/photos/src/components/gallery/PeopleOverview.tsx
@@ -9,6 +9,7 @@ import {
} from "@mui/material";
import { ItemCard } from "ente-new/photos/components/Tiles";
import { UnstyledButton } from "ente-new/photos/components/UnstyledButton";
+import { thumbnailGridPadding } from "ente-new/photos/components/utils/thumbnail-grid-layout";
import type { Person } from "ente-new/photos/services/ml/people";
import { t } from "i18next";
import { useMemo } from "react";
@@ -36,7 +37,7 @@ export const PeopleOverview = ({
flex: 1,
minHeight: 0,
overflow: "hidden",
- p: { xs: "16px 14px", md: "36px" },
+ px: `${thumbnailGridPadding}px`,
gap: "24px",
}}
>
diff --git a/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx b/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx
index d2fa10e519..85dd2a1796 100644
--- a/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx
+++ b/web/apps/photos/src/components/gallery/PhotosNavigationShell.tsx
@@ -108,14 +108,6 @@ export const PhotosNavigationShell: React.FC<
setNavigationCollapsed(false);
if (mobile) showMobileNavigation();
};
- const hasContentPadding =
- showRail &&
- !(
- props.mode == "people" &&
- !props.isInSearchMode &&
- galleryBarProps &&
- !galleryBarProps.activePerson
- );
return (
<Stack
sx={(theme) => ({
@@ -221,13 +213,13 @@ export const PhotosNavigationShell: React.FC<
flex: 1,
minWidth: 0,
minHeight: 0,
- pt: hasContentPadding
+ pt: showRail
? {
xs: `${thumbnailGridPadding}px`,
md: "36px",
}
: 0,
- px: hasContentPadding ? { xs: 0, md: "12px" } : 0,
+ px: showRail ? { xs: 0, md: "12px" } : 0,
...(showRail && {
"--mui-palette-background-default": "#FFFFFF",
bgcolor: "background.default",