Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa
2026-06-25 23:26:06 +08:00
9 changed files with 58 additions and 8 deletions
+6
View File
@@ -34,6 +34,7 @@ Below are the detailed changes in this version.
* [Support kernel plugin system](https://github.com/siyuan-note/siyuan/pull/17487)
* [Command Line Interface (CLI)](https://github.com/siyuan-note/siyuan/issues/17674)
* [New settings UI](https://github.com/siyuan-note/siyuan/pull/17675)
* [Supports configuring secrets and variables](https://github.com/siyuan-note/siyuan/issues/17933)
### Enhancement
@@ -57,6 +58,7 @@ Below are the detailed changes in this version.
* [Tooltip does not hide after moving mouse away from notebook](https://github.com/siyuan-note/siyuan/issues/14823)
* [Improve inserting a new item at the end of a list via `Alt+Enter`](https://github.com/siyuan-note/siyuan/pull/16314)
* [Content should fill the viewport when jumping to the bottom using dynamic scrollbar](https://github.com/siyuan-note/siyuan/issues/16906)
* [Add a dialog box for Markdown export parameters](https://github.com/siyuan-note/siyuan/issues/17031)
* [Abnormal GPU Usage on macOS](https://github.com/siyuan-note/siyuan/issues/17087)
* [Supports returning a list of files from data snapshots via filename search](https://github.com/siyuan-note/siyuan/issues/17258)
* [File exports no longer rely on browser downloads on desktop](https://github.com/siyuan-note/siyuan/issues/17405)
@@ -90,6 +92,7 @@ Below are the detailed changes in this version.
* [Improve IFrame block](https://github.com/siyuan-note/siyuan/issues/17659)
* [Provide online user guides via the publishing service](https://github.com/siyuan-note/siyuan/issues/17673)
* [Improve PDF export preview UI](https://github.com/siyuan-note/siyuan/issues/17687)
* [Font menu supports search](https://github.com/siyuan-note/siyuan/issues/17691)
* [Rename "Access auth code" to "Lock screen password"](https://github.com/siyuan-note/siyuan/issues/17701)
* [Avoid long wait when exiting while data repo purge is in progress](https://github.com/siyuan-note/siyuan/issues/17711)
* [Prevent style leakage when typing after closing Markdown marks](https://github.com/siyuan-note/siyuan/issues/17737)
@@ -111,6 +114,8 @@ Below are the detailed changes in this version.
* [Share a single Lute instance across all editors to reduce multi-tab memory cost](https://github.com/siyuan-note/siyuan/issues/17869)
* [Improve the drag-and-drop experience in the list and super block](https://github.com/siyuan-note/siyuan/issues/17893)
* [Block icons support quickly inserting blocks above or below](https://github.com/siyuan-note/siyuan/issues/17900)
* [Dock panel minimum width not saved in layout; fails to maintain width during movement](https://github.com/siyuan-note/siyuan/issues/17919)
* [Automatically refresh local DNS cache and retry when data sync fails due to DNS issues on Windows](https://github.com/siyuan-note/siyuan/issues/17936)
### Abolishment
@@ -149,6 +154,7 @@ Below are the detailed changes in this version.
* [Upgrade to Electron v41.9.0](https://github.com/siyuan-note/siyuan/issues/17617)
* [No longer create table `blocks_fts_case_insensitive`](https://github.com/siyuan-note/siyuan/issues/17849)
* [Upgrade to highlight.js v11.11.2](https://github.com/siyuan-note/siyuan/issues/17928)
### Development
+6
View File
@@ -34,6 +34,7 @@
* [支持内核插件系统](https://github.com/siyuan-note/siyuan/pull/17487)
* [命令行接口](https://github.com/siyuan-note/siyuan/issues/17674)
* [新的设置界面](https://github.com/siyuan-note/siyuan/pull/17675)
* [支持配置密钥和变量](https://github.com/siyuan-note/siyuan/issues/17933)
### 改进功能
@@ -57,6 +58,7 @@
* [鼠标移离笔记本后工具提示不会隐藏](https://github.com/siyuan-note/siyuan/issues/14823)
* [改进通过 `Alt+Enter` 在列表末尾插入新项的体验](https://github.com/siyuan-note/siyuan/pull/16314)
* [使用动态滚动条跳转到底部时,内容应填满视口](https://github.com/siyuan-note/siyuan/issues/16906)
* [新增 Markdown 导出参数对话框](https://github.com/siyuan-note/siyuan/issues/17031)
* [macOS 上 GPU 使用异常](https://github.com/siyuan-note/siyuan/issues/17087)
* [支持通过文件名搜索从数据快照中返回文件列表](https://github.com/siyuan-note/siyuan/issues/17258)
* [桌面端文件导出不再依赖浏览器下载](https://github.com/siyuan-note/siyuan/issues/17405)
@@ -90,6 +92,7 @@
* [改进 IFrame 块](https://github.com/siyuan-note/siyuan/issues/17659)
* [通过发布服务提供在线用户指南](https://github.com/siyuan-note/siyuan/issues/17673)
* [改进 PDF 导出预览界面](https://github.com/siyuan-note/siyuan/issues/17687)
* [字体菜单支持搜索](https://github.com/siyuan-note/siyuan/issues/17691)
* [将“访问授权码”重命名为“锁屏密码”](https://github.com/siyuan-note/siyuan/issues/17701)
* [避免数据仓库清理过程中退出时的长时间等待](https://github.com/siyuan-note/siyuan/issues/17711)
* [防止关闭 Markdown 标记后输入时的样式泄漏](https://github.com/siyuan-note/siyuan/issues/17737)
@@ -111,6 +114,8 @@
* [所有编辑器共享同一个 Lute 实例,以降低多标签页内存占用](https://github.com/siyuan-note/siyuan/issues/17869)
* [改进列表和超级块中的拖放体验](https://github.com/siyuan-note/siyuan/issues/17893)
* [块图标支持在上方或下方快速插入块](https://github.com/siyuan-note/siyuan/issues/17900)
* [侧边栏面板最小宽度未保存到布局,移动时无法维持宽度](https://github.com/siyuan-note/siyuan/issues/17919)
* [Windows 上数据同步因 DNS 问题失败时,自动刷新本地 DNS 缓存并重试](https://github.com/siyuan-note/siyuan/issues/17936)
### 移除功能
@@ -149,6 +154,7 @@
* [升级至 Electron v41.9.0](https://github.com/siyuan-note/siyuan/issues/17617)
* [不再创建表 `blocks_fts_case_insensitive`](https://github.com/siyuan-note/siyuan/issues/17849)
* [升级至 highlight.js v11.11.2](https://github.com/siyuan-note/siyuan/issues/17928)
### 开发者
+6
View File
@@ -34,6 +34,7 @@
* [支援內核插件系統](https://github.com/siyuan-note/siyuan/pull/17487)
* [命令列介面](https://github.com/siyuan-note/siyuan/issues/17674)
* [新的設定介面](https://github.com/siyuan-note/siyuan/pull/17675)
* [支援設定金鑰和變數](https://github.com/siyuan-note/siyuan/issues/17933)
### 改進功能
@@ -57,6 +58,7 @@
* [滑鼠移離筆記本後工具提示不會隱藏](https://github.com/siyuan-note/siyuan/issues/14823)
* [改進透過 `Alt+Enter` 在清單末端插入新項目的體驗](https://github.com/siyuan-note/siyuan/pull/16314)
* [使用動態捲軸跳到底部時,內容應填滿視窗](https://github.com/siyuan-note/siyuan/issues/16906)
* [新增 Markdown 匯出參數對話框](https://github.com/siyuan-note/siyuan/issues/17031)
* [macOS 上 GPU 使用異常](https://github.com/siyuan-note/siyuan/issues/17087)
* [支援透過檔案名稱搜尋從資料快照返回檔案清單](https://github.com/siyuan-note/siyuan/issues/17258)
* [桌面端檔案匯出不再依賴瀏覽器下載](https://github.com/siyuan-note/siyuan/issues/17405)
@@ -90,6 +92,7 @@
* [改進 IFrame 區塊](https://github.com/siyuan-note/siyuan/issues/17659)
* [透過發布服務提供線上使用者指南](https://github.com/siyuan-note/siyuan/issues/17673)
* [改進 PDF 匯出預覽介面](https://github.com/siyuan-note/siyuan/issues/17687)
* [字型選單支援搜尋](https://github.com/siyuan-note/siyuan/issues/17691)
* [將「存取授權碼」重新命名為「鎖定螢幕密碼」](https://github.com/siyuan-note/siyuan/issues/17701)
* [避免資料倉庫清理過程中結束時的長時間等待](https://github.com/siyuan-note/siyuan/issues/17711)
* [防止關閉 Markdown 標記後輸入時的樣式洩漏](https://github.com/siyuan-note/siyuan/issues/17737)
@@ -111,6 +114,8 @@
* [所有編輯器共享同一個 Lute 實例,以降低多分頁記憶體佔用](https://github.com/siyuan-note/siyuan/issues/17869)
* [改進清單和超級區塊中的拖放體驗](https://github.com/siyuan-note/siyuan/issues/17893)
* [區塊圖示支援在上方或下方快速插入區塊](https://github.com/siyuan-note/siyuan/issues/17900)
* [側邊欄面板最小寬度未儲存到佈局,移動時無法維持寬度](https://github.com/siyuan-note/siyuan/issues/17919)
* [Windows 上資料同步因 DNS 問題失敗時,自動重新整理本地 DNS 快取並重試](https://github.com/siyuan-note/siyuan/issues/17936)
### 移除功能
@@ -149,6 +154,7 @@
* [升級至 Electron v41.9.0](https://github.com/siyuan-note/siyuan/issues/17617)
* [不再建立資料表 `blocks_fts_case_insensitive`](https://github.com/siyuan-note/siyuan/issues/17849)
* [升級至 highlight.js v11.11.2](https://github.com/siyuan-note/siyuan/issues/17928)
### 開發者
+5
View File
@@ -466,6 +466,11 @@ export const bindEditEvent = (options: {
blockID: options.blockID
});
(options.menuElement.querySelector('[data-type="addOption"]') as HTMLInputElement).focus();
// 添加选项后面板增高,需按首次锚点重新定位(sticky 锁底部,顶部上移避免溢出视口)
const prevTop = parseFloat(options.menuElement.dataset.positionTop);
if (!isNaN(prevTop)) {
setPosition(options.menuElement, parseFloat(options.menuElement.dataset.positionX), prevTop, 0, 0, true);
}
}
});
}
+19
View File
@@ -12,6 +12,7 @@ import * as dayjs from "dayjs";
import {getFieldsByData} from "./view";
import {getFieldIdByCellElement} from "./row";
import {Constants} from "../../../constants";
import {setPosition} from "../../../util/setPosition";
let cellValues: IAVCellValue[];
@@ -138,7 +139,13 @@ export const removeCellOption = (protyle: IProtyle, cellElements: HTMLElement[],
return true;
}
});
// chips 减少导致菜单高度变化后重新定位(锁底部,顶部自适应),需在移除 target 前获取 menuElement
const menuElement = hasClosestByClassName(target, "b3-menu");
target.remove();
if (menuElement) {
const cellRect = cellElements[cellElements.length - 1].getBoundingClientRect();
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height, 0, true);
}
};
export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement, blockElement: Element, isCustomAttr: boolean, cellElements?: HTMLElement[]) => {
@@ -236,6 +243,9 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
}
if (selectedElement) {
menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll + (menuElement.querySelector(".b3-chips").clientHeight - oldChipsHeight);
// chips 增减导致菜单高度变化后重新定位(锁底部,顶部自适应,避免底部溢出视口)
const cellRect = cellElements[cellElements.length - 1].getBoundingClientRect();
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height, 0, true);
}
});
if (menu.isOpen) {
@@ -353,6 +363,9 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
}
if (selectedElement) {
menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll + (menuElement.querySelector(".b3-chips").clientHeight - oldChipsHeight);
// chips 增减导致菜单高度变化后重新定位(锁底部,顶部自适应,避免底部溢出视口)
const cellRect = cellElements[cellElements.length - 1].getBoundingClientRect();
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height, 0, true);
}
}, undefined, true);
}
@@ -443,6 +456,9 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
bindSelectEvent(protyle, data, menuElement, cellElements, blockElement);
}
menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll;
// chips 增减导致菜单高度变化后重新定位(锁底部,顶部自适应,避免底部溢出视口)
const cellRect = cellElements[cellElements.length - 1].getBoundingClientRect();
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height, 0, true);
name = inputElement.value;
desc = descElement.value;
color = newColor;
@@ -641,6 +657,9 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H
bindSelectEvent(protyle, data, menuElement, cellElements, blockElement);
menuElement.querySelector("input").focus();
menuElement.querySelector(".b3-menu__items").scrollTop = oldScroll + (menuElement.querySelector(".b3-chips").clientHeight - oldChipsHeight);
// chips 增减导致菜单高度变化后重新定位(锁底部,顶部自适应,避免底部溢出视口)
const cellRect = cellElements[cellElements.length - 1].getBoundingClientRect();
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height, 0, true);
}
};
+12 -4
View File
@@ -20,14 +20,22 @@ export const setPosition = (element: HTMLElement, left: number, top: number, tar
}
if (sticky) {
// 粘滞定位:同一锚点(top 不变)下,锁定底部边缘
// 菜单内容变化导致高度增减时,底部不动、顶部上下移动(向上撑开/向下收缩),避免位置跳动和底部溢出
// 粘滞定位:同一锚点(top 不变)下保持稳定
// - 下方有空间时优先向下展开(用首次锚点 top,底部随高度自然延伸)
// - 下方放不下时才向上撑开(锁定底部边缘,顶部上移)
// 由此菜单高度增减时既不跳动也不溢出
const lockedBottom = element.dataset.positionBottom;
const lockedX = element.dataset.positionX;
const sameAnchor = element.dataset.positionTop === String(top);
if (sameAnchor && lockedBottom !== undefined) {
const newTop = parseFloat(lockedBottom) - rect.height;
element.style.top = (newTop >= topBarHeight ? newTop : topBarHeight) + "px";
if (top + rect.height <= window.innerHeight) {
// 下方放得下:向下展开,回到首次锚点
element.style.top = top + "px";
} else {
// 下方放不下:向上撑开,锁定底部边缘
const newTop = parseFloat(lockedBottom) - rect.height;
element.style.top = (newTop >= topBarHeight ? newTop : topBarHeight) + "px";
}
}
if (sameAnchor && lockedX !== undefined) {
element.style.left = lockedX + "px";
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -8,7 +8,7 @@ require (
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20260609090754-168309361d92
github.com/88250/lute v1.7.7-0.20260625050538-f615ca8642cc
github.com/88250/lute v1.7.7-0.20260625145747-9435ed0a925c
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
github.com/ConradIrwin/font v0.2.2-0.20260202161408-44ae4cf5fb22
+2 -2
View File
@@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20260612032504-d7314231d840 h1:j1Ln3/ZUMz
github.com/88250/go-sqlite3 v1.14.13-0.20260612032504-d7314231d840/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20260609090754-168309361d92 h1:/DtFVbsSdZLqbADVnFUz2vsNl8d1NPm98yxKdYnpB8I=
github.com/88250/gulu v1.2.3-0.20260609090754-168309361d92/go.mod h1:D+Db16m0N7r9MLZCMcj1a0ZsEGQAxDZkadOn79Gh0vI=
github.com/88250/lute v1.7.7-0.20260625050538-f615ca8642cc h1:oNwS8FoCQdMq18ucpRMGC4qa9LpnrHlCJdPP8ggxQIo=
github.com/88250/lute v1.7.7-0.20260625050538-f615ca8642cc/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
github.com/88250/lute v1.7.7-0.20260625145747-9435ed0a925c h1:rTB9fgYnzRZN6Yq7EvIXP9YnbK/BsJyxVJD2/x884JA=
github.com/88250/lute v1.7.7-0.20260625145747-9435ed0a925c/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46 h1:Bq1JsDfVbHKUxNL/B2JXd8cC/1h6aFjrlXpGycnh0Hk=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=