tldraw/apps/examples/e2e/tests
Steve Ruiz fd29006538
[feature] add meta property to records (#1627)
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
2023-06-28 14:24:05 +00:00
..
export-snapshots.spec.ts-snapshots speed up playwright and add visual regression tests (#1638) 2023-06-23 11:53:04 +00:00
export-snapshots.spec.ts [feature] add meta property to records (#1627) 2023-06-28 14:24:05 +00:00
test-camera.spec.ts Add playwright tests (#1484) 2023-05-30 15:28:56 +01:00
test-canvas-events.spec.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
test-clipboard.spec.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
test-kbds.spec.ts Add playwright tests (#1484) 2023-05-30 15:28:56 +01:00
test-routes.spec.ts [refactor] User-facing APIs (#1478) 2023-06-01 15:47:34 +00:00
test-shapes.spec.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00
test-smoke.spec.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00
test-text.spec.ts rename app to editor (#1503) 2023-06-02 15:21:45 +00:00