-
Notifications
You must be signed in to change notification settings - Fork 14
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3b69d74
Initial draft
tom-sherman 294dfd2
Flesh out rich text
tom-sherman 4653fa2
Remove richtext from the proposal
tom-sherman b5e060e
Add length constraints to comment
tom-sherman c373948
Remove facet type
tom-sherman f92fc34
Add vote subject description
tom-sherman 174f700
Fix NSIDs
tom-sherman 55dd9be
Move subject to feed group
tom-sherman 7c13449
Ref plaintextParagraph directly
tom-sherman 611cf4c
Generate client code
tom-sherman 282d96f
Move subjects into post schema
tom-sherman eda8f7a
Generate client code
tom-sherman 6c6c277
Move richtext block union into block type
tom-sherman 22d5f92
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.