Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

style(web): tighten editor header density

tianma-if7f3e6a1804e9
diff --git a/apps/web/src/components/EditorToolbar.tsx b/apps/web/src/components/EditorToolbar.tsx
index e84e3912..c0dda99e 100644
--- a/apps/web/src/components/EditorToolbar.tsx
+++ b/apps/web/src/components/EditorToolbar.tsx
@@ -519,7 +519,7 @@ export const EditorToolbar = ({
)}
</MemoEditorToolbarRow>
{hasOverflow && (
- <div className="absolute right-3 top-2 z-20 flex h-8 items-center bg-gradient-to-l from-white via-white to-transparent pl-5 sm:right-5">
+ <div className="absolute right-3 top-2 z-20 flex h-8 items-center bg-gradient-to-l from-white via-white to-transparent pl-5 sm:right-4 sm:top-0.5">
<Tooltip>
<TooltipTrigger asChild>
<button
diff --git a/apps/web/src/components/MemoEditorChromeDensity.ts b/apps/web/src/components/MemoEditorChromeDensity.ts
index 8c0ea853..fb415f6b 100644
--- a/apps/web/src/components/MemoEditorChromeDensity.ts
+++ b/apps/web/src/components/MemoEditorChromeDensity.ts
@@ -1,11 +1,11 @@
export const MEMO_EDITOR_TOP_ROW_CLASS_NAME =
- "flex min-h-12 items-center justify-between gap-2 border-b border-slate-100 px-3 py-2 sm:min-h-10 sm:px-5 sm:py-1";
+ "flex min-h-12 items-center justify-between gap-2 border-b border-slate-100 px-3 py-2 sm:min-h-9 sm:px-4 sm:py-0.5";
export const MEMO_EDITOR_TITLE_ROW_CLASS_NAME =
- "flex min-h-12 items-center gap-3 px-4 py-2 sm:min-h-10 sm:px-7 sm:py-1";
+ "flex min-h-12 items-center gap-3 px-4 py-2 sm:min-h-10 sm:px-4 sm:py-1";
export const MEMO_EDITOR_TOOLBAR_PADDING_CLASS_NAME =
- "px-3 py-2 sm:px-5 sm:py-1";
+ "px-3 py-2 sm:px-4 sm:py-0.5";
export const MEMO_EDITOR_TEXT_TITLE_REGION_CLASS_NAME =
- "space-y-1.5 px-4 pb-2.5 pt-2.5 sm:space-y-3 sm:px-7 sm:pb-4 sm:pt-4 lg:space-y-0 lg:py-0";
+ "space-y-1.5 px-4 pb-2.5 pt-2.5 sm:space-y-3 sm:px-4 sm:pb-4 sm:pt-4 lg:space-y-0 lg:py-0";
diff --git a/apps/web/src/components/MemoEditorHeaderActions.test.mjs b/apps/web/src/components/MemoEditorHeaderActions.test.mjs
index 81582535..9ba0a59b 100644
--- a/apps/web/src/components/MemoEditorHeaderActions.test.mjs
+++ b/apps/web/src/components/MemoEditorHeaderActions.test.mjs
@@ -44,7 +44,9 @@ describe("shared memo editor header actions", () => {
expect(editorToolbarSource).toContain("<MemoEditorToolbarDivider");
expect(diagramToolbarSource).toContain("<MemoEditorToolbarDivider");
expect(toolbarChromeSource).toContain("MEMO_EDITOR_TOOLBAR_PADDING_CLASS_NAME");
- expect(densitySource).toContain("sm:min-h-10 sm:px-5 sm:py-1");
+ expect(densitySource).toContain("sm:min-h-9 sm:px-4 sm:py-0.5");
+ expect(densitySource).toContain("sm:px-4 sm:py-0.5");
+ expect(densitySource).not.toContain("sm:px-7");
expect(densitySource).toContain("lg:space-y-0 lg:py-0");
expect(densitySource).not.toContain("min-[1600px]:flex");
});