a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

editor post title now wraps instead of overflow

celine 17e86192 de7eda9d

+19 -11
+12 -9
components/Pages/PublicationMetadata.tsx
··· 24 24 }) => { 25 25 let { rep } = useReplicache(); 26 26 let { data: pub } = useLeafletPublicationData(); 27 - let title = 28 - useSubscribe(rep, (tx) => tx.get<string>("publication_title")) || 29 - pub?.title || 30 - ""; 31 - let description = 32 - useSubscribe(rep, (tx) => tx.get<string>("publication_description")) || 33 - pub?.description || 34 - ""; 27 + let title = useSubscribe(rep, (tx) => tx.get<string>("publication_title")); 28 + let description = useSubscribe(rep, (tx) => 29 + tx.get<string>("publication_description"), 30 + ); 31 + 35 32 let record = pub?.documents?.data as PubLeafletDocument.Record | null; 36 33 let publishedAt = record?.publishedAt; 37 34 38 35 if (!pub || !pub.publications) return null; 39 36 37 + if (typeof title !== "string") { 38 + title = pub?.title || ""; 39 + } 40 + if (typeof description !== "string") { 41 + description = pub?.description || ""; 42 + } 40 43 return ( 41 44 <div 42 45 className={`flex flex-col px-3 sm:px-4 pb-5 ${cardBorderHidden ? "sm:pt-6 pt-0" : "sm:pt-3 pt-2"}`} ··· 52 55 Editor 53 56 </div> 54 57 </div> 55 - <AsyncValueInput 58 + <AsyncValueAutosizeTextarea 56 59 className="text-xl font-bold outline-none bg-transparent" 57 60 value={title} 58 61 onChange={async (e) => {
+7 -2
components/utils/AutosizeTextarea.tsx
··· 18 18 19 19 return ( 20 20 <div 21 - className={`${styles["grow-wrap"]} ${props.className}`} 21 + className={`${styles["grow-wrap"]} ${props.className} `} 22 22 data-replicated-value={props.value} 23 23 style={props.style} 24 24 > 25 - <textarea rows={1} {...props} ref={textarea} /> 25 + <textarea 26 + rows={1} 27 + {...props} 28 + ref={textarea} 29 + className="placeholder:text-tertiary bg-transparent" 30 + /> 26 31 </div> 27 32 ); 28 33 },