From 5bb60858b97489dac985fa863265920759c95745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mime=20=C4=8Cuvalo?= Date: Thu, 15 Feb 2024 11:28:43 +0000 Subject: [PATCH] seo: take 2 (#2817) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (pending landing on: "Going to wait to land this one until the Google SEO 'soft 404' validation finishes. I want to make sure we're testing separate things.") - removes Loading text - adds sitemap to try to get Google to play nice ### Change Type - [x] `patch` — Bug fix --------- Co-authored-by: Steve Ruiz --- apps/dotcom/index.html | 3 ++- apps/dotcom/public/sitemap.txt | 1 + apps/examples/src/index.html | 1 + packages/editor/src/lib/hooks/useScreenBounds.ts | 8 +++++--- 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 apps/dotcom/public/sitemap.txt diff --git a/apps/dotcom/index.html b/apps/dotcom/index.html index 939fd2c93..9795dd999 100644 --- a/apps/dotcom/index.html +++ b/apps/dotcom/index.html @@ -42,8 +42,9 @@ -
Loading tldraw…
+
+ diff --git a/apps/dotcom/public/sitemap.txt b/apps/dotcom/public/sitemap.txt new file mode 100644 index 000000000..6581a2129 --- /dev/null +++ b/apps/dotcom/public/sitemap.txt @@ -0,0 +1 @@ +https://www.tldraw.com/ \ No newline at end of file diff --git a/apps/examples/src/index.html b/apps/examples/src/index.html index 6554c42c5..5b3efcb37 100644 --- a/apps/examples/src/index.html +++ b/apps/examples/src/index.html @@ -11,5 +11,6 @@
+ diff --git a/packages/editor/src/lib/hooks/useScreenBounds.ts b/packages/editor/src/lib/hooks/useScreenBounds.ts index d6295c132..3d3cf57e7 100644 --- a/packages/editor/src/lib/hooks/useScreenBounds.ts +++ b/packages/editor/src/lib/hooks/useScreenBounds.ts @@ -62,9 +62,11 @@ export function useScreenBounds(ref: React.RefObject) { }, [editor, ref]) } -// Credits: from v1 by way of excalidraw -// https://github.com/tldraw/tldraw-v1/blob/main/packages/core/src/hooks/useResizeObserver.ts#L8 -// https://github.com/excalidraw/excalidraw/blob/48c3465b19f10ec755b3eb84e21a01a468e96e43/packages/excalidraw/utils.ts#L600 +/*! + * Author: excalidraw + * MIT License: https://github.com/excalidraw/excalidraw/blob/master/LICENSE + * https://github.com/excalidraw/excalidraw/blob/48c3465b19f10ec755b3eb84e21a01a468e96e43/packages/excalidraw/utils.ts#L600 + */ const getNearestScrollableContainer = (element: HTMLElement): HTMLElement | Document => { let parent = element.parentElement while (parent) {