Same first page id for all editors (#2071)

This PR changes the default state of the editor to use `page:page` as
its first page's id. This removes some randomness that makes certain
seed-based tests impossible. It should have no effect on the way that
the app works.

### Change Type

- [x] `minor` — New feature
This commit is contained in:
Steve Ruiz 2023-10-13 12:18:07 +01:00 committed by GitHub
parent eb041d516f
commit 3a2598748c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -7,7 +7,7 @@ Object {
"isLocked": false, "isLocked": false,
"meta": Object {}, "meta": Object {},
"opacity": 1, "opacity": 1,
"parentId": "page:id51", "parentId": "page:page",
"props": Object { "props": Object {
"color": "black", "color": "black",
"dash": "draw", "dash": "draw",

View file

@ -80,7 +80,9 @@ export const onValidationFailure: StoreSchemaOptions<
} }
function getDefaultPages() { function getDefaultPages() {
return [PageRecordType.create({ name: 'Page 1', index: 'a1', meta: {} })] return [
PageRecordType.create({ id: 'page:page' as TLPageId, name: 'Page 1', index: 'a1', meta: {} }),
]
} }
/** @internal */ /** @internal */