Skip to content

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

fix(web): group unnamespaced plugin settings into a single card

tianma-if26cc997b2982
diff --git a/README.ja.md b/README.ja.md
index 68a6cc3a..51f769f0 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -280,7 +280,6 @@ Web、PWA、デスクトップは、編集が 30 秒止まったあとでノー
- ノート製品の設計は、[Evernote](https://evernote.com/) など成熟したノートツールの公開されている製品体験も参考にしています。関連機能は EdgeEver が独自に設計し、実装しています。
- マインドマップと視覚的な図のノートは、[XMind](https://xmind.com/) と [ProcessOn](https://www.processon.com/) の公開されている製品体験を参考にしています。関連機能は EdgeEver が独自に設計し、実装しています。
-- エディタテーマのタイポグラフィ、見出し階層、章立ては [obsidian-minimal](https://github.com/kepano/obsidian-minimal)、[Outline](https://github.com/outline/outline)、[墨格](https://moyufang.cn/editor) の公開成果を参考にしています。名称、素材、実装は EdgeEver のオリジナルです。
## 商標とブランド
diff --git a/README.md b/README.md
index bb60d6df..c16b1589 100644
--- a/README.md
+++ b/README.md
@@ -281,7 +281,6 @@ Web, PWA, and desktop upload memo edits after 30 seconds of inactivity and check
- EdgeEver's note-taking product design was also informed by the publicly available product experiences of mature note-taking tools such as [Evernote](https://evernote.com/). The related features were independently designed and implemented by EdgeEver.
- The product design of mind-map and visual-diagram notes was informed by the publicly available product experiences of [XMind](https://xmind.com/) and [ProcessOn](https://www.processon.com/). These features were independently designed and implemented by EdgeEver.
-- Editor theme typography, heading hierarchy, and chapter structure draw from the public work of [obsidian-minimal](https://github.com/kepano/obsidian-minimal), [Outline](https://github.com/outline/outline), and [墨格](https://moyufang.cn/editor). Names, assets, and implementations are original to EdgeEver.
## Trademark and Brand Use
diff --git a/README.zh-CN.md b/README.zh-CN.md
index b9ef789a..4972a4c7 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -284,7 +284,6 @@ Web、PWA 与桌面端会在停止编辑 30 秒后上传笔记,并在页面可
- EdgeEver 的笔记产品设计也参考了 [Evernote(印象笔记)](https://evernote.com/) 等成熟笔记工具的公开产品体验。相关功能由 EdgeEver 独立设计与实现。
- 思维导图与可视化图表笔记的产品设计参考了 [XMind](https://xmind.com/) 和 [ProcessOn](https://www.processon.com/) 等图表工具的公开产品体验。相关功能由 EdgeEver 独立设计与实现。
-- 编辑器主题的排版架构、标题层级与章节结构参考了 [obsidian-minimal](https://github.com/kepano/obsidian-minimal)、[Outline](https://github.com/outline/outline) 和 [墨格](https://moyufang.cn/editor) 的公开方案。名称、素材与实现均由 EdgeEver 独立完成。
## 商标与品牌使用
diff --git a/README.zh-TW.md b/README.zh-TW.md
index 5149071d..1331a137 100644
--- a/README.zh-TW.md
+++ b/README.zh-TW.md
@@ -282,7 +282,6 @@ Web、PWA 與桌面版會在停止編輯 30 秒後上傳筆記,並在頁面可
- EdgeEver 的筆記產品設計也參考了 [Evernote(印象筆記)](https://evernote.com/) 等成熟筆記工具的公開產品體驗。相關功能由 EdgeEver 獨立設計與實作。
- 心智圖與視覺化圖表筆記的產品設計參考了 [XMind](https://xmind.com/) 和 [ProcessOn](https://www.processon.com/) 等圖表工具的公開產品體驗。相關功能由 EdgeEver 獨立設計與實作。
-- 編輯器主題的排版架構、標題層級與章節結構參考了 [obsidian-minimal](https://github.com/kepano/obsidian-minimal)、[Outline](https://github.com/outline/outline) 和 [墨格](https://moyufang.cn/editor) 的公開方案。名稱、素材與實作均由 EdgeEver 獨立完成。
## 商標與品牌使用
diff --git a/apps/web/src/components/plugins/plugin-settings-layout.test.mjs b/apps/web/src/components/plugins/plugin-settings-layout.test.mjs
index c1b577da..117a5844 100644
--- a/apps/web/src/components/plugins/plugin-settings-layout.test.mjs
+++ b/apps/web/src/components/plugins/plugin-settings-layout.test.mjs
@@ -30,4 +30,19 @@ describe("plugin settings layout", () => {
{ compact: false, keys: ["alerts.email", "alerts.push"] },
]);
});
+
+ test("keeps settings without dot namespaces in a single unified group", () => {
+ const fields = [
+ { key: "global-filter", type: "text", label: "Filter" },
+ { key: "task-format", type: "select", label: "Format", options: [{ value: "dataview", label: "Dataview" }] },
+ { key: "set-done-date", type: "boolean", label: "Done date" },
+ { key: "set-cancelled-date", type: "boolean", label: "Cancelled date" },
+ { key: "set-created-date", type: "boolean", label: "Created date" },
+ { key: "recurrence-insert", type: "select", label: "Recurrence", options: [{ value: "before", label: "Before" }] },
+ ];
+
+ expect(groupPluginSettingFields(fields).map((group) => ({ compact: group.compact, keys: group.fields.map((field) => field.key) }))).toEqual([
+ { compact: false, keys: ["global-filter", "task-format", "set-done-date", "set-cancelled-date", "set-created-date", "recurrence-insert"] },
+ ]);
+ });
});
diff --git a/apps/web/src/components/plugins/plugin-settings-layout.ts b/apps/web/src/components/plugins/plugin-settings-layout.ts
index f8210bde..f4859fca 100644
--- a/apps/web/src/components/plugins/plugin-settings-layout.ts
+++ b/apps/web/src/components/plugins/plugin-settings-layout.ts
@@ -6,7 +6,10 @@ export interface PluginSettingFieldGroup {
fields: PluginSettingField[];
}
-const fieldNamespace = (field: PluginSettingField) => field.key.split(".", 1)[0] ?? field.key;
+const fieldNamespace = (field: PluginSettingField) => {
+ const dotIndex = field.key.indexOf(".");
+ return dotIndex === -1 ? "" : field.key.slice(0, dotIndex);
+};
export const groupPluginSettingFields = (fields: PluginSettingField[]): PluginSettingFieldGroup[] => {
const groups: PluginSettingFieldGroup[] = [];
@@ -17,8 +20,8 @@ export const groupPluginSettingFields = (fields: PluginSettingField[]): PluginSe
while (end < fields.length && fieldNamespace(fields[end]!) === namespace) end += 1;
const run = fields.slice(index, end);
groups.push({
- id: `${namespace}:${field.key}`,
- compact: run.length >= 3 && run.every((item) => item.type === "boolean"),
+ id: `${namespace || "default"}:${field.key}`,
+ compact: Boolean(namespace) && run.length >= 3 && run.every((item) => item.type === "boolean"),
fields: run,
});
index = end;