From b6418a4e7423358ec0c751e91fb5fbf21dbfe703 Mon Sep 17 00:00:00 2001
From: Philipinho <16838612+Philipinho@users.noreply.github.com>
Date: Thu, 7 May 2026 23:16:22 +0100
Subject: [PATCH] make placeholders smaller
---
.../public/locales/en-US/translation.json | 6 +++--
.../transclusion/error-placeholder.tsx | 11 +++-------
.../transclusion/no-access-placeholder.tsx | 7 ++----
.../transclusion/not-found-placeholder.tsx | 15 +++++--------
.../transclusion/transclusion.module.css | 22 +++++--------------
5 files changed, 19 insertions(+), 42 deletions(-)
diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json
index b2b8142b..964c3cc2 100644
--- a/apps/client/public/locales/en-US/translation.json
+++ b/apps/client/public/locales/en-US/translation.json
@@ -903,7 +903,6 @@
"Token": "Token",
"Synced block": "Synced block",
"Create a block that stays in sync across pages.": "Create a block that stays in sync across pages.",
- "Synced block name": "Synced block name",
"Editing original": "Editing original",
"Copy synced block": "Copy synced block",
"Unsync": "Unsync",
@@ -912,5 +911,8 @@
"Synced to {{count}} other page_other": "Synced to {{count}} other pages",
"ORIGINAL": "ORIGINAL",
"THIS PAGE": "THIS PAGE",
- "No pages": "No pages"
+ "No pages": "No pages",
+ "The original synced block no longer exists": "The original synced block no longer exists",
+ "You don't have access to this synced block": "You don't have access to this synced block",
+ "Failed to load this synced block": "Failed to load this synced block"
}
diff --git a/apps/client/src/features/editor/components/transclusion/error-placeholder.tsx b/apps/client/src/features/editor/components/transclusion/error-placeholder.tsx
index ae30d5bc..a7f99321 100644
--- a/apps/client/src/features/editor/components/transclusion/error-placeholder.tsx
+++ b/apps/client/src/features/editor/components/transclusion/error-placeholder.tsx
@@ -7,16 +7,11 @@ export default function ErrorPlaceholder() {
return (
-
- {t("Failed to load transclusion")}
-
-
- {t("An error occurred while rendering this reference")}
-
+
{t("Failed to load this synced block")}
);
}
diff --git a/apps/client/src/features/editor/components/transclusion/no-access-placeholder.tsx b/apps/client/src/features/editor/components/transclusion/no-access-placeholder.tsx
index 0070b107..5212e169 100644
--- a/apps/client/src/features/editor/components/transclusion/no-access-placeholder.tsx
+++ b/apps/client/src/features/editor/components/transclusion/no-access-placeholder.tsx
@@ -6,11 +6,8 @@ export default function NoAccessPlaceholder() {
const { t } = useTranslation();
return (
-
-
{t("No access")}
-
- {t("You don't have access to this content")}
-
+
+
{t("You don't have access to this synced block")}
);
}
diff --git a/apps/client/src/features/editor/components/transclusion/not-found-placeholder.tsx b/apps/client/src/features/editor/components/transclusion/not-found-placeholder.tsx
index cee6867d..db18d998 100644
--- a/apps/client/src/features/editor/components/transclusion/not-found-placeholder.tsx
+++ b/apps/client/src/features/editor/components/transclusion/not-found-placeholder.tsx
@@ -1,4 +1,4 @@
-import { IconQuestionMark } from "@tabler/icons-react";
+import { IconInfoCircle } from "@tabler/icons-react";
import { useTranslation } from "react-i18next";
import classes from "./transclusion.module.css";
@@ -6,17 +6,12 @@ export default function NotFoundPlaceholder() {
const { t } = useTranslation();
return (
-
-
- {t("Synced block not found")}
-
-
- {t("The source page or synced block no longer exists")}
-
+
{t("The original synced block no longer exists")}
);
}
diff --git a/apps/client/src/features/editor/components/transclusion/transclusion.module.css b/apps/client/src/features/editor/components/transclusion/transclusion.module.css
index 1e31e89a..2fb5f754 100644
--- a/apps/client/src/features/editor/components/transclusion/transclusion.module.css
+++ b/apps/client/src/features/editor/components/transclusion/transclusion.module.css
@@ -1,34 +1,22 @@
.placeholder {
display: flex;
- flex-direction: column;
+ flex-direction: row;
align-items: center;
- justify-content: center;
- gap: 4px;
- padding: var(--mantine-spacing-md);
+ gap: 8px;
+ padding: 8px 12px;
border-radius: var(--mantine-radius-md);
background: light-dark(
var(--mantine-color-gray-0),
var(--mantine-color-dark-6)
);
- border: 1px dashed
- light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
+ font-size: var(--mantine-font-size-sm);
user-select: none;
}
.placeholderIcon {
- color: light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-3));
-}
-
-.placeholderTitle {
- font-weight: 600;
- font-size: var(--mantine-font-size-sm);
-}
-
-.placeholderSubtext {
- font-size: var(--mantine-font-size-xs);
+ flex: none;
color: light-dark(var(--mantine-color-gray-6), var(--mantine-color-dark-2));
- text-align: center;
}
.transclusionBadge {