-
Notifications
You must be signed in to change notification settings - Fork 15
BREAKING: Stable frontpage lexicon #232
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
Open
tom-sherman
wants to merge
14
commits into
main
Choose a base branch
from
stable-frontpage-lexicon
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9f5f40c
Initial draft
tom-sherman 00bfeb2
Flesh out rich text
tom-sherman 8e8cbc4
Remove richtext from the proposal
tom-sherman 31de79d
Add length constraints to comment
tom-sherman 658b5f9
Remove facet type
tom-sherman 878c0af
Add vote subject description
tom-sherman 3cd4c6e
Fix NSIDs
tom-sherman 6e0acd1
Move subject to feed group
tom-sherman 0fb7a8d
Ref plaintextParagraph directly
tom-sherman d6a28ec
Generate client code
tom-sherman ef5cb03
Move subjects into post schema
tom-sherman 95ee9c3
Generate client code
tom-sherman 0b98a25
Move richtext block union into block type
tom-sherman 3f57182
Generate client
tom-sherman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "fyi.frontpage.feed.comment", | ||
"defs": { | ||
"main": { | ||
"type": "record", | ||
"description": "Record containing a Frontpage comment.", | ||
"key": "tid", | ||
"record": { | ||
"type": "object", | ||
"required": ["createdAt", "post", "blocks"], | ||
"properties": { | ||
"blocks": { | ||
"type": "array", | ||
"maxLength": 50, | ||
"description": "The content of the comment. Note, there are additional constraints placed on the total size of the content within the Frontpage AppView that are not possible to express in lexicon. Generally a comment can have a maximum length of 10,000 graphemes, the Frontpage AppView will enforce this limit.", | ||
"items": { | ||
"type": "ref", | ||
"ref": "fyi.frontpage.richtext.block" | ||
} | ||
}, | ||
"createdAt": { | ||
"type": "string", | ||
"format": "datetime", | ||
"description": "Client-declared timestamp when this comment was originally created." | ||
}, | ||
"parent": { "type": "ref", "ref": "com.atproto.repo.strongRef" }, | ||
"post": { "type": "ref", "ref": "com.atproto.repo.strongRef" } | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "fyi.frontpage.feed.post", | ||
"defs": { | ||
"main": { | ||
"type": "record", | ||
"description": "Record containing a Frontpage post.", | ||
"key": "tid", | ||
"record": { | ||
"type": "object", | ||
"required": ["title", "createdAt"], | ||
"properties": { | ||
"title": { | ||
"type": "string", | ||
"maxLength": 3000, | ||
"maxGraphemes": 300, | ||
"description": "The title of the post." | ||
}, | ||
"subject": { | ||
"type": "union", | ||
"description": "The piece of content that this Frontpage post is about.", | ||
"refs": ["#urlSubject"] | ||
}, | ||
"createdAt": { | ||
"type": "string", | ||
"format": "datetime", | ||
"description": "Client-declared timestamp when this post was originally created." | ||
} | ||
} | ||
} | ||
}, | ||
"urlSubject": { | ||
"type": "object", | ||
"required": ["url"], | ||
"properties": { | ||
"url": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "fyi.frontpage.feed.vote", | ||
"defs": { | ||
"main": { | ||
"type": "record", | ||
"description": "Record containing a Frontpage vote.", | ||
"key": "tid", | ||
"record": { | ||
"type": "object", | ||
"required": ["subject", "createdAt"], | ||
"properties": { | ||
"subject": { | ||
"type": "ref", | ||
"description": "The post or comment that this Frontpage vote is for.", | ||
"ref": "com.atproto.repo.strongRef" | ||
}, | ||
"createdAt": { | ||
"type": "string", | ||
"format": "datetime", | ||
"description": "Client-declared timestamp when this vote was originally created." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "fyi.frontpage.richtext.block", | ||
"defs": { | ||
"main": { | ||
"type": "object", | ||
"required": ["content"], | ||
"properties": { | ||
"content": { | ||
"type": "union", | ||
"refs": ["#plaintextParagraph"] | ||
} | ||
} | ||
}, | ||
"plaintextParagraph": { | ||
"type": "object", | ||
"properties": { | ||
"text": { | ||
"type": "string", | ||
"maxLength": 100000, | ||
"maxGraphemes": 10000 | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a reason for the extra object here? Can't this be a union directly?
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.
I don't think so, at least lex-cli errors when you have a union at the top level of main. I'll verify that though.