2719 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Mitja Bezenšek
|
b83c72baab
|
VS Code 2.0.26 (#3148)
Version bump for a release. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [x] `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 - [x] `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 |
||
Dan Groshev
|
a933aaf619
|
Simplify tlsync types (#3139)
Replace enums with (const) object types. Was supposed to include https://github.com/tldraw/tldraw/pull/3144, but had to bail out ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [ ] `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 - [x] `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. - [x] `dunno` — I don't know |
||
Kesavaraja Krishnan
|
3767a68f0f
|
Updated exploded example link from installation page. (#3138)
Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `docs` — Changes to the documentation, examples, or templates. <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `dunno` — I don't know ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [x] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. Installation docs has a link to example for exploded which points to github 404. I have updated the working link. |
||
alex
|
0a48aea7bb
|
fixup file helpers (#3130)
We had a couple regressions in #3110: first a missing `await` was causing fonts not to get properly embedded in exports. second, some `readAsText` calls were replaced with `readAsDataURL` calls. ### 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 ❗️ --> - [x] `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 |
||
alex
|
adebb680e5
|
Component-based toolbar customisation API (#3067)
When we went from overrides-based to component based UI customisation APIs, we didn't do the toolbar because it had some significant extra complexity around overflowing the contents of the menu into the dropdown. This is really hard to do at render-time with react - you can't introspect what a component will return to move some of it into an overflow. Instead, this diff runs that logic in a `useLayoutEffect` - we render all the items into both the main toolbar and the overflow menu, then in the effect (or if the rendered components change) we use CSS to remove the items we don't need, check which was last active, etc. Originally, I wasn't really into this approach - but i've actually found it to work super well and be very reliable. ### Change Type - [x] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Test the toolbar at many different sizes with many different 'active tools' --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
David Sheldrick
|
b9547c2e6b
|
[DX] PR labels revamp (#3112)
This PR switches up how PR labels are validated to allow for more freeform label tweaking in the future. Basically **huppy will now only check that your PR is labelled, it doesn't care how it's labelled**. I also updated the PR template with a new labelling scheme that we can tweak over time. So before Huppy bot had to know about the specific set of allowed labels, and now as long as the label exists you're allowed to add it. So to add a new label to the PR template, just create the label and then add an option for it in the .md file. ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [x] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know |
||
Mitja Bezenšek
|
26e1e98366
|
Revert throttling of useValue and useStateTracking. (#3129)
Reverts the changes to the `state` package that were made in #2977. Should fix the issue with shape jittering discovered during QA. ### Change Type - [x] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Create some shapes (draw shapes work well). 2. Open the same room in a second browser. 3. Resize shapes (using option / alt makes it more obvious). 4. The shapes should not jitter in any of the screens. |
||
Mime Čuvalo
|
83544a9ea8
|
docs: fix missing API entries (#3111)
following up on https://discord.com/channels/859816885297741824/1162726738774720574/1211715924613275681 several things here: - `docs/api/.*json` were out-of-date — seems like fetch-api-source should run automatically? shouldn't `build-api` also override this directory? in particular, tldraw.api.json still had a ton of references to the old @tldraw/tldraw package - the main problem was that `generateApiContent` was failing silently. we were relying on Promises and this broke silently because we never handled exceptions. i got rid of the Promise as it was unnecessary and made the exceptions bubble up - two things were broken in the docs and those are fixed, so now the missing entries will resurface ### Change Type - [x] `documentation` — Changes to the documentation only[^2] --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
Steve Ruiz
|
599a6cd484
|
quick fixes (#3128)
- Menu items - keyboard shortcuts dialog menu ### Change Type - [x] `patch` — Bug fix |
||
Steve Ruiz
|
b0210c0d6d
|
Restore export menu content (#3126)
This PR restores the export menu on dotcom. Before: <img width="545" alt="image" src="https://github.com/tldraw/tldraw/assets/23072548/7377c9ae-7644-4889-a01f-7e304fbc8c68"> After: <img width="824" alt="image" src="https://github.com/tldraw/tldraw/assets/23072548/4f634d53-06ed-42a7-b8bb-f92e183ce5dd"> ### Change Type - [x] `internal` — Any other changes that don't affect the published package[^2] ### Test Plan 1. Check the menu on tldraw.com / readonly / shared room / snapshot |
||
Taha
|
8d02df8712
|
Make the custom menu examples a bit clearer (#3106)
Use the Readme and bg color of elements to make it clearer which menu is being customised. - [x] `documentation` — Changes to the documentation only[^2] ### Release Notes - Add a brief release note for your PR here. |
||
Mime Čuvalo
|
dba6d4c414
|
chore: cleanup multiple uses of FileReader (#3110)
from https://discord.com/channels/859816885297741824/1006133967642177556/1213038401465618433 ### Change Type - [x] `patch` — Bug fix |
||
Steve Ruiz
|
60cc0dcce3
|
Menu updates / fix flip / add export / remove Shape menu (#3115)
This PR: - adds the export all menu items to the main menu - removes the export all menu items from the dotcom menus - removes the shape menu and reverts several changes from https://github.com/tldraw/tldraw/pull/2782. This was not properly reviewed (I thought it was a PR about hiding / showing menu items). - fixes a bug with exporting (exporting JSON was not working when the user had no selected shapes) - fixes a bug that would prevent "flip shapes" from appearing in the menu - prevents export / copy actions from running if there are no shapes on the page - allows export / copy actions to default to all shapes on the page if no shapes are selected These changes have not been released in the dotcom yet. There's will be some thrash in the APIs. # Menu philosophy In the menu, the **edit** submenu relates to undo/redo, plus the user's current selection. Menu items that relate to specific to certain shapes are hidden when not available. Menu items that relate to all shapes are disabled when not available. <img width="640" alt="image" src="https://github.com/tldraw/tldraw/assets/23072548/e467e6bb-d958-4a9a-ac19-1dada52dcfa6"> ### Change Type - [x] `major` — Bug fix ### Test - Select no shapes (arrange / flip should not be visible) - Select one geo shape (arrange / flip should not be visible) - Select two geo shapes (arrange / flip should be visible) - Select one draw shape (arrange / flip should not be visible) ### Release Notes - Revert some changes in the menu. |
||
Dan Groshev
|
f1b4f807d8
|
Don't import package.json in scripts/refresh-assets.ts, just read it (#3116)
Per #3018, the `import` causes `scripts/refresh-assets.ts` to fail on Windows. This PR applies @SomeHats's suggestions cleanly on top of the current `main`. Thank you @cscxj for the original report! Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type - [x] `internal` — Any other changes that don't affect the published package |
||
Dan Groshev
|
19a1d01b8e
|
attempted fix of a flaky ClientWebSocketAdapter test (#3114)
### Change Type - [x] `tests` — Changes to any test code only |
||
Mime Čuvalo
|
5e54526776
|
docs: fix up github link (#3108) | ||
David Sheldrick
|
47a85896e0
|
[dx] Allow vscode to search inside md files by default (#3105)
Before this PR all .md files were targeted by the `.ignore` file, which has bitten me on a number of occasions since .md files often contain valuable information (e.g. the vscode extensions docs). This PR unignores .md files while still ignoring _generated_ .md files like our changelogs, the api-report files, and the generated docs sections. Additionally, the `yarn format` and `yarn lint` commands were configured slightly differently, which was confusing, so I've unified those and simplified the lint.ts script at the same time. ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [x] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version |
||
Dan Groshev
|
e527d7d0d7
|
Debounce/aggregate tlsync messages (#3012)
There is very little point sending data messages more often than 60 times a second, so we buffer them before sending. ### Change Type - [x] `internal` — Any other changes that don't affect the published package ### Test Plan 1. Smoke test (on a retro?) - [x] End to end tests --------- Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com> |
||
Mitja Bezenšek
|
b5aff00c89
|
Performance improvements (#2977)
This PR does a few things to help with performance:
1. Instead of doing changes on raf we now do them 60 times per second.
This limits the number of updates on high refresh rate screens like the
iPad. With the current code this only applied to the history updates (so
when you subscribed to the updates), but the next point takes this a bit
futher.
2. We now trigger react updates 60 times per second. This is a change in
`useValue` and `useStateTracking` hooks.
3. We now throttle the inputs (like the `pointerMove`) in state nodes.
This means we batch multiple inputs and only apply them at most 60 times
per second.
We had to adjust our own tests to pass after this change so I marked
this as major as it might require the users of the library to do the
same.
Few observations:
- The browser calls the raf callbacks when it can. If it gets
overwhelmed it will call them further and further apart. As things call
down it will start calling them more frequently again. You can clearly
see this in the drawing example. When fps gets to a certain level we
start to get fewer updates, then fps can recover a bit. This makes the
experience quite janky. The updates can be kinda ok one second (dropping
frames, but consistently) and then they can completely stop and you have
to let go of the mouse to make them happen again. With the new logic it
seems everything is a lot more consistent.
- We might look into variable refresh rates to prevent this overtaxing
of the browser. Like when we see that the times between our updates are
getting higher we could make the updates less frequent. If we then see
that they are happening more often we could ramp them back up. I had an
[experiment for this
here](
|
||
dependabot[bot]
|
47420d7476
|
Bump the npm_and_yarn group across 3 directories with 3 updates (#3087)
Bumps the npm_and_yarn group with 3 updates in the / directory: [next](https://github.com/vercel/next.js), [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) and [jose](https://github.com/panva/jose). Bumps the npm_and_yarn group with 1 update in the /templates/nextjs directory: [next](https://github.com/vercel/next.js). Updates `next` from 14.0.4 to 14.1.3 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/vercel/next.js/releases">next's releases</a>.</em></p> <blockquote> <h2>v14.1.2</h2> <p><em>Note: this is a backport release for critical bug fixes -- this does not include all pending features/changes on canary</em></p> <h3>Core Changes</h3> <ul> <li>Fix sitemap generateSitemaps support for string id (<a href="https://redirect.github.com/vercel/next.js/issues/61088">#61088</a>)</li> <li>Fix: generateSitemaps in production giving 404 (<a href="https://redirect.github.com/vercel/next.js/issues/62212">#62212</a>)</li> <li>Fix redirect under suspense boundary with basePath (<a href="https://redirect.github.com/vercel/next.js/issues/62597">#62597</a>)</li> <li>Fix: Add stricter check for "use server" exports (<a href="https://redirect.github.com/vercel/next.js/issues/62821">#62821</a>)</li> <li>ensure server action errors notify rejection handlers (<a href="https://redirect.github.com/vercel/next.js/issues/61588">#61588</a>)</li> <li>make router restore action resilient to a missing tree (<a href="https://redirect.github.com/vercel/next.js/issues/62098">#62098</a>)</li> <li>build: remove sentry from the externals list <a href="https://redirect.github.com/vercel/next.js/issues/61194">#61194</a></li> <li>Reduce memory/cache overhead from over loader processing <a href="https://redirect.github.com/vercel/next.js/issues/62005">#62005</a></li> </ul> <h3>Credits</h3> <p>Huge thanks to <a href="https://github.com/huozhi"><code>@huozhi</code></a>, <a href="https://github.com/shuding"><code>@shuding</code></a>, <a href="https://github.com/Ethan-Arrowood"><code>@Ethan-Arrowood</code></a>, <a href="https://github.com/styfle"><code>@styfle</code></a>, <a href="https://github.com/ijjk"><code>@ijjk</code></a>, <a href="https://github.com/ztanner"><code>@ztanner</code></a>, <a href="https://github.com/balazsorban44"><code>@balazsorban44</code></a>, <a href="https://github.com/kdy1"><code>@kdy1</code></a>, and <a href="https://github.com/williamli"><code>@williamli</code></a> for helping!</p> <h2>v14.1.2-canary.7</h2> <h3>Core Changes</h3> <ul> <li>remove reducer unit tests: <a href="https://redirect.github.com/vercel/next.js/issues/62766">#62766</a></li> </ul> <h3>Documentation Changes</h3> <ul> <li>Update sitemap.mdx: <a href="https://redirect.github.com/vercel/next.js/issues/62809">#62809</a></li> </ul> <h3>Credits</h3> <p>Huge thanks to <a href="https://github.com/ztanner"><code>@ztanner</code></a> and <a href="https://github.com/devr77"><code>@devr77</code></a> for helping!</p> <h2>v14.1.2-canary.6</h2> <h3>Core Changes</h3> <ul> <li>fix: Add stricter check for "use server" exports: <a href="https://redirect.github.com/vercel/next.js/issues/62821">#62821</a></li> <li>fix(next-core): throw on invalid metadata handler: <a href="https://redirect.github.com/vercel/next.js/issues/62829">#62829</a></li> <li>Revert "Add experimental config for navigation raf test (<a href="https://redirect.github.com/vercel/next.js/issues/62668">#62668</a>)": <a href="https://redirect.github.com/vercel/next.js/issues/62834">#62834</a></li> <li>Revert "refactor(analysis): rust based page-static-info, deprecate js parse interface in next-swc": <a href="https://redirect.github.com/vercel/next.js/issues/62838">#62838</a></li> </ul> <h3>Example Changes</h3> <ul> <li>Fix with-supertokens example: <a href="https://redirect.github.com/vercel/next.js/issues/62817">#62817</a></li> </ul> <h3>Credits</h3> <p>Huge thanks to <a href="https://github.com/shuding"><code>@shuding</code></a>, <a href="https://github.com/kwonoj"><code>@kwonoj</code></a>, <a href="https://github.com/ijjk"><code>@ijjk</code></a>, and <a href="https://github.com/timneutkens"><code>@timneutkens</code></a> for helping!</p> <h2>v14.1.2-canary.5</h2> <h3>Core Changes</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
David Sheldrick
|
464b1e9cab
|
[infra] Fix patch release script (#3095)
Need to make sure we have access to the `main` branch so we can calculate how many commits the branch has diverged by. ### Change Type - [x] `internal` — Any other changes that don't affect the published package[^2] |
||
Steve Ruiz
|
a8b7d4e2d0
|
[fix] Rotated crop handle (#3093)
This PR fixes a bug where local rotation was used in cropping handles rather than absolute rotation. ![Kapture 2024-03-10 at 18 21 51](https://github.com/tldraw/tldraw/assets/23072548/71ee5e46-59de-4c1d-8f54-27052677c0f7) ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Crop an image 2. Place the image into a rotated parent 3. Crop the image 4. Rotate the image 5. Crop the image The handles should be accurately rotated in all cases. ### Release Notes - Fixed a bug that could cause rotated cropping images to have incorrectly rotated handles. |
||
Slowhand
|
abf69e7107
|
Fix typo in useValue comment (#3088)
Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [x] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### 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 - Fix typo in useValue comment. |
||
Steve Ruiz
|
a691c60315
|
Custom renderer example (#3091)
This PR adds a custom renderer example. Ever wanted to see how to use an HTML canvas with tldraw? Here's how! ![Kapture 2024-03-09 at 22 35 09](https://github.com/tldraw/tldraw/assets/23072548/9e258a8f-f99f-419a-b92a-f58b1ce93973) ### Change Type - [x] `documentation` — Changes to the documentation only[^2] |
||
Taha
|
eb80cf787b
|
Shape with Migrations (#3078)
Adds an example of how to add migrations for a custom shape. closes tld-2246 - [x] `documentation` — Changes to the documentation only[^2] ### Release Notes - Adds a shape with migrations example --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
Mitja Bezenšek
|
40c20e5585
|
Fix viewport params for pages. (#3079) | ||
David Sheldrick
|
40aeebab46 | simplify fnmatch pattern | ||
David Sheldrick
|
9058a483be
|
[infra] Patch release scripting (#3072)
This PR adds tooling to enable a PR-based workflow for publishing 'patch' releases. ### How releases currently work Quick recap of how the 'major' and 'minor' releases work: - You trigger them manually in the github actions UI - It only works on the `main` branch. - You select a mode: `'major'`, `'minor'`, or `'override'` with a specific version. The override option is mainly for transitioning in and out of prerelease mode, but potentially also skipping unlucky numbers like 13 if you're feeling superstitious 🧙🏼 - It bumps the version numbers in the `package.json` and `version.ts` files. - It compiles a changelog based on descriptions/titles from all the PRs that have gone in to `main`. - It tags the commit with the version number e.g. `v2.0.0` and pushes all the changes made to `main` (i.e. changelogs, version bumps and the tag) - It creates a github release, e.g. https://github.com/tldraw/tldraw/releases/tag/v2.0.0 - It deploys the packages to npm - It tells huppy bot about the release (for now-defunct purposes, we can remove that code later) - It triggers the template repo update workflow ### Introducing: Release Branches This PR adds one step into the above process: creating a 'release' branch. e.g. if it publishes a new version tagged `v2.1.0` it will also create a branch named `v2.1.x`. These branches are protected in the following ways: - Only huppy bot can create or delete them (ad-hoc admin overrides are, of course, still doable should the need arise) - Like `main` they can only be updated via pull request. The process to create a patch release becomes simple: 1. Checkout the `v<major>.<minor>.x` branch you want to create a patch release for. e.g. git fetch && git checkout v2.1.x 4. Branch off, e.g. git checkout -b david/my-patch-release 6. Cherry-pick any commits you need from `main` into your branch, resolving any conflicts if they arise. **important**: don't do new work here because it won't be merged back into `main` automatically. Fix the thing in `main` first and then cherry-pick, unless you're in a big rush or whatever. e.g. git cherry-pick abdeaf234 cde234d09 ab23af287 7. Push your new branch to github as normal and make a PR targeting the `v<major>.<minor>.x` branch. 8. Merge it. Congratulations, you just triggered a patch release build. ### What happens (differently) during a patch release build. ⚡ A key thing to understand here is that **this script allows us to deploy patch versions of _older_ major/minor releases**. This will happen when we have customers pinned to older versions and they need a quick bugfix but don't have time to upgrade to the latest due to some breaking change. This will also happen if we ever adopt a kind of 'LTS' release model. With that said, here's how things go down differently: - Firstly, the build happens automatically after the PR is merged, and you don't select 'major' or 'minor' or anything, it just does its thing. - It bumps the version numbers in the `package.json` files and the `version.ts` files but these changes stay within the release branch, they don't get propagated to `main` (nor should they). - It compiles a changelog entry featuring just your one PR's description/title, and also pushes this to the release branch (but not `main`). - It still tags the commit and creates a github release as normal. - It still deploys the packages to npm (obvs). HOWEVER it only uses the `latest` tag if this will indeed be the latest version of the public packages. Otherwise, if we're patching an older release, it uses the `revision` tag. Unfortunately it doesn't seem to be an option to deploy with _no_ tag, but using `revision` still allows version strings like `~2.0.0` to capture subsequent patch releases like `2.0.3`. - Similarly it _only_ notifies huppy bot and _only_ triggers the template repo update if the version being deployed is actually the latest version. I'm going to merge this now to test it out but I'd still appreciate reviews. |
||
Mitja Bezenšek
|
a07561e662
|
Add tests for Vec.Average (#3071)
Adds tests for the Vec.Average. [My previous PR](https://github.com/tldraw/tldraw/pull/3065) added a check that prevented returning vectors with NaNs, this adds a test for that. ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [x] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version |
||
Caleb Eby
|
f033ff8508
|
Fix typo (#3069)
Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [x] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan Look at the revised documentation ### Release Notes N/A |
||
Taha
|
e543797b81
|
Add custom tool examples (#3064)
Two examples: One in the UI section that shows how to add a tool to the toolbar along with an icon One in the shapes and tools section that shows a simple sticker tool with no child states I'll go over the copy again before it's merged, but don't want to spend too long on it right now in case the feeling is that these should both be a single example. Next: The [minimal example](https://tldraw.dev/examples/editor-api/only-editor) is currently the best example we have of a tool with child states. I think this should be adapted and copied/moved over to the custom shapes and tools category. closes tld-2266 - [x] `documentation` — Changes to the documentation only[^2] ### Release Notes - Adds a simple custom tool example |
||
Mitja Bezenšek
|
0813e54ca2
|
Fix validation errors for duplicateProps (#3065)
Should fix `At instance.duplicateProps.offset.x: Expected a number, got NaN` validation errors. Wasn't able to reproduce. We only assign the offset here, so `Vec.Averge` is the most likely offender here and for that to happen I guess `movingShapes` might not contain any shapes. ### Change Type - [x] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### 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. |
||
alex
|
33d111f93e
|
Remove namespaced-tldraw/tldraw.css (#3068)
This is a generated file that shouldn't be checked in. ### Change Type - [x] `internal` — Any other changes that don't affect the published package[^2] |
||
Dan Groshev
|
c3e8628680
|
Better websocket reconnection handling (#2960)
Right now it's fairly easy to encounter a situation when a tab coming online wouldn't recognise that the connection can now be reestablished for a while. This PR cleans up reconnection logic, reenables tests, and makes sure we get online as robustly as possible. ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Check that reconnection works as expected - [x] End to end tests --------- Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com> |
||
Steve Ruiz
|
f0f133fdd2
|
Shorten url state (#3041)
This PR shortens the URL parameters for the dot com. Old formal still works but this is shorter (it has bugged me for ages). Before: tldraw.com/r/ok?viewport=0,0,1080,720&page=page:ashdsad_sadsadasd After: tldraw.com/r/ok?v=0,0,1080,720&p=ashdsad_sadsadasd ### Change Type - [x] `internal` ### Test Plan 1. Try the old url parameter format. 2. Try the new one. ### Release Notes - Shortens url parameters for dot com. |
||
hirano
|
5e4bca9961
|
Fix an issue where the video size was not drawn correctly (#3047)
Fixed an issue where the video size was drawing larger than the shape size. After: ![スクリーンショット 2024-03-04 15 38 10](https://github.com/tldraw/tldraw/assets/20399854/5839f4a3-913b-4d3a-a816-003d58f89d50) Before: ![スクリーンショット 2024-03-04 15 37 32](https://github.com/tldraw/tldraw/assets/20399854/188bd0cb-50aa-4ea9-a0a5-7748d747eae0) ### Change Type - [x] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan no tests ### Release Notes - Fix an issue where the video size was not drawn correctly. Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
alex
|
ce782dc70b
|
Wrap local/session storage calls in try/catch (take 2) (#3066)
Steve tried this in #3043, but we reverted it in #3063. Steve's version added `JSON.parse`/`JSON.stringify` to the helpers without checking for where we were already `JSON.parse`ing (or not). In some places we just store strings directly rather than wanting them jsonified, so in this version we leave the jsonification to the callers - the helpers just do the reading/writing and return the string values. ### Change Type - [x] `patch` — Bug fix |
||
alex
|
8adaaf8e22
|
Revert "Protect local storage calls (#3043)" (#3063)
This reverts commit
|
||
alex
|
15c760f7ea
|
children: any -> children: ReactNode (#3061)
We use `children: any` in a bunch of places, but the proper type for these is `ReactNode`. This diff fixes those. ### Change Type - [x] `patch` — Bug fix |
||
Steve Ruiz
|
18a550ccdb
|
[fix] Input tags (#3038)
This PR fixes the input tags, which were set to `false` rather than `off`, as they should be. ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Test autocomplete 2. Test autocapitalize 3. Test autocorrect 4. Make sure that password managers don't show up ### Release Notes - Fixed autocomplete, autocapitalize, and autocorrect tags on text inputs. |
||
Lu Wilson
|
03b9acf564
|
Lokalise: Translations update (#3049)
This pull request was initiated by Lokalise (user Lu) at 2024-03-04 10:42:19 ## Release Notes - Updated Hungarian translations. |
||
Lu Wilson
|
5e390cf989
|
[terrible] Firefox: Allow scrolling on keyboard shortcuts dialog (#2974)
This PR lets firefox users scroll the keyboard shortcuts dialog **horizontally**. This isn't a real solution, just a plea for help for any ideas on how to fix this in a better way. Firefox users haven't been able to scroll the keyboard shortcuts dialog for a long time. The problem is that firefox handles overflowing column content differently to other browsers. Most browsers overflow *downwards*, but firefox overflows *sideways*, and there's no CSS property to control that behaviour. ### Change Type - [x] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Open the keyboard shortcuts dialog on firefox. 2. Try to scroll the dialog to see overflowing content. More visible on smaller screens. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Add a brief release note for your PR here. Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |
||
Steve Ruiz
|
08a2b59238
|
Fix cursor chat bubble position. (#3042)
This PR fixes the position of the cursor chat bubble when the canvas is not positioned at the top left. ### Change Type - [x] `internal` ### Test Plan 1. Using CSS, add a margin left to the tldraw component on a multiplayer route. 2. Use cursor chat. ### Release Notes - Fixed a bug where cursor chat bubble position could be wrong when a sidebar was open. --------- Co-authored-by: Lu Wilson <l2wilson94@gmail.com> |
||
Lorenzo Lewis
|
3c95ec1013
|
Fix broken link for shape example (#3046)
Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [x] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### 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 - Fix a link that was pointing to a 404 on GitHub |
||
Steve Ruiz
|
2f28d7c6f8
|
Protect local storage calls (#3043)
This PR provides some safe wrappers for local storage calls. Local storage is not available in all environments (for example, a React Native web view). The PR also adds an eslint rule preventing direct calls to local / session storage. ### Change Type - [x] `patch` — Bug fix ### Release Notes - Fixes a bug that could cause crashes in React Native webviews. |
||
Mitja Bezenšek
|
3161e5cb4f
|
Remove dependabot config since it only controls version updates? (#3057)
My last PR added dependabot config. But it seems it only controls the version updates, which we probably don't want for now. So I'm removing this config for now. I guess security update frequency can't really be configured since they are meant as urgent and should be merged asap? ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [x] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version |
||
dependabot[bot]
|
c3f0fd5f1e
|
Bump the npm_and_yarn group group with 7 updates (#2982)
Bumps the npm_and_yarn group group with 7 updates: | Package | From | To | | --- | --- | --- | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.0.11` | `5.0.12` | | [wrangler](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler) | `3.16.0` | `3.19.0` | | [semver](https://github.com/npm/node-semver) | `7.5.4` | `7.6.0` | | [es5-ext](https://github.com/medikoo/es5-ext) | `0.10.62` | `0.10.64` | | [ip](https://github.com/indutny/node-ip) | `1.1.8` | `1.1.9` | | [miniflare](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/miniflare) | `3.20231030.0` | `3.20231030.3` | | [undici](https://github.com/nodejs/undici) | `5.28.2` | `5.28.3` | Updates `vite` from 5.0.11 to 5.0.12 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md">vite's changelog</a>.</em></p> <blockquote> <h2><!-- raw HTML omitted -->5.0.12 (2024-01-19)<!-- raw HTML omitted --></h2> <ul> <li>fix: await <code>configResolved</code> hooks of worker plugins (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15597">#15597</a>) (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15605">#15605</a>) (<a href="https://github.com/vitejs/vite/commit/ef89f80">ef89f80</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/15597">#15597</a> <a href="https://redirect.github.com/vitejs/vite/issues/15605">#15605</a></li> <li>fix: fs deny for case insensitive systems (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/15653">#15653</a>) (<a href="https://github.com/vitejs/vite/commit/91641c4">91641c4</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/15653">#15653</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
Mitja Bezenšek
|
faebbe1ea6
|
Configure dependabot. (#2980)
Adds dependabot config. Seems like monthly is the least frequent update you can choose right now (there are feature request for quarterly and for chron like syntax). For now I used the daily interval though. I want to make sure it works, will then switch to monthly. The main thing I'd like to see is that the main `yarn.lock` file gets updated. That didn't happen in one of the previous dependabot PRs (seems like [others faced the same issue](https://github.com/dependabot/dependabot-core/issues/6346)). So 🤞 this solves it. Also added a dedupe workflow, that should only run on dependabot branches (prefixed with `depandabot/`). Otherwise we would need to manually do it, as [seen on this PR](https://github.com/tldraw/tldraw/pull/2982) ([failure](https://github.com/tldraw/tldraw/actions/runs/8070271847/job/22047204003)). ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [x] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version |
||
David Sheldrick
|
9ae808c12c
|
[infra] fix canary dist tag (#3048)
Some of the tooling changes we made last week made it so that canary releases were being published with the `latest` dist tag. This should prevent that from happening, and I also fixed all the current packages to set `latest` back to 2.0.0 ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [x] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version |
||
Taha
|
8658e20ab5
|
Custom shape examples (#2994)
This PR: - adds a simple custom shape example - adds an interactive shape example - updates editable shape example closes TLD-2118 - [x] `documentation` — Changes to the documentation only[^2] ### Release Notes - adds a simple custom shape example - adds an interactive shape example - updates editable shape example --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com> |