Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix readonly fetching happening too often. #3732

Merged
merged 2 commits into from May 13, 2024

Conversation

MitjaBezensek
Copy link
Contributor

The problem happened because we cleared the readonlyUrl from shared state. This was happening every time the url changed (so panning, zooming,...). Now, instead of clearing the readonlyUrl we pull out the room prefix and slug from the readonly url.

Change Type

  • 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
  • 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. Create a shared room.
  2. Move the camera around.
  3. We should not be constantly fetching the readonly slug.
  • Unit Tests
  • End to end tests

Release Notes

  • Fix an issue where readonly slug was being fetched every time the url changed (panning, zooming,...).

Copy link

vercel bot commented May 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
examples ✅ Ready (Inspect) Visit Preview May 13, 2024 10:56am
1 Ignored Deployment
Name Status Preview Updated (UTC)
tldraw-docs ⬜️ Ignored (Inspect) Visit Preview May 13, 2024 10:56am

@mimecuvalo mimecuvalo enabled auto-merge May 13, 2024 10:54
@mimecuvalo mimecuvalo added this pull request to the merge queue May 13, 2024
Merged via the queue into main with commit 7226afc May 13, 2024
10 checks passed
@mimecuvalo mimecuvalo deleted the mitja/fix-readonly-fetching branch May 13, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotcom improvement Improves existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants