From dd1a117b9207056a89ba86ab413680a140db94f1 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 27 Nov 2026 23:13:31 +0100 Subject: [PATCH] feat(collections): show and edit the own notes of a saved place A saved place has carried notes for a while (the API and the assistant write them), but neither the phone sheet nor the desktop detail showed them, so notes written there were invisible. Both now show them under the description when there are any, and edit them beside it, through the shared form hook. Addresses discussion #3168. --- .../Collections/CollectionPlaceDetail.tsx | 15 +++++++++++-- .../useCollectionPlaceForm.test.ts | 21 +++++++++++++++++++ .../Collections/useCollectionPlaceForm.ts | 7 +++++++ .../screens/collections/MCollPlaceSheet.tsx | 15 +++++++++++-- shared/src/i18n/ar/collection.ts | 2 ++ shared/src/i18n/az/collection.ts | 2 ++ shared/src/i18n/br/collection.ts | 2 ++ shared/src/i18n/ca/collection.ts | 2 ++ shared/src/i18n/cs/collection.ts | 2 ++ shared/src/i18n/de/collection.ts | 2 ++ shared/src/i18n/en/collection.ts | 2 ++ shared/src/i18n/es/collection.ts | 2 ++ shared/src/i18n/et/collection.ts | 2 ++ shared/src/i18n/fr/collection.ts | 2 ++ shared/src/i18n/gr/collection.ts | 2 ++ shared/src/i18n/he/collection.ts | 2 ++ shared/src/i18n/hu/collection.ts | 2 ++ shared/src/i18n/id/collection.ts | 2 ++ shared/src/i18n/it/collection.ts | 2 ++ shared/src/i18n/ja/collection.ts | 2 ++ shared/src/i18n/ko/collection.ts | 2 ++ shared/src/i18n/nl/collection.ts | 2 ++ shared/src/i18n/pl/collection.ts | 2 ++ shared/src/i18n/ru/collection.ts | 2 ++ shared/src/i18n/sk/collection.ts | 2 ++ shared/src/i18n/sv/collection.ts | 2 ++ shared/src/i18n/th/collection.ts | 2 ++ shared/src/i18n/tr/collection.ts | 2 ++ shared/src/i18n/uk/collection.ts | 2 ++ shared/src/i18n/vi/collection.ts | 2 ++ shared/src/i18n/zh-TW/collection.ts | 2 ++ shared/src/i18n/zh/collection.ts | 2 ++ 32 files changed, 110 insertions(+), 4 deletions(-) diff --git a/client/src/components/Collections/CollectionPlaceDetail.tsx b/client/src/components/Collections/CollectionPlaceDetail.tsx index c7bf24169..c4612f9e5 100644 --- a/client/src/components/Collections/CollectionPlaceDetail.tsx +++ b/client/src/components/Collections/CollectionPlaceDetail.tsx @@ -32,7 +32,7 @@ interface CollectionPlaceDetailProps { anchorRect?: { left: number; width: number } | null onClose: () => void onSetStatus: (status: CollectionStatus) => void - onSave: (patch: { name?: string; description?: string | null; links?: CollectionLink[]; category_id?: number | null; label_ids?: number[]; image_url?: string | null; lat?: number | null; lng?: number | null; address?: string | null }) => Promise + onSave: (patch: { name?: string; description?: string | null; notes?: string | null; links?: CollectionLink[]; category_id?: number | null; label_ids?: number[]; image_url?: string | null; lat?: number | null; lng?: number | null; address?: string | null }) => Promise /** Upload a custom cover image (#1136); enables the cover change/remove controls. */ onUploadImage?: (file: File) => Promise onCopyToTrip: () => void @@ -74,7 +74,7 @@ export default function CollectionPlaceDetail({ const navigationTargets = getNavigationTargets(place) const descRef = useRef(null) const { - editing, setEditing, name, setName, categoryId, setCategoryId, description, setDescription, links, setLinks, setLink, + editing, setEditing, name, setName, categoryId, setCategoryId, description, setDescription, notes, setNotes, links, setLinks, setLink, labelIds, toggleLabel, address, setAddress, lat, setLat, lng, setLng, saving, imgBusy, cover: banner, assignedLabels, handleImagePick: handleCoverPick, handleImageRemove, cancelEdit: resetForm, save, } = useCollectionPlaceForm({ place, labels, onSave, onUploadImage, t, normalizeLinkUrl, withCoordinates: true }) @@ -226,6 +226,11 @@ export default function CollectionPlaceDetail({