[pull] main from tldraw:main#607
Merged
Merged
Conversation
…9340) In order to unblock the staging deploy, this PR adds `--archive=tgz` to the `vercel deploy` command in the dotcom deploy script. Relates to #9327. #9327 stopped stripping `.js.map` files from the client deploy (so deployed builds are debuggable in devtools), which was the right call — but the extra files pushed the prebuilt output to 15,237 files, over Vercel's 15,000-individual-file upload limit, and the "Deploy dotcom to staging" job has failed on every `main` push since: ``` Error: Invalid request: `files` should NOT have more than 15000 items, received 15237. Try using `--archive=tgz` to limit the amount of files you upload. ``` Archiving uploads the output as a single tarball instead of as individual files, so the per-file count limit no longer applies, while keeping the source maps that #9327 intentionally ships. This is exactly the workaround Vercel's own error message recommends. The change applies to staging, production, and PR preview deploys (all go through `deploySpa()`). ### Change type - [x] `bugfix` ### Test plan 1. Merge and confirm the "Deploy dotcom to staging" job succeeds on the next `main` push, with the Vercel step reporting an archived upload rather than the 15,000-file error. ### Code changes | Section | LOC change | | -------------- | ---------- | | Config/tooling | +10 / -3 |
…9345) 🙇♂️ File this one under "things we should have done four years ago". Speeds up load time by 50-75ms on my M5 MacBook. Affects SDK as well as everything else. --- https://github.com/user-attachments/assets/bc9d0642-73f6-4e77-821d-60549ec5f5b3 In order to avoid regenerating SVG hash-pattern fill defs on every editor mount, this PR caches the generated pattern images at the module level. The pattern images are produced in `usePattern` by drawing to a canvas and encoding a blob for every zoom LOD × theme (light/dark) — at high-zoom LODs the canvas can reach ~2048×2048, so the draw-and-encode work costs roughly 50ms and was repeated from scratch on each load. The encoded output only depends on `(devicePixelRatio, zoom, solidColor)`, so a module-level `patternImageBlobCache` keyed by those values now stores the `Promise<Blob>` and reuses it across editor mounts and instances. Object URLs are still created and revoked per-instance exactly as before — only the immutable blobs are shared, so there is no risk of handing out a revoked URL. Rejected promises (e.g. the `throwToBlob` debug flag) are evicted from the cache so a later mount can retry. ### Change type - [x] `improvement` ### Test plan 1. Open an editor and add a shape with a pattern fill. 2. Unmount and remount the editor (or mount a second editor instance). 3. Confirm pattern fills render correctly and the canvas pattern-generation work does not repeat. - [ ] Unit tests - [ ] End to end tests ### Release notes - Cache generated pattern fill defs so they are not regenerated on every editor mount, reducing editor load time. ### Code changes | Section | LOC change | | --------- | ---------- | | Core code | +21 / -2 |
In order to keep sidebar menus from being stranded when dismissed from outside the sidebar, this PR clears open menu state when the mobile sidebar overlay closes and lets desktop canvas clicks dismiss the workspace switcher. The switcher dismissal overlay covers the viewport, so that dismissing click is swallowed before it reaches sidebar items or the canvas, while focus changes from workspace-switch canvas remounts are still ignored. ### Change type - [x] `bugfix` ### Test plan 1. On desktop, open the workspace switcher, click the canvas, and verify the switcher closes without the click deselecting the current shape. 2. In a mobile viewport, open the sidebar, open the workspace switcher, then click the sidebar overlay and verify the switcher closes. 3. Reopen the mobile sidebar, open a sidebar file menu, then click the sidebar overlay and verify the file menu closes. 4. `yarn lint-current` 5. `yarn workspace dotcom lint` 6. Attempted `NODE_OPTIONS='--no-strip-types' yarn workspace dotcom playwright test e2e/tests/smoke/workspaces.spec.ts --project=chromium -g "closing the mobile sidebar closes open sidebar menus"`, but the shared `workerStorageState` auth fixture timed out waiting for the login redirect before the test body ran. - [x] End to end tests ### Release notes - Fix sidebar menus staying open after closing the mobile sidebar or clicking the canvas. ### Code changes | Section | LOC change | | ------- | ---------- | | Apps | +8 / -7 | | Tests | +68 / -0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )