Repository navigation
feat: make Underlay export more complete by including downloads and issues and pages - #3693
Merged
Merged
Conversation
…rder Pub records gain `downloads`: the editor-uploaded "formatted" files from Pub.downloads, localized to content-addressed files like the avatar and tagged with their PubPub type and upload time. They stay on the Pub because PubPub keeps them there with no link to a release. Collection records gain `metadata` (volume, issue, ISSNs, publication dates and so on, as stored, without empty values), `createdAt`, and `pubIds`, the collection's pubs in CollectionPub rank order. The order lives on the Collection, which is recomputed on every push, because reordering a collection never touches the pubs and so would not reach their cached records. MAPPING_VERSION goes to 11 so every cached pub is re-mapped once with the new Pub shape. Adds a test that every emitted field is declared in its type's schema, since Underlay rejects undeclared fields.
Adding a pub to a collection, removing it, or changing a collection's kind writes CollectionPub or Collection rows and leaves the pub's updatedAt alone. The push cache treated such a pub as unchanged and kept emitting its old collectionIds and kind. Fold the sorted collection ids and the derived kind into the per-pub facet signature so the pub is re-mapped when they change.
Public community pages become Page records with title, slug, description, avatar, timestamps, and their layout as rendered HTML. `blocks` keeps every layout block in order, with html on text and html blocks and only id, type and title on the rest. `html` joins the text and html blocks so a consumer can render a page from one field. Private pages are not exported. Public collections gain `introHtml`, the text and html blocks of their layout, which is where editors write an issue's introduction. Text blocks are rendered with the editor's static renderer, using ids derived from the block so an unchanged page hashes the same on every push. Images are localized to content-addressed files exactly like release HTML, through a helper now shared with releases, and listed in `assets` and `introAssets`. Their URLs are preloaded from the immutable asset cache. Pages and collections are community-scope records, recomputed on every push, so no MAPPING_VERSION bump is needed.
…Html/layoutAssets
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue(s) Resolved
Underlay export had no
this adds that
Test Plan
Screenshots (if applicable)
Optional
Notes/Context/Gotchas
Supporting Docs