Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/11053

Vanessab7780e8becf4
diff --git a/app/src/dialog/tooltip.ts b/app/src/dialog/tooltip.ts
index 2e89e40945..ffd126145a 100644
--- a/app/src/dialog/tooltip.ts
+++ b/app/src/dialog/tooltip.ts
@@ -42,9 +42,9 @@ export const showTooltip = (message: string, target: Element, tooltipClass?: str
// file tree and outline、backlink
top = parentRect.top;
left = parentRect.right + 8;
- } else if (position === "parentW") {
+ } else if (position?.endsWith("parentW")) {
// 数据库属性视图
- top = parentRect.top + 8;
+ top = parentRect.top + parseInt(position) || 8;
left = parentRect.left - messageElement.clientWidth;
}
diff --git a/app/src/protyle/render/av/select.ts b/app/src/protyle/render/av/select.ts
index eb64c86a88..660f067e7c 100644
--- a/app/src/protyle/render/av/select.ts
+++ b/app/src/protyle/render/av/select.ts
@@ -31,7 +31,7 @@ const filterSelectHTML = (key: string, options: {
html += `<button data-type="addColOptionOrCell" class="b3-menu__item" data-name="${escapeAttr(item.name)}" data-desc="${escapeAttr(item.desc || "")}" draggable="true" data-color="${item.color}">
<svg class="b3-menu__icon fn__grab"><use xlink:href="#iconDrag"></use></svg>
<div class="fn__flex-1">
- <span class="b3-chip" style="background-color:var(--b3-font-background${item.color});color:var(--b3-font-color${item.color})">
+ <span class="b3-chip ariaLabel" data-position="2parentW" aria-label="${escapeAriaLabel(item.desc)}" style="background-color:var(--b3-font-background${item.color});color:var(--b3-font-color${item.color})">
<span class="fn__ellipsis">${escapeHtml(item.name)}</span>
</span>
</div>
@@ -50,7 +50,7 @@ const filterSelectHTML = (key: string, options: {
<svg class="b3-menu__icon"><use xlink:href="#iconAdd"></use></svg>
<div class="fn__flex-1">
<span class="b3-chip" style="background-color:var(--b3-font-background${colorIndex});color:var(--b3-font-color${colorIndex})">
- <span class="fn__ellipsis">${key}</span>
+ <span class="fn__ellipsis">${escapeHtml(key)}</span>
</span>
</div>
<span class="b3-menu__accelerator">${window.siyuan.languages.enterKey}</span>
@@ -165,6 +165,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
column.options.find((item) => {
if (item.name === name) {
item.name = inputElement.value;
+ item.desc = descElement.value;
return true;
}
});
@@ -241,6 +242,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
}
})
descElement.addEventListener("keydown", (event: KeyboardEvent) => {
+ inputElement.nextElementSibling.setAttribute("aria-label", descElement.value ? escapeAriaLabel(descElement.value) : window.siyuan.languages.addDesc);
if (event.isComposing) {
return;
}