Skip to content

armgit / ente

Public Imported from GitHub
0

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

fix(photos):preserve-search-height-and-face-crops

Aswin Asoke64e0ee204f5
diff --git a/web/apps/photos/src/components/SearchBar.tsx b/web/apps/photos/src/components/SearchBar.tsx
index 389442218c..39533b39e6 100644
--- a/web/apps/photos/src/components/SearchBar.tsx
+++ b/web/apps/photos/src/components/SearchBar.tsx
@@ -564,8 +564,8 @@ const createSelectStyles = (
}),
menuList: (style) => ({
...style,
- minHeight: "min(320px, max(0px, calc(100dvh - 280px)))",
- maxHeight: "min(320px, max(0px, calc(100dvh - 280px)))",
+ minHeight: "clamp(120px, calc(100dvh - 280px), 320px)",
+ maxHeight: "clamp(120px, calc(100dvh - 280px), 320px)",
display: "flex",
flexDirection: "column",
gap: "8px",
diff --git a/web/packages/new/photos/components/PeopleList.tsx b/web/packages/new/photos/components/PeopleList.tsx
index 165016473d..2f1cf02f33 100644
--- a/web/packages/new/photos/components/PeopleList.tsx
+++ b/web/packages/new/photos/components/PeopleList.tsx
@@ -10,7 +10,6 @@ import type {
} from "ente-new/photos/services/ml/people";
import { t } from "i18next";
import React, { useEffect, useState } from "react";
-import { ItemCard } from "./Tiles";
import { UnstyledButton } from "./UnstyledButton";
export interface SearchPeopleListProps {
@@ -30,11 +29,13 @@ export const SearchPeopleList: React.FC<SearchPeopleListProps> = ({
key={person.id}
onClick={() => onSelectPerson(person.id)}
>
- <ItemCard
- TileComponent={SearchPersonAvatar}
- coverFaceID={person.displayFaceID}
- coverFile={person.displayFaceFile}
- />
+ <SearchPersonAvatar>
+ <FaceCropImageView
+ faceID={person.displayFaceID}
+ file={person.displayFaceFile}
+ placeholderDimension={40}
+ />
+ </SearchPersonAvatar>
<Stack sx={{ flex: 1, minWidth: 0, gap: "4px" }}>
{person.name && (
<Typography