Repository navigation
Replies: 1 comment
|
It's being worked on. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The code and docs currently say that pages don't exist: "a page is not a record anywhere", "the block is the primitive", "pages come into being by being named". That was never quite true. The fold is keyed by page title (
Pages = Record<string, Block[]>), and the title is a page's identity. Now it's also getting in the way: page properties (a table opened from the page header) want an event that targets a page, and the current wording reads as a rule against one.What stays true
block.createdare addressed by block id alone. That rule has its own reason, independent of whether pages exist (seeapp/docs/block-sync.md:29), and it stays.What changes
An event that explicitly targets a page (e.g.
github.com/shovon/pbnotes#page.property.set { page, key, value }) is allowed. A page is a first-class concept identified by its title. It has no lifecycle events, but it can have events of its own.Wording to rewrite
app/docs/design.md:68: "A page is not a record anywhere. It is the set of blocks carrying its title…"packages/pages/blocks.ts:1-9: "The block is the primitive… A page is not a record anywhere: it is a title that blocks carry, so pages come into being by being named and go away by having nothing left on them."packages/pages/blocks.ts:93-97(BlockCreated): "The only event that carries a page, because it is the only one that says anything about one". It should say this is the only block event that carries a page.packages/pages/pages.ts:201-203(searchPages): "naming a page is all it takes for one to exist". Fine as is, but check it against the new wording.app/src/shared/pages.ts:8-14: "there is no page record anywhere, so a page is never created".Open questions this unblocks
getPagescurrently drops a journal day that has no blocks.getReferencesandsearchPages?All reactions