From 38cb7068ef0111f5171beb4829e12c0b640a8638 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Fri, 16 Jan 2026 19:04:13 +0100 Subject: [PATCH] style(search): remove redundant search label on TV search page --- components/ItemContent.tv.tsx | 96 ++++++++++++++++++++++++++-- components/ItemTechnicalDetails.tsx | 2 +- components/MediaSourceButton.tsx | 2 +- components/SubtitleTrackSelector.tsx | 4 +- components/search/TVSearchPage.tsx | 9 --- 5 files changed, 96 insertions(+), 17 deletions(-) diff --git a/components/ItemContent.tv.tsx b/components/ItemContent.tv.tsx index b742c175..a26dde7e 100644 --- a/components/ItemContent.tv.tsx +++ b/components/ItemContent.tv.tsx @@ -467,6 +467,88 @@ const TVOptionCard: React.FC<{ ); }; +// Glass-style back button for TV (Apple TV design) +const TVBackButton: React.FC<{ + onPress: () => void; +}> = ({ onPress }) => { + const [focused, setFocused] = useState(false); + const scale = useRef(new Animated.Value(1)).current; + + const animateTo = (v: number) => + Animated.timing(scale, { + toValue: v, + duration: 150, + easing: Easing.out(Easing.quad), + useNativeDriver: true, + }).start(); + + return ( + { + setFocused(true); + animateTo(1.08); + }} + onBlur={() => { + setFocused(false); + animateTo(1); + }} + style={{ alignSelf: "flex-start", marginBottom: 20 }} + > + + + + + + Back + + + + + + ); +}; + // Button to open option selector const TVOptionButton: React.FC<{ label: string; @@ -735,7 +817,9 @@ export const ItemContentTV: React.FC = React.memo( const track = subtitleTracks.find( (t) => t.Index === selectedOptions?.subtitleIndex, ); - return track?.DisplayTitle || track?.Language || t("item_card.subtitles"); + return ( + track?.DisplayTitle || track?.Language || t("item_card.subtitles.label") + ); }, [subtitleTracks, selectedOptions?.subtitleIndex, t]); const selectedMediaSourceLabel = useMemo(() => { @@ -838,13 +922,17 @@ export const ItemContentTV: React.FC = React.memo( minHeight: SCREEN_HEIGHT * 0.45, }} > - {/* Left side - Poster */} + {/* Left side - Back button + Poster */} + {/* Glass back button */} + router.back()} /> + + {/* Poster */} = React.memo( {(subtitleTracks.length > 0 || selectedOptions?.subtitleIndex !== undefined) && ( setOpenModal("subtitle")} /> @@ -1233,7 +1321,7 @@ export const ItemContentTV: React.FC = React.memo( setOpenModal(null)} diff --git a/components/ItemTechnicalDetails.tsx b/components/ItemTechnicalDetails.tsx index 49614a2c..5708318d 100644 --- a/components/ItemTechnicalDetails.tsx +++ b/components/ItemTechnicalDetails.tsx @@ -77,7 +77,7 @@ export const ItemTechnicalDetails: React.FC = ({ source }) => { - {t("item_card.subtitles")} + {t("item_card.subtitles.label")} = ({ })); groups.push({ - title: t("item_card.subtitles"), + title: t("item_card.subtitles.label"), options: [noneOption, ...subtitleOptions], }); } diff --git a/components/SubtitleTrackSelector.tsx b/components/SubtitleTrackSelector.tsx index 6fca1955..12c68e5c 100644 --- a/components/SubtitleTrackSelector.tsx +++ b/components/SubtitleTrackSelector.tsx @@ -76,7 +76,7 @@ export const SubtitleTrackSelector: React.FC = ({ const trigger = ( - {t("item_card.subtitles")} + {t("item_card.subtitles.label")} = ({ = ({ {/* Example Searches (when no search query) */} {!loading && debouncedSearch.length === 0 && ( - - {t("search.search")} -