[pull] main from tldraw:main#566
Merged
Merged
Conversation
…#8979) In order to extend the tldraw.com → tldraw.dev logo link to signed-in users, this PR makes the sidebar workspace logo an external link to tldraw.dev, and routes both logo links through the shared `ExternalLink` wrapper so they emit click analytics consistently. It follows up #8938, which repointed the logo only on the anonymous editor panel (where the logo sits in the top-left). **Signed-in logo (new link).** Signed-in users never see the anonymous panel's logo — for them the logo lives in the sidebar via `TlaSidebarWorkspaceLink`, which until now was a non-clickable `<div>`. It now renders `ExternalLink` to `https://tldraw.dev`, opening in a new tab with `target="_blank"`, `rel="noopener noreferrer"`, and an `aria-label` (the logo is image-only). It reuses the same `utm_campaign=top-left-logo` value as #8938 so both logos roll up together on tldraw.dev's side. **Anonymous logo (tracking + consistency).** #8938 used a raw `<a>` for the anon top-left logo, which had no click tracking. It now uses `ExternalLink` too, so both surfaces emit PostHog events — `top-left-logo-clicked` (anon) and `sidebar-logo-clicked` (signed-in) — distinct names so the two can be segmented, while the shared UTM campaign still attributes them together. This also moves `target`/`rel` into the wrapper rather than hand-maintained attributes. Relates to #8871. Follows up #8938. ### Change type - [x] `improvement` ### Test plan 1. **Signed in** (`yarn dev-app`, then sign in): click the tldraw logo at the top of the left sidebar. 2. **Anonymous** (logged out, shared file, or published file): click the tldraw logo in the top-left of the editor. 3. In both cases confirm a new tab opens at `https://tldraw.dev?utm_source=dotcom&utm_medium=organic&utm_campaign=top-left-logo`, and the original tab stays on tldraw.com. 4. Inspect each logo's `<a>` element: `target="_blank"`, `rel="noopener noreferrer"`, `aria-label="tldraw.dev"`. - [ ] Unit tests - [ ] End to end tests ### Release notes - Link the tldraw logo in the signed-in sidebar to tldraw.dev. ### Code changes | Section | LOC change | | --- | --- | | Apps | +15 / -8 | Co-authored-by: Jessica Claire Edwards <jessica@tldraw.com>
### Change type - [ ] `bugfix` - [ ] `improvement` - [ ] `feature` - [ ] `api` - [x] `other`
In order to stop the dotcom `not-logged-in.spec.ts › can sign out` e2e
test from intermittently failing, this PR de-flakes the sidebar sign-out
fixture.
The fixture located the button with a loose `getByText('Sign out')` and
clicked it without waiting for the Radix user-settings dropdown to
finish opening. Playwright could therefore click mid-animation ("element
is not stable") or match a node that re-portals and detaches ("element
is detached from the DOM").
The fix targets the stable testid the menu item already renders
(`dialog.sign-out`, from the `TldrawUiMenuItem` `${sourceId}.${id}`
convention) and waits for the dropdown menu content to become visible in
`openUserSettingsMenu()` before any child-item click, so child clicks no
longer race the open animation. The change is confined to the e2e
fixture; no project-wide `reducedMotion` override is used, so
`cookie-consent.spec.ts` (which relies on animations running) is
unaffected.
### Change type
- [x] `other`
### Test plan
1. From `apps/dotcom/client`, run the sign-out test repeatedly to
confirm the flake is gone:
`yarn e2e --grep "can sign out" --repeat-each=5`
2. Or from the repo root: `yarn e2e-dotcom`.
- [x] End to end tests
### Code changes
| Section | LOC change |
| ------- | ---------- |
| Tests | +3 / -1 |
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 : )