From e7690bdbce4babdd8b063568f9b9cdc110827fa3 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 1 Sep 2024 21:59:19 -0500 Subject: [PATCH] Remove 'Untitled' fallback in key views --- README.md | 1 - src/photo/PhotoLarge.tsx | 12 ++++-------- src/site/SiteChecklistClient.tsx | 10 ---------- src/site/config.ts | 3 --- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index eeec7040..d9f56e91 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,6 @@ Application behavior can be changed by configuring the following environment var - `NEXT_PUBLIC_MATTE_PHOTOS = 1` constrains the size of each photo, and enables a surrounding border (potentially useful for photos with tall aspect ratios) - `NEXT_PUBLIC_BLUR_DISABLED = 1` prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage) - `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data (⚠️ re-compresses uploaded images in order to remove GPS information) -- `NEXT_PUBLIC_HIDE_TITLE_FALLBACK_TEXT = 1` prevents showing "Untitled" for photos without titles - `NEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1` prevents `priority_order` field affecting photo order - `NEXT_PUBLIC_PUBLIC_API = 1` enables public API available at `/api` - `NEXT_PUBLIC_HIDE_REPO_LINK = 1` removes footer link to repo diff --git a/src/photo/PhotoLarge.tsx b/src/photo/PhotoLarge.tsx index 46b56f41..01fb21c3 100644 --- a/src/photo/PhotoLarge.tsx +++ b/src/photo/PhotoLarge.tsx @@ -25,10 +25,7 @@ import PhotoFilmSimulation from '@/simulation/PhotoFilmSimulation'; import { sortTags } from '@/tag'; import DivDebugBaselineGrid from '@/components/DivDebugBaselineGrid'; import PhotoLink from './PhotoLink'; -import { - SHOULD_PREFETCH_ALL_LINKS, - SHOW_PHOTO_TITLE_FALLBACK_TEXT, -} from '@/site/config'; +import { SHOULD_PREFETCH_ALL_LINKS } from '@/site/config'; import AdminPhotoMenuClient from '@/admin/AdminPhotoMenuClient'; import { RevalidatePhoto } from './InfinitePhotoScroll'; import { useRef } from 'react'; @@ -89,10 +86,9 @@ export default function PhotoLarge({ const { arePhotosMatted, isUserSignedIn } = useAppState(); - const hasTitle = showTitle && ( - Boolean(photo.title) || - SHOW_PHOTO_TITLE_FALLBACK_TEXT - ); + const hasTitle = + showTitle && + Boolean(photo.title); const hasTitleContent = hasTitle || diff --git a/src/site/SiteChecklistClient.tsx b/src/site/SiteChecklistClient.tsx index e1a82753..f1d4772a 100644 --- a/src/site/SiteChecklistClient.tsx +++ b/src/site/SiteChecklistClient.tsx @@ -59,7 +59,6 @@ export default function SiteChecklistClient({ arePhotosMatted, isBlurEnabled, isGeoPrivacyEnabled, - showPhotoTitleFallbackText, isPriorityOrderEnabled, isAiTextGenerationEnabled, aiTextAutoGeneratedFields, @@ -507,15 +506,6 @@ export default function SiteChecklistClient({ collection/display of location-based data: {renderEnvVars(['NEXT_PUBLIC_GEO_PRIVACY'])} - - Set environment variable to {'"1"'} to prevent - showing {'"Untitled"'} for photos without titles: - {renderEnvVars(['NEXT_PUBLIC_HIDE_TITLE_FALLBACK_TEXT'])} -