this repo has no description
10
fork

Configure Feed

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

fix(profile): make description optional

Allow registry profiles to save without a description and avoid rendering empty description blocks on public profile surfaces.

Made-with: Cursor

+15 -13
+3 -1
components/explore/ProfileCard.tsx
··· 59 59 )} 60 60 </div> 61 61 <p class="profile-card-handle">@{profile.handle}</p> 62 - <p class="profile-card-description">{profile.description}</p> 62 + {profile.description && ( 63 + <p class="profile-card-description">{profile.description}</p> 64 + )} 63 65 <p class="profile-card-meta"> 64 66 {cats.map((c) => ( 65 67 <span key={c} class="profile-card-category">
+3 -1
components/explore/ProfileHero.tsx
··· 68 68 </span> 69 69 ))} 70 70 </div> 71 - <p class="profile-hero-description">{profile.description}</p> 71 + {profile.description && ( 72 + <p class="profile-hero-description">{profile.description}</p> 73 + )} 72 74 </div> 73 75 </div> 74 76 );
+1 -2
islands/CreateProfileForm.tsx
··· 724 724 725 725 <label class="profile-form-field"> 726 726 <span class="profile-form-label"> 727 - {tForm.descriptionLabel} <em class="profile-form-required">*</em> 727 + {tForm.descriptionLabel} 728 728 </span> 729 729 <textarea 730 - required 731 730 maxLength={500} 732 731 rows={3} 733 732 placeholder={tForm.descriptionPlaceholder}
+2 -3
lexicons/com/atmosphereaccount/registry/profile.json
··· 8 8 "key": "literal:self", 9 9 "record": { 10 10 "type": "object", 11 - "required": ["name", "description", "categories", "createdAt"], 11 + "required": ["name", "categories", "createdAt"], 12 12 "properties": { 13 13 "name": { 14 14 "type": "string", ··· 19 19 }, 20 20 "description": { 21 21 "type": "string", 22 - "minLength": 1, 23 22 "maxLength": 500, 24 23 "maxGraphemes": 500, 25 - "description": "Short description of the project." 24 + "description": "Optional short description of the project." 26 25 }, 27 26 "mainLink": { 28 27 "type": "string",
+6 -6
lib/lexicons.ts
··· 312 312 ) { 313 313 return { ok: false, error: "name: 1..60 chars required" }; 314 314 } 315 - if ( 316 - !isStr(v.description) || (v.description as string).length < 1 || 317 - (v.description as string).length > 500 318 - ) { 319 - return { ok: false, error: "description: 1..500 chars required" }; 315 + const normalizedDescription = typeof v.description === "string" 316 + ? v.description.trim() 317 + : ""; 318 + if (normalizedDescription.length > 500) { 319 + return { ok: false, error: "description: must be <=500 chars" }; 320 320 } 321 321 // mainLink: optional in the lexicon for backward compat, but if present 322 322 // must parse as an http(s) URL <=512 chars. The registry UI / API both ··· 410 410 value: { 411 411 $type: PROFILE_NSID, 412 412 name: v.name as string, 413 - description: v.description as string, 413 + description: normalizedDescription, 414 414 mainLink: normalizedMainLink, 415 415 iosLink: normalizedIosLink, 416 416 androidLink: normalizedAndroidLink,