This PR adds some tools docs. There's more to come (eventually), but
this is what's finished so far.
This PR relies on this brivate one landing first:
https://github.com/tldraw/brivate/pull/2223
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Release Notes
- Tools docs.
This PR adds links to the API reference from within the docs pages.
I think we should continue with this as we move forwards with more
content.
We could tweak the threshold of what we link or don't link. I tried to
strike a good balance (maybe linked too much though). We'd want lots of
stuff to be clickable, so that users can dive into the API. But we don't
want the screen to be a splattering of blue, distracting away from more
important stuff.
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Test Plan
1. Try out some of the newly added links on the docs site.
- [ ] Unit Tests
- [ ] End to end tests
### Release Notes
- Documentation: Added links to API reference in guides.
This PR fixes some incorrect types in the example on the Shapes page of
the docs.
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Release Notes
- Documentation: Fix some incorrect types on the Shapes page.
This PR adds a `meta` property to shapes and other records.
It adds it to:
- asset
- camera
- document
- instance
- instancePageState
- instancePresence
- page
- pointer
- rootShape
## Setting meta
This data can generally be added wherever you would normally update the
corresponding record.
An exception exists for shapes, which can be updated using a partial of
the `meta` in the same way that we update shapes with a partial of
`props`.
```ts
this.updateShapes([{
id: myShape.id,
type: "geo",
meta: {
nemesis: "steve",
special: true
}
])
```
## `Editor.getInitialMetaForShape`
The `Editor.getInitialMetaForShape` method is kind of a hack to set the
initial meta property for newly created shapes. You can set it
externally. Escape hatch!
### Change Type
- [x] `minor` — New feature
### Test Plan
todo
- [ ] Unit Tests (todo)
### Release Notes
- todo
This PR fixes some links to the API in the docs.
It's part 2 of two PRs related to simplifying the paths of our API
reference.
This first one is https://github.com/tldraw/brivate/pull/2128
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Test Plan
1. On the docs site...
2. Go to the Editor page...
3. Click on the links to the Editor API reference.
4. Make sure they take you to the right place.
- [ ] Unit Tests
- [ ] End to end tests
### Release Notes
- Documentation: Simplified links to the API reference.
This PR restores some changes that were lost during the docs move from
bublic to brivate.
This is part 1 of two PRs. The second one is
https://github.com/tldraw/brivate/pull/2124
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Release Notes
- None (Docs internals)
This PR removes the skeleton Embeds page.
While we're here, do we also want to remove the skeleton Persistence
page (would it fit somewhere else? or nah?)
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Test Plan
1. On the docs site...
2. Make sure that there's no 'Embeds' page in the menu.
- [ ] Unit Tests
- [ ] End to end tests
### Release Notes
- Documentation: Removed unused Embeds page.
This PR adds a table of contents to the Editor docs page.
The Editor page is quite long, with different sections. I think that
some contents at the top will make it slightly more approachable &
usable for now.
### Change Type
- [x] `documentation` — Changes to the documentation only[^2]
[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
### Release Notes
- Documentation: Added a table of contents to the Editor page.
---------
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>