Repository navigation
Collection basics: a folder's default layout, listing cards and listing views - #63
Merged
Merged
Conversation
…column-wide image
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.
0.5.0 step 2.
A folder's default layout.
childLayout:on a folder'sindex.mdgives the pages under it a layout when they name none; the nearest folder wins, and a page's ownlayout:wins over it. AchildLayoutthat names no layout fails theindex.mdand every page that takes it, each page is checked against the schema of the layout it ends up with, and every problem about a page's layout names where it came from. The workbench lists a layout's Pages in its Relationships tab, each with where its layout came from;/api/pagesgiveslayoutFrom.The listing card.
x-pd-card(a new schema extension, not a placement one) names the component each page of a listing is shown as, on a layout'spage.childrenor a view'sentries. Every page in the listing is checked against the card's schema: a required field a page doesn't have fails the listing, naming the page and what to add. A card declares only fields of a listing's entry (Pattern Dump's shape, the base every card shares), and its sample data is checked against that shape.Listing views.
view: gridon a folder'sindex.mdshows its listing throughviews/grid, a component in the skin's style guide; Pattern Dump has none of its own. The layout writes{{{page.listing}}}; the view getsentriesand names its card, so each view's required fields are checked on their own. A missing or unknown view, and a view on a page with no listing, are problems.Starter.
pd init --storefrontships four plain views (list,grid,featured,compact) with their cards; the articles listing usesview: list.Contracts: optional
StorefrontPage.layoutFrom, optionalRelationshipsAvailable.pages.Gates green locally (Node 24): lint:css x4, lint, typecheck, test, verify:install, E2E 354 / 182 / 155 / 7. Golden:
_pd/main.jsonly (the Pages group), recorded.