tldraw/apps/vscode/extension/src
David Sheldrick 19d051c188
Snapshots pit of success (#3811)
Lots of people are having a bad time with loading/restoring snapshots
and there's a few reasons for that:

- It's not clear how to preserve UI state independently of document
state.
- Loading a snapshot wipes the instance state, which means we almost
always need to
  - update the viewport page bounds
  - refocus the editor
  - preserver some other sneaky properties of the `instance` record

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [x] `sdk` — Changes the tldraw SDK
- [ ] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
2024-06-03 15:58:00 +00:00
..
extension.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00
file.ts Snapshots pit of success (#3811) 2024-06-03 15:58:00 +00:00
TldrawDocument.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
TldrawEditorProvider.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00
TldrawWebviewManager.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
utils.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00
WebViewMessageHandler.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00