Skip to content

Commit 1b8673f

Browse files
authored
docs(releases): update release notes (tldraw#8939)
This PR does two things on the same branch: it refreshes the next-release notes, and it fixes a public API shape that was breaking the docs build. **Release notes.** In order to keep the next release notes current with `main`, this updates `apps/docs/content/releases/next.mdx` with PRs that have landed since the v5.0.2 patch release. Source is `main` (development weeks), so these entries are preliminary and some may be pruned when the production branch is cut. It bumps `last_version` from v5.0.1 to v5.0.2 (no archive needed — v5.0.0 is already archived and v5.0.2 is a patch). New entries added: - **API changes**: public `TldrawUiTranslationProvider`, `AssetUrlsProvider`, and `useAssetUrls` (tldraw#8909); `dispose()` methods for the font and overlay managers (tldraw#8896). - **Improvements** (new section): the `q` copy-styles shortcut (tldraw#8917, community), and a `getRenderingShapes()` sort-caching perf win (tldraw#8784). - **Bug fixes**: selection edge/corner handle hit areas (tldraw#8926), group z-index after deletion (tldraw#8925, community), `preventDefault` on non-cancelable events (tldraw#8910), the deduped missing-translation warning (tldraw#8909), and `image.decode()` rejection handling (tldraw#8824). Same-cycle page-menu polish (tldraw#8927, tldraw#8924) and infra/chore/dotcom/docs PRs were skipped. The role=document entry now links to PR tldraw#8901 instead of issue tldraw#8849. No stale entries needed pruning. **Build fix.** `AssetUrlsProvider` (made public in the already-merged tldraw#8909) declared its props as an inline object type, which the api docs build rejects for public React components ("Expected props parameter to be a simple reference. Rewrite this to use a `AssetUrlsProviderProps` interface."). This extracts the inline type into an exported `AssetUrlsProviderProps` interface and regenerates the API report. The same error currently affects `main`, so this also unblocks the docs deploy there. ### Change type - [x] `other` ### Test plan - [ ] Unit tests - [ ] End to end tests ### API changes - Added `AssetUrlsProviderProps` as a public interface for `AssetUrlsProvider`'s props (no behavioral change). ### Code changes | Section | LOC change | | --------------- | ---------- | | Core code | +12 / -8 | | Automated files | +7 / -2 | | Documentation | +15 / -3 |
1 parent b828bf0 commit 1b8673f

4 files changed

Lines changed: 34 additions & 13 deletions

File tree

apps/docs/content/releases/next.mdx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ author: tldraw
55
date: 05/06/2026
66
order: 0
77
status: published
8-
last_version: v5.0.1
8+
last_version: v5.0.2
99
---
1010

11-
This release redesigns the page menu around inline interaction, adds a `selectLockedShapes` option for inspecting locked shapes, and fixes a misleading "expired" banner for perpetual licenses, along with other UI and licensing bug fixes.
11+
This release redesigns the page menu around inline interaction, adds a keyboard shortcut to copy styles from a hovered shape, and adds a `selectLockedShapes` option for inspecting locked shapes, along with new public translation APIs and various rendering and UI bug fixes.
1212

1313
## What's new
1414

@@ -19,10 +19,22 @@ The page menu no longer has an explicit edit mode. Reorder pages by dragging a r
1919
## API changes
2020

2121
- Add a `selectLockedShapes` option to `TldrawOptions`. When enabled, locked shapes can be selected by left click or by brush/scribble selection while remaining protected from edits, moves, and deletes. ([#8860](https://github.com/tldraw/tldraw/pull/8860))
22+
- Export `TldrawUiTranslationProvider`, `AssetUrlsProvider`, and `useAssetUrls` as public API so components like `TldrawSelectionForeground` can be rendered without the full `TldrawUiContextProvider`. ([#8909](https://github.com/tldraw/tldraw/pull/8909))
23+
- Add `FontManager.dispose()`, `OverlayManager.dispose()`, and `OverlayUtil.dispose()` for cleaning up manager state across editor lifecycles. ([#8896](https://github.com/tldraw/tldraw/pull/8896))
24+
25+
## Improvements
26+
27+
- Add a `q` shortcut that copies the styles of the hovered shape and applies them to the next shape you create. ([#8917](https://github.com/tldraw/tldraw/pull/8917)) (contributed by [@kaneel](https://github.com/kaneel))
28+
- Improve performance on busy canvases`getRenderingShapes()` now skips its sort step when only shape props, not the set of shape ids, have changed. ([#8784](https://github.com/tldraw/tldraw/pull/8784))
2229

2330
## Bug fixes
2431

2532
- Fix a misleading "license expired" console warning for perpetual licenses on covered versions. ([#8791](https://github.com/tldraw/tldraw/pull/8791))
2633
- Fix inconsistent tooltip behavior on the video toolbar by using `TldrawUiToolbarButton` for the replace and download buttons. ([#8794](https://github.com/tldraw/tldraw/pull/8794))
2734
- Fix the missing open-state hint on the page menu and zoom menu triggers when rendered outside the main toolbar. ([#8813](https://github.com/tldraw/tldraw/pull/8813))
28-
- Mark the tldraw UI layer with `role="document"` so toolbars, menus, and dialogs stay reachable to mobile screen readers like VoiceOver and TalkBack, which do not announce the outer canvas `role="application"`. ([#8849](https://github.com/tldraw/tldraw/issues/8849))
35+
- Mark the tldraw UI layer with `role="document"` so toolbars, menus, and dialogs stay reachable to mobile screen readers like VoiceOver and TalkBack, which do not announce the outer canvas `role="application"`. ([#8901](https://github.com/tldraw/tldraw/pull/8901))
36+
- Fix selection edge resize handles overlapping corner handles, which made corners hard to grab on small shapes. ([#8926](https://github.com/tldraw/tldraw/pull/8926))
37+
- Fix a bug where deleting a shape inside a group could move the group to a different z-index. ([#8925](https://github.com/tldraw/tldraw/pull/8925)) (contributed by [@kaneel](https://github.com/kaneel))
38+
- Avoid console errors from calling `preventDefault` on non-cancelable events. ([#8910](https://github.com/tldraw/tldraw/pull/8910))
39+
- Only log the missing-translation warning once per session instead of once per `useTranslation` consumer. ([#8909](https://github.com/tldraw/tldraw/pull/8909))
40+
- Catch `image.decode()` rejections from the icon preload effect so they no longer surface as uncaught promise errors in the console. ([#8824](https://github.com/tldraw/tldraw/pull/8824))

packages/tldraw/api-report.api.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,15 @@ export const ASPECT_RATIO_TO_VALUE: Record<ASPECT_RATIO_OPTION, number>;
479479
export function AssetToolbarItem(): JSX.Element;
480480

481481
// @public
482-
export function AssetUrlsProvider({ assetUrls, children }: {
482+
export function AssetUrlsProvider({ assetUrls, children }: AssetUrlsProviderProps): JSX.Element;
483+
484+
// @public (undocumented)
485+
export interface AssetUrlsProviderProps {
486+
// (undocumented)
483487
assetUrls: TLUiAssetUrls;
488+
// (undocumented)
484489
children: React.ReactNode;
485-
}): JSX.Element;
490+
}
486491

487492
// @public (undocumented)
488493
export interface BasePathBuilderOpts {

packages/tldraw/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,11 @@ export {
721721
type TLUiActionItem,
722722
type TLUiActionsContextType,
723723
} from './lib/ui/context/actions'
724-
export { AssetUrlsProvider, useAssetUrls } from './lib/ui/context/asset-urls'
724+
export {
725+
AssetUrlsProvider,
726+
useAssetUrls,
727+
type AssetUrlsProviderProps,
728+
} from './lib/ui/context/asset-urls'
725729
export {
726730
BreakPointProvider,
727731
useBreakpoint,

packages/tldraw/src/lib/ui/context/asset-urls.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ type UiAssetUrlsContextType = TLUiAssetUrls | null
77

88
const AssetUrlsContext = createContext<UiAssetUrlsContextType>(null)
99

10+
/** @public */
11+
export interface AssetUrlsProviderProps {
12+
assetUrls: TLUiAssetUrls
13+
children: React.ReactNode
14+
}
15+
1016
/**
1117
* Provides asset URLs (icons, fonts, translations, embed icons) to the editor's UI.
1218
* Required when using `TldrawUiTranslationProvider` without `TldrawUiContextProvider`.
1319
*
1420
* @public @react
1521
*/
16-
export function AssetUrlsProvider({
17-
assetUrls,
18-
children,
19-
}: {
20-
assetUrls: TLUiAssetUrls
21-
children: React.ReactNode
22-
}) {
22+
export function AssetUrlsProvider({ assetUrls, children }: AssetUrlsProviderProps) {
2323
useEffect(() => {
2424
for (const src of Object.values(assetUrls.icons)) {
2525
if (!src) continue

0 commit comments

Comments
 (0)