From cd88460636ea9b3786006c1d425bc9bed1e8dd2f Mon Sep 17 00:00:00 2001 From: Brad Estey Date: Thu, 8 Oct 2026 21:32:13 -0400 Subject: [PATCH] Extend work.sequential.feed.comment to allow for page and panel commenting. --- CHANGELOG.md | 4 ++++ README.md | 20 +++++++++++++++++++- package.json | 2 +- src/lexicons/work.sequential.feed.comment.ts | 12 ++++++++++-- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75a6439..bf74824 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Versions follow the rules in [README.md](README.md#versioning). ## Unreleased +## 1.3.0 + +- Added `page` and `panel` to `feed.comment`, for comments on a page, slice or panel. + ## 1.2.0 - Added `feed.annotation`: localized text pinned to a point on a page, slice or strip. diff --git a/README.md b/README.md index bc5b5ff..e4bc62a 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Readers write these in their own repos. - **`graph.subscription`**: follows a series. Delete it to unsubscribe. - **`graph.list`**: a reading list or reading order of chapters and strips from any creator. AppViews skip items that aren't chapters or strips, or that were deleted. - **`feed.like`**: likes a chapter or strip. Delete it to unlike. -- **`feed.comment`**: comments on a chapter or strip. Replies set `parent` to the comment they reply to and keep its `subject`, so AppViews can count a work's comments without walking threads. +- **`feed.comment`**: comments on a chapter or strip, or on one of its pages, slices or panels. `subject` is always the chapter or strip; `page` and `panel` narrow it. Replies set `parent` to the comment they reply to and keep its `subject`, `page` and `panel`, so AppViews can count a work's comments without walking threads. A reply to a comment on a chapter: @@ -84,6 +84,22 @@ A reply to a comment on a chapter: } ``` +A comment on the fourth panel of a page: + +```json +{ + "$type": "work.sequential.feed.comment", + "subject": "at://did:plc:creator/work.sequential.chapter/3kchapter", + "page": "at://did:plc:creator/work.sequential.page/3kpage", + "panel": 3, + "text": "This reveal!", + "lang": "en", + "createdAt": "2026-10-08T12:00:00.000Z" +} +``` + +`panel` is an index into `panels[]`, so it can point at a different panel after a re-cut. AppViews ignore indexes past the last panel. + ### Annotations `feed.annotation` pins localized text to a point on a page, slice or strip. Each annotation is its own record, so a work can have many. @@ -283,6 +299,8 @@ Different art (Cover B) is its own record. The same art with a different treatme | Property | Type | Req | Notes | | --- | --- | --- | --- | | `subject` | at-uri | yes | Chapter or strip. Replies keep their parent's. | +| `page` | at-uri | no | Page or slice of the chapter. Replies keep their parent's. | +| `panel` | integer (≥ 0) | no | Index into the page's or strip's `panels`. Replies keep their parent's. | | `parent` | at-uri | no | Comment being replied to. | | `text` | string (≤ 1000 graphemes) | yes | | | `facets` | `app.bsky.richtext.facet[]` | no | Mentions, links, hashtags. | diff --git a/package.json b/package.json index c0fa57f..d7769ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lexicons", - "version": "1.2.0", + "version": "1.3.0", "type": "module", "private": true, "engines": { diff --git a/src/lexicons/work.sequential.feed.comment.ts b/src/lexicons/work.sequential.feed.comment.ts index 31ee185..8cfd676 100644 --- a/src/lexicons/work.sequential.feed.comment.ts +++ b/src/lexicons/work.sequential.feed.comment.ts @@ -7,7 +7,15 @@ export const workSequentialFeedComment = lx.lexicon('work.sequential.feed.commen subject: lx.string({ format: 'at-uri', required: true, - description: 'AT-URI of the work.sequential.chapter or work.sequential.strip being commented on. AppViews ignore comments on any other record. Replies keep the subject of the comment they reply to. Use the DID form (at://did:...), not a handle.' + description: 'AT-URI of the work.sequential.chapter or work.sequential.strip being commented on. AppViews ignore comments on any other record. Comments on a page, slice or panel still set subject to the chapter or strip, so AppViews can count a work\'s comments without walking pages. Replies keep the subject of the comment they reply to. Use the DID form (at://did:...), not a handle.' + }), + page: lx.string({ + format: 'at-uri', + description: 'AT-URI of the work.sequential.page or work.sequential.slice being commented on. Must belong to the subject chapter. Omit to comment on the whole chapter, and always omit when the subject is a strip. Replies keep the page of the comment they reply to. Use the DID form (at://did:...), not a handle.' + }), + panel: lx.integer({ + minimum: 0, + description: 'Zero-based index of the panel being commented on, in the panels of the page, or of the strip when the subject is a strip. Omit to comment on the whole page or strip. Slices have no panels. Indexes can shift when the creator re-cuts panels; AppViews ignore indexes past the last panel. Replies keep the panel of the comment they reply to.' }), parent: lx.string({ format: 'at-uri', @@ -32,6 +40,6 @@ export const workSequentialFeedComment = lx.lexicon('work.sequential.feed.commen description: 'The date and time the comment was created.' }) }), - description: 'A comment on a chapter or strip, or a reply to another comment.' + description: 'A comment on a chapter or strip, or on one of its pages, slices or panels, or a reply to another comment.' }) }) -- 2.51.2