From a4eb435f1a9f64cde8a84357ea186de9072364d8 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 13 Jul 2024 10:54:24 -0600 Subject: [PATCH] Improve safari image scrolling performance (#12429) * Don't set z-height on iOS * More z-index cleanup --- web/src/components/indicators/Chip.tsx | 4 +- .../player/PreviewThumbnailPlayer.tsx | 42 ++++++++++++------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/web/src/components/indicators/Chip.tsx b/web/src/components/indicators/Chip.tsx index d8ba7fa279..e484f2f5aa 100644 --- a/web/src/components/indicators/Chip.tsx +++ b/web/src/components/indicators/Chip.tsx @@ -1,6 +1,7 @@ import { cn } from "@/lib/utils"; import { LogSeverity } from "@/types/log"; import { ReactNode, useMemo, useRef } from "react"; +import { isIOS } from "react-device-detect"; import { CSSTransition } from "react-transition-group"; type ChipProps = { @@ -34,8 +35,9 @@ export default function Chip({
diff --git a/web/src/components/player/PreviewThumbnailPlayer.tsx b/web/src/components/player/PreviewThumbnailPlayer.tsx index c8a8c060f4..147fb9de7b 100644 --- a/web/src/components/player/PreviewThumbnailPlayer.tsx +++ b/web/src/components/player/PreviewThumbnailPlayer.tsx @@ -26,6 +26,7 @@ import { NoThumbSlider } from "../ui/slider"; import { PREVIEW_FPS, PREVIEW_PADDING } from "@/types/preview"; import { capitalizeFirstLetter } from "@/utils/stringUtil"; import { baseUrl } from "@/api/baseUrl"; +import { cn } from "@/lib/utils"; type PreviewPlayerProps = { review: ReviewSegment; @@ -229,8 +230,15 @@ export default function PreviewThumbnailPlayer({ onImgLoad(); }} /> - -
+ {!playingBack && ( +
+ )} +
{!playingBack && ( - <> -
-
-
- {review.end_time ? ( - - ) : ( -
- -
- )} - {formattedDate} -
+
+
+ {review.end_time ? ( + + ) : ( +
+ +
+ )} + {formattedDate}
- +
)}