From c86d55688890e18002dcf50c75eb32420d4ccb16 Mon Sep 17 00:00:00 2001
From: Philip Okugbe <16838612+Philipinho@users.noreply.github.com>
Date: Mon, 29 Jun 2026 12:32:09 +0100
Subject: [PATCH] fix: templates ui fixes (#2316)
* fix: editor menus
* fix: templates creation UI gating
---
.../public/locales/en-US/translation.json | 2 ++
.../src/ee/template/pages/template-editor.tsx | 17 ++++++++++++++++-
.../src/ee/template/pages/template-list.tsx | 8 +++++++-
.../src/ee/template/queries/template-query.ts | 4 ++--
apps/server/src/ee | 2 +-
5 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json
index 392fae178..c23b4e2d3 100644
--- a/apps/client/public/locales/en-US/translation.json
+++ b/apps/client/public/locales/en-US/translation.json
@@ -990,6 +990,8 @@
"Are you sure you want to delete this template?": "Are you sure you want to delete this template?",
"Template scope updated": "Template scope updated",
"Choose which space this template belongs to": "Choose which space this template belongs to",
+ "Only workspace admins can create global templates.": "Only workspace admins can create global templates.",
+ "You need edit access to this space to create templates.": "You need edit access to this space to create templates.",
"Scope": "Scope",
"Select scope": "Select scope",
"Title": "Title",
diff --git a/apps/client/src/ee/template/pages/template-editor.tsx b/apps/client/src/ee/template/pages/template-editor.tsx
index 68d692782..2b4069978 100644
--- a/apps/client/src/ee/template/pages/template-editor.tsx
+++ b/apps/client/src/ee/template/pages/template-editor.tsx
@@ -38,6 +38,10 @@ import { FixedToolbar } from "@/features/editor/components/fixed-toolbar/fixed-t
import { EditorLinkMenu } from "@/features/editor/components/link/link-menu";
import { EditorBubbleMenu } from "@/features/editor/components/bubble-menu/bubble-menu";
import { EditorAiMenu } from "@/ee/ai/components/editor/ai-menu/ai-menu";
+import TableMenu from "@/features/editor/components/table/table-menu.tsx";
+import { TableHandlesLayer } from "@/features/editor/components/table/handle/table-handles-layer";
+import CalloutMenu from "@/features/editor/components/callout/callout-menu.tsx";
+import ColumnsMenu from "@/features/editor/components/columns/columns-menu.tsx";
import classes from "./template-editor.module.css";
@@ -85,6 +89,8 @@ export default function TemplateEditor() {
extensions: templateExtensions,
content: "",
editorProps: {
+ scrollThreshold: 80,
+ scrollMargin: 80,
handleDOMEvents: {
keydown: (_view, event) => {
if (["ArrowUp", "ArrowDown", "Enter"].includes(event.key)) {
@@ -398,9 +404,18 @@ export default function TemplateEditor() {