Skip to content

Commit 5d45ba9

Browse files
authored
Merge pull request #98 from aspiers/rm-project
fix: remove org.hypercerts.claim.collection.project
2 parents 1bbc6c0 + 43b0431 commit 5d45ba9

File tree

6 files changed

+20
-119
lines changed

6 files changed

+20
-119
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hypercerts-org/lexicon": minor
3+
---
4+
5+
Remove org.hypercerts.claim.collection.project lexicon

ERD.puml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -193,18 +193,6 @@ dataclass collection {
193193
!endif
194194
}
195195

196-
' org.hypercerts.claim.collection.project (sidecar)
197-
dataclass collectionProject {
198-
!if (SHOW_FIELDS == "true")
199-
projectTitle?
200-
shortProjectDescription?
201-
projectDescription (Leaflet ref)
202-
avatar?
203-
coverPhoto?
204-
createdAt
205-
!endif
206-
}
207-
208196
'together {
209197

210198
' Funders are represented by DIDs or human-readable strings
@@ -298,7 +286,6 @@ measurement --> location
298286

299287
collection::items --> activity
300288
collection::items --> collection : "recursive\nnesting"
301-
collection ..|> collectionProject : "sidecar\n(same TID)"
302289

303290
activity::contributions -l--> contributor
304291
activity::rights --> rights

README.md

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ property tables, see [SCHEMAS.md](SCHEMAS.md).
191191

192192
## Examples
193193

194-
### Example: Creating a Collection with Nested Items
194+
### Creating a Collection with Nested Items
195195

196196
```typescript
197197
import { TID } from "@atproto/common";
@@ -222,17 +222,21 @@ const collectionRecord = {
222222
};
223223
```
224224

225-
### Example: Creating a Project (Collection + Project Sidecar)
225+
### Creating a Project
226226

227-
```typescript
228-
import { TID } from "@atproto/common";
229-
230-
const tid = TID.nextStr(); // Same TID for both records
227+
Projects are collections with a `type` field set to "project" and can
228+
include rich-text descriptions:
231229

232-
// Base collection record
233-
const collectionRecord = {
230+
```typescript
231+
const projectRecord = {
234232
$type: "org.hypercerts.claim.collection",
233+
type: "project",
235234
title: "Carbon Offset Initiative",
235+
shortDescription: "A project focused on carbon reduction and reforestation",
236+
description: {
237+
uri: "at://did:plc:alice/pub.leaflet.pages.linearDocument/abc123",
238+
cid: "...",
239+
},
236240
items: [
237241
{
238242
uri: "at://did:plc:alice/org.hypercerts.claim.activity/3k2abc",
@@ -245,32 +249,8 @@ const collectionRecord = {
245249
],
246250
createdAt: new Date().toISOString(),
247251
};
248-
249-
// Project sidecar with rich-text description and assets
250-
const projectSidecar = {
251-
$type: "org.hypercerts.claim.collection.project",
252-
projectTitle: "Carbon Offset Initiative",
253-
shortProjectDescription: "A project focused on carbon reduction",
254-
projectDescription: {
255-
uri: "at://did:plc:alice/pub.leaflet.pages.linearDocument/abc123",
256-
cid: "...",
257-
},
258-
avatar: avatarBlob,
259-
coverPhoto: coverPhotoBlob,
260-
createdAt: new Date().toISOString(),
261-
};
262-
263-
// Create both with same TID
264-
await createRecord({
265-
collection: "org.hypercerts.claim.collection",
266-
rkey: tid,
267-
record: collectionRecord,
268-
});
269-
await createRecord({
270-
collection: "org.hypercerts.claim.collection.project",
271-
rkey: tid,
272-
record: projectSidecar,
273-
});
274252
```
275253

276-
**Note**: The project sidecar is optional. Collections without this sidecar are simple groupings; collections with it are "projects" with rich documentation.
254+
**Note**: The `type` field is optional and can be set to "project",
255+
"favorites", or any other collection type. The `description` field
256+
supports rich-text via Leaflet linear documents.

SCHEMAS.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -132,25 +132,6 @@ Hypercerts-specific lexicons for tracking impact work and claims.
132132

133133
---
134134

135-
### `org.hypercerts.claim.collection.project`
136-
137-
**Description:** Project-specific metadata for a collection. Uses the sidecar pattern with the same record key (TID) as the collection record. Provides rich-text description capabilities for project-type collections.
138-
139-
**Key:** `tid`
140-
141-
#### Properties
142-
143-
| Property | Type | Required | Description | Comments |
144-
| ------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------ |
145-
| `projectTitle` | `string` | no | The title of this collection | maxLength: 800, maxGraphemes: 80 |
146-
| `shortProjectDescription` | `string` | no | Short summary of this project, suitable for previews and list views | maxLength: 3000, maxGraphemes: 300 |
147-
| `projectDescription` | `ref` | yes | Rich-text description of this project, represented as a Leaflet linear document. | |
148-
| `avatar` | `blob` | no | Primary avatar image representing this project across apps and views; typically a square logo or project identity image. | maxSize: 1000000, accepts: image/png, image/jpeg |
149-
| `coverPhoto` | `blob` | no | The cover photo of this project. | maxSize: 1000000, accepts: image/png, image/jpeg |
150-
| `createdAt` | `string` | yes | Client-declared timestamp when this project metadata was created | |
151-
152-
---
153-
154135
### `org.hypercerts.claim.rights`
155136

156137
**Description:** Describes the rights that a contributor and/or an owner has, such as whether the hypercert can be sold, transferred, and under what conditions.

lexicons/org/hypercerts/claim/collection/project.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

scripts/generate-schemas.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ function generateMarkdown() {
318318
"org.hypercerts.claim.evidence",
319319
"org.hypercerts.claim.measurement",
320320
"org.hypercerts.claim.collection",
321-
"org.hypercerts.claim.collection.project",
322321
"org.hypercerts.claim.rights",
323322
"org.hypercerts.funding.receipt",
324323
];

0 commit comments

Comments
 (0)