From 394f6c31106784df5a44cd4bcf4fa8820755e17d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 9 Dec 2025 20:22:31 +0200 Subject: [PATCH] feat(layout): respect content width for title --- apps/client/src/widgets/note_title.css | 9 +++++++++ apps/client/src/widgets/ribbon/RibbonDefinition.ts | 2 ++ 2 files changed, 11 insertions(+) diff --git a/apps/client/src/widgets/note_title.css b/apps/client/src/widgets/note_title.css index 477d93209..716ac27b0 100644 --- a/apps/client/src/widgets/note_title.css +++ b/apps/client/src/widgets/note_title.css @@ -28,3 +28,12 @@ body.mobile .note-title-widget input.note-title { body.desktop .note-title-widget input.note-title { font-size: 180%; } + +body.experimental-feature-new-layout .title-row { + margin-top: 1em; + max-width: var(--max-content-width); +} + +body.experimental-feature-new-layout.prefers-centered-content .title-row { + margin-inline: auto; +} diff --git a/apps/client/src/widgets/ribbon/RibbonDefinition.ts b/apps/client/src/widgets/ribbon/RibbonDefinition.ts index 0eb63002a..9976bde38 100644 --- a/apps/client/src/widgets/ribbon/RibbonDefinition.ts +++ b/apps/client/src/widgets/ribbon/RibbonDefinition.ts @@ -16,6 +16,7 @@ import FormattingToolbar from "./FormattingToolbar"; import options from "../../services/options"; import { t } from "../../services/i18n"; import { TabConfiguration } from "./ribbon-interface"; +import { isExperimentalFeatureEnabled } from "../../services/experimental_features"; export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [ { @@ -23,6 +24,7 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [ icon: "bx bx-text", show: async ({ note, noteContext }) => note?.type === "text" && options.get("textNoteEditorType") === "ckeditor-classic" + && !isExperimentalFeatureEnabled("new-layout") && !(await noteContext?.isReadOnly()), toggleCommand: "toggleRibbonTabClassicEditor", content: FormattingToolbar,