-
Notifications
You must be signed in to change notification settings - Fork 3
updates to match latest lexicons #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d708410
28a46c8
e1ced1e
31d50b0
320b428
db6f649
67a085e
060516a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| "@hypercerts-org/sdk-core": minor | ||
| --- | ||
|
|
||
| Add comprehensive documentation and tests for collection avatar and banner images | ||
|
|
||
| Collections and projects now support avatar (thumbnail/icon) and banner (header/cover) images. Images can be provided as | ||
| Blobs for upload or as URI strings for external references. | ||
|
|
||
| **What's Included:** | ||
|
|
||
| - Comprehensive JSDoc documentation for `HypercertCollection` type explaining avatar and banner usage | ||
| - Tests for creating collections with avatar/banner using both Blobs and URI strings | ||
| - Tests for updating collection images (add, update, remove, preserve) | ||
| - Examples showing avatar/banner in collections and projects | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,12 @@ | ||||||
| --- | ||||||
| "@hypercerts-org/sdk-core": patch | ||||||
|
||||||
| "@hypercerts-org/sdk-core": patch | |
| "@hypercerts-org/sdk-core": minor |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| "@hypercerts-org/sdk-core": minor | ||
| --- | ||
|
|
||
| Add rich text facet support for activity descriptions (lexicon v0.10.0-beta.7) | ||
|
|
||
| Activities now support rich text annotations (facets) in their descriptions, enabling mentions (@user), URLs, hashtags | ||
| (#tag), and other inline markup. | ||
|
|
||
| - Added `shortDescriptionFacets` and `descriptionFacets` fields to `CreateHypercertParams` | ||
| - Updated `create()` method to include facet fields in hypercert records | ||
| - Enhanced `HypercertClaim` documentation with comprehensive facet examples | ||
| - Added examples showing mentions, links, and tag facets with proper byte indexing |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -283,6 +283,14 @@ export class HypercertOperationsImpl extends EventEmitter<HypercertEvents> imple | |
| hypercertRecord.image = imageBlobRef; | ||
| } | ||
|
|
||
| if (params.shortDescriptionFacets) { | ||
| hypercertRecord.shortDescriptionFacets = params.shortDescriptionFacets; | ||
| } | ||
|
|
||
| if (params.descriptionFacets) { | ||
| hypercertRecord.descriptionFacets = params.descriptionFacets; | ||
| } | ||
|
|
||
|
Comment on lines
+286
to
+293
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve empty facet arrays. Line 286 and Line 290 use truthy checks, which drop empty arrays; that loses an explicit “no facets” intent. Prefer an explicit 🐛 Proposed fix- if (params.shortDescriptionFacets) {
+ if (params.shortDescriptionFacets !== undefined) {
hypercertRecord.shortDescriptionFacets = params.shortDescriptionFacets;
}
- if (params.descriptionFacets) {
+ if (params.descriptionFacets !== undefined) {
hypercertRecord.descriptionFacets = params.descriptionFacets;
}🤖 Prompt for AI Agents |
||
| const hypercertValidation = validate(hypercertRecord, HYPERCERT_COLLECTIONS.CLAIM, "main", false); | ||
| if (!hypercertValidation.success) { | ||
| throw new ValidationError(`Invalid hypercert record: ${hypercertValidation.error?.message}`); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changeset claims "Comprehensive JSDoc documentation for
HypercertCollectiontype explaining avatar and banner usage" but theHypercertCollectiontype at line 152 has no JSDoc documentation - it's just a bare type alias. The avatar/banner documentation exists only in theCreateCollectionParamstype comment (line 319). Consider either adding JSDoc documentation to theHypercertCollectiontype itself, or updating the changeset description to accurately reflect where the documentation was added (e.g., "Comprehensive JSDoc documentation inCreateCollectionParamsexplaining avatar and banner usage").There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Suggest a change