From b79f89d8a01b51a3568ee2c60543db11e5d9c073 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 21 Sep 2025 12:18:40 +0800 Subject: [PATCH 1/5] :art: Improve copy/cut/delete `Headings and Bottom Blocks` menu https://github.com/siyuan-note/siyuan/issues/15797 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/block.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/model/block.go b/kernel/model/block.go index 6f4ccf155..9ebe50a33 100644 --- a/kernel/model/block.go +++ b/kernel/model/block.go @@ -741,7 +741,11 @@ func GetHeadingChildrenDOM(id string, removeFoldAttr bool) (ret string) { return ast.WalkContinue }) - child.SetIALAttr("parent-heading", id) + if removeFoldAttr { + child.RemoveIALAttr("parent-heading") + } else { + child.SetIALAttr("parent-heading", id) + } } if removeFoldAttr { From 63bbf3432944ccef803b9598bb808262ed5af72b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 21 Sep 2025 17:16:46 +0800 Subject: [PATCH 2/5] :rotating_light: --- app/src/protyle/hint/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index abfb6db55..697e5c8a3 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -38,7 +38,7 @@ import {openMobileFileById} from "../../mobile/editor"; import {processRender} from "../util/processCode"; import {AIChat} from "../../ai/chat"; import {isMobile} from "../../util/functions"; -import {isIPhone, isNotCtrl, isOnlyMeta} from "../util/compatibility"; +import {isNotCtrl, isOnlyMeta} from "../util/compatibility"; import {avRender} from "../render/av/render"; import {genIconHTML} from "../render/util"; import {updateAttrViewCellAnimation} from "../render/av/action"; From f96298e34ce1369eb7d4619d61c70bedf8d9eb59 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 21 Sep 2025 17:18:40 +0800 Subject: [PATCH 3/5] :bug: https://github.com/siyuan-note/siyuan/issues/15890 --- app/src/protyle/render/av/relation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/render/av/relation.ts b/app/src/protyle/render/av/relation.ts index 8fdd33ffd..a2d13e296 100644 --- a/app/src/protyle/render/av/relation.ts +++ b/app/src/protyle/render/av/relation.ts @@ -333,7 +333,7 @@ ${html} ${keyword ? genSelectItemHTML({ type: "empty", newName: Lute.EscapeHTMLStr(keyword), - text: `${refElement.textContent}`, + text: `${refElement.textContent}`, }) : (html ? "" : genSelectItemHTML({type: "empty"}))}`; menuElement.querySelector(".b3-menu__items .b3-menu__item:not(.fn__none)").classList.add("b3-menu__item--current"); updateCopyRelatedItems(menuElement); From 8e443ce5c3bb936ddd42e4ebbe9f4b832fb965a8 Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Sun, 21 Sep 2025 18:41:37 +0800 Subject: [PATCH 4/5] :art: Change the unordered list marker from "*" to "-" (#15902) --- app/src/mobile/util/keyboardToolbar.ts | 4 ++-- app/src/protyle/hint/extend.ts | 6 +++--- app/src/protyle/render/av/action.ts | 14 +++++++------- app/src/protyle/render/av/relation.ts | 2 +- app/src/protyle/util/editorCommonEvent.ts | 2 +- app/src/protyle/wysiwyg/keydown.ts | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts index 9847531b1..6cef3e64d 100644 --- a/app/src/mobile/util/keyboardToolbar.ts +++ b/app/src/mobile/util/keyboardToolbar.ts @@ -246,9 +246,9 @@ const renderSlashMenu = (protyle: IProtyle, toolbarElement: Element) => { ${getSlashItem("#### " + Lute.Caret, "iconH4", window.siyuan.languages.heading4, "true")} ${getSlashItem("##### " + Lute.Caret, "iconH5", window.siyuan.languages.heading5, "true")} ${getSlashItem("###### " + Lute.Caret, "iconH6", window.siyuan.languages.heading6, "true")} - ${getSlashItem("* " + Lute.Caret, "iconList", window.siyuan.languages.list, "true")} + ${getSlashItem("- " + Lute.Caret, "iconList", window.siyuan.languages.list, "true")} ${getSlashItem("1. " + Lute.Caret, "iconOrderedList", window.siyuan.languages["ordered-list"], "true")} - ${getSlashItem("* [ ] " + Lute.Caret, "iconCheck", window.siyuan.languages.check, "true")} + ${getSlashItem("- [ ] " + Lute.Caret, "iconCheck", window.siyuan.languages.check, "true")} ${getSlashItem("> " + Lute.Caret, "iconQuote", window.siyuan.languages.quote, "true")} ${getSlashItem("```", "iconCode", window.siyuan.languages.code, "true")} ${getSlashItem(`| ${Lute.Caret} | | |\n| --- | --- | --- |\n| | | |\n| | | |`, "iconTable", window.siyuan.languages.table, "true")} diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts index 693e99a2f..9c32e8543 100644 --- a/app/src/protyle/hint/extend.ts +++ b/app/src/protyle/hint/extend.ts @@ -113,8 +113,8 @@ export const hintSlash = (key: string, protyle: IProtyle) => { }, { filter: [window.siyuan.languages.list, "unordered list", "无序列表", "wuxvliebiao", "wuxuliebiao", "wxlb"], id: "list", - value: "* " + Lute.Caret, - html: `
${window.siyuan.languages.list}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.insert.list.custom, "* ")}
`, + value: "- " + Lute.Caret, + html: `
${window.siyuan.languages.list}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.insert.list.custom, "- ")}
`, }, { filter: [window.siyuan.languages["ordered-list"], "order list", "ordered list", "有序列表", "youxvliebiao", "youxuliebiao", "yxlb"], id: "orderedList", @@ -123,7 +123,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => { }, { filter: [window.siyuan.languages.check, "task list", "todo list", "任务列表", "renwuliebiao", "rwlb"], id: "check", - value: "* [ ] " + Lute.Caret, + value: "- [ ] " + Lute.Caret, html: `
${window.siyuan.languages.check}${getHotkeyOrMarker(window.siyuan.config.keymap.editor.insert.check.custom, "[]")}
`, }, { filter: [window.siyuan.languages.quote, "blockquote", "bq", "引述", "yinshu", "ys"], diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index ea074d250..ff9b6af54 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -394,7 +394,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi let text = ""; rowElements.forEach((item, i) => { if (rowElements.length > 1) { - text += "* "; + text += "- "; } text += item.querySelector('.av__cell[data-dtype="block"] .av__celltext').textContent.trim(); if (ids.length > 1 && i !== ids.length - 1) { @@ -421,7 +421,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi content = `((${id} '${cellElement.querySelector(".av__celltext").textContent.replace(/[\n]+/g, " ")}'))`; } if (ids.length > 1) { - text += "* "; + text += "- "; } text += content; if (ids.length > 1 && i !== ids.length - 1) { @@ -438,7 +438,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi let text = ""; ids.forEach((id, index) => { if (ids.length > 1) { - text += "* "; + text += "- "; } const cellElement = rowElements[index].querySelector(".av__cell[data-dtype='block']"); if (cellElement.getAttribute("data-detached") === "true") { @@ -460,7 +460,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi let text = ""; ids.forEach((id, index) => { if (ids.length > 1) { - text += "* "; + text += "- "; } const cellElement = rowElements[index].querySelector(".av__cell[data-dtype='block']"); if (cellElement.getAttribute("data-detached") === "true") { @@ -490,7 +490,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi content = `[${cellElement.querySelector(".av__celltext").textContent.replace(/[\n]+/g, " ")}](siyuan://blocks/${id})`; } if (ids.length > 1) { - text += "* "; + text += "- "; } text += content; if (ids.length > 1 && i !== ids.length - 1) { @@ -517,7 +517,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi } if (ids.length > 1) { - text += "* "; + text += "- "; } text += content; if (ids.length > 1 && i !== ids.length - 1) { @@ -534,7 +534,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi let text = ""; ids.forEach((id, index) => { if (ids.length > 1) { - text += "* "; + text += "- "; } const cellElement = rowElements[index].querySelector(".av__cell[data-dtype='block']"); if (cellElement.getAttribute("data-detached") === "true") { diff --git a/app/src/protyle/render/av/relation.ts b/app/src/protyle/render/av/relation.ts index a2d13e296..b0bfc34a3 100644 --- a/app/src/protyle/render/av/relation.ts +++ b/app/src/protyle/render/av/relation.ts @@ -417,7 +417,7 @@ ${html || genSelectItemHTML({type: "empty"})}`; const selectedElements = options.menuElement.querySelectorAll('.b3-menu__item[draggable="true"]'); selectedElements.forEach((item: HTMLElement) => { if (selectedElements.length > 1) { - copyText += "* "; + copyText += "- "; } const textElement = item.querySelector(".b3-menu__label") as HTMLElement; if (!textElement.dataset.id || textElement.dataset.id === "undefined") { diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 2f4aedc1c..584707783 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -1352,7 +1352,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { let html = ""; for (let i = 0; i < ids.length; i++) { if (ids.length > 1) { - html += "* "; + html += "- "; } const response = await fetchSyncPost("/api/block/getRefText", {id: ids[i]}); html += `((${ids[i]} '${response.data}'))`; diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index c0147de73..935b8b95c 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1585,7 +1585,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { } else { protyle.hint.splitChar = "/"; protyle.hint.lastIndex = -1; - protyle.hint.fill((isMatchCheck ? "* [ ] " : (isMatchList ? "* " : "1. ")) + Lute.Caret, protyle); + protyle.hint.fill((isMatchCheck ? "- [ ] " : (isMatchList ? "- " : "1. ")) + Lute.Caret, protyle); } } } else { From b262d630851f033b8c643508177cc0bf3e5e8194 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 21 Sep 2025 21:46:27 +0800 Subject: [PATCH 5/5] :art: https://github.com/siyuan-note/siyuan/issues/15889 --- app/src/protyle/util/onGet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index e23ba496e..beedd4fe5 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -166,7 +166,7 @@ const setHTML = (options: { removeElements.forEach(item => { item.remove(); }); - protyle.contentElement.scrollTop = protyle.contentElement.scrollTop + (removeElement.getBoundingClientRect().top - lastRemoveTop); + protyle.contentElement.scrollTop = protyle.contentElement.scrollTop + (removeElement.getBoundingClientRect().top - lastRemoveTop) - 1; protyle.scroll.lastScrollTop = protyle.contentElement.scrollTop; hideElements(["toolbar"], protyle); }