diff --git a/app/changelogs/v2.10.10/v2.10.9.md b/app/changelogs/v2.10.10/v2.10.9.md new file mode 100644 index 000000000..8475cdb7d --- /dev/null +++ b/app/changelogs/v2.10.10/v2.10.9.md @@ -0,0 +1,36 @@ +## Overview + +This is an emergency bug fix version, which mainly solves the compatibility issues of some plugins. + +Advertisement: Currently, `PRO Features` are in the early bird price stage, welcome to [learn more](https://b3log.org/siyuan/en/pricing.html). + +Note: The annual `Subscription` includes `Pro features`. If you are an annual subscriber, you do not need to buy PRO Features separately. + +## Changelogs + +Below are the detailed changes in this version. + +### Enhancement + +* [Improve PDF annotation color](https://github.com/siyuan-note/siyuan/issues/9206) +* [Add plugin CSS and custom CSS to the export PDF page](https://github.com/siyuan-note/siyuan/issues/9376) +* [Code snippet settings use a fixed-width font](https://github.com/siyuan-note/siyuan/issues/9385) +* [Add --b3-font-family to --b3-font-family-code](https://github.com/siyuan-note/siyuan/issues/9386) +* [Authenticate requests of assets other than 127.0.0.1](https://github.com/siyuan-note/siyuan/issues/9388) +* [Rename the .sya annotation file when renaming a PDF asset](https://github.com/siyuan-note/siyuan/issues/9390) +* [Add `Copy block hyperlink (Markdown)` hotkey](https://github.com/siyuan-note/siyuan/issues/9392) +* [Improve toolbar position for select text popup on the mobile](https://github.com/siyuan-note/siyuan/issues/9393) +* [Improve default selection of language hints in code blocks](https://github.com/siyuan-note/siyuan/issues/9396) + +### Bugfix + +* [Exporting Data failed](https://github.com/siyuan-note/siyuan/issues/9389) +* [Fix some plugin compatibility issues](https://github.com/siyuan-note/siyuan/issues/9397) + +### Development + +* [The block in the editor shows the database icon](https://github.com/siyuan-note/siyuan/issues/8894) +* [Improve event bus `open-siyuan-url-plugin`](https://github.com/siyuan-note/siyuan/pull/9256) +* [Improve database created and updated column values](https://github.com/siyuan-note/siyuan/issues/9391) +* [Improve handling of database column filters containing empty values](https://github.com/siyuan-note/siyuan/issues/9394) +* [Adding row overwriting data after enabling filter in database](https://github.com/siyuan-note/siyuan/issues/9395) \ No newline at end of file diff --git a/app/changelogs/v2.10.10/v2.10.9_zh_CHT.md b/app/changelogs/v2.10.10/v2.10.9_zh_CHT.md new file mode 100644 index 000000000..5cb1c060e --- /dev/null +++ b/app/changelogs/v2.10.10/v2.10.9_zh_CHT.md @@ -0,0 +1,36 @@ +## 概述 + +這是一個缺陷緊急修復版,主要解決部分插件的相容性問題。 + +廣告: 目前 `功能特性` 正處於早鳥價階段,歡迎[了解](https://b3log.org/siyuan/pricing.html)。 + +註:`年付訂閱` 包含 `功能特性`,如果你是訂閱會員,則無需單獨購買功能特性。 + +## 變更記錄 + +以下是此版本中的詳細變更。 + +### 改進功能 + +* [改良 PDF 標註顏色](https://github.com/siyuan-note/siyuan/issues/9206) +* [匯出 PDF 時支援外掛 CSS 與程式碼片段 CSS](https://github.com/siyuan-note/siyuan/issues/9376) +* [程式碼片段設定使用等寬字體](https://github.com/siyuan-note/siyuan/issues/9385) +* [在 --b3-font-family-code 中新增 --b3-font-family](https://github.com/siyuan-note/siyuan/issues/9386) +* [非 127.0.0.1 請求 assets 進行鑑權](https://github.com/siyuan-note/siyuan/issues/9388) +* [重命名 PDF 時關聯重命名 .sya 標註檔](https://github.com/siyuan-note/siyuan/issues/9390) +* [新增 `複製區塊引超連結(Markdown)` 快捷鍵](https://github.com/siyuan-note/siyuan/issues/9392) +* [改進行動端文字選擇後的工具列位置](https://github.com/siyuan-note/siyuan/issues/9393) +* [改進程式碼區塊語言預設選擇](https://github.com/siyuan-note/siyuan/issues/9396) + +### 修復缺陷 + +* [匯出資料 Data 失敗](https://github.com/siyuan-note/siyuan/issues/9389) +* [修復一些插件的相容性問題](https://github.com/siyuan-note/siyuan/issues/9397) + +### 開發者 + +* [編輯器中的區塊顯示資料庫角標](https://github.com/siyuan-note/siyuan/issues/8894) +* [改進事件匯流排 `open-siyuan-url-plugin`](https://github.com/siyuan-note/siyuan/pull/9256) +* [改進資料庫建立時間和更新時間列值](https://github.com/siyuan-note/siyuan/issues/9391) +* [改進資料庫列過濾器包含空值時的處理](https://github.com/siyuan-note/siyuan/issues/9394) +* [資料庫啟用過濾器後新增行覆蓋資料](https://github.com/siyuan-note/siyuan/issues/9395) diff --git a/app/changelogs/v2.10.10/v2.10.9_zh_CN.md b/app/changelogs/v2.10.10/v2.10.9_zh_CN.md new file mode 100644 index 000000000..96ed9f4fe --- /dev/null +++ b/app/changelogs/v2.10.10/v2.10.9_zh_CN.md @@ -0,0 +1,36 @@ +## 概述 + +这是一个缺陷紧急修复版,主要解决部分插件的兼容性问题。 + +广告: 目前 `功能特性` 正处于早鸟价阶段,欢迎[了解](https://b3log.org/siyuan/pricing.html)。 + +注:`年付订阅` 包含 `功能特性`,如果你是订阅会员,则无需单独购买功能特性。 + +## 变更记录 + +以下是此版本中的详细变更。 + +### 改进功能 + +* [改进 PDF 标注颜色](https://github.com/siyuan-note/siyuan/issues/9206) +* [导出 PDF 时支持插件 CSS 和代码片段 CSS](https://github.com/siyuan-note/siyuan/issues/9376) +* [代码片段设置使用等宽字体](https://github.com/siyuan-note/siyuan/issues/9385) +* [在 --b3-font-family-code 中添加 --b3-font-family](https://github.com/siyuan-note/siyuan/issues/9386) +* [非 127.0.0.1 请求 assets 进行鉴权](https://github.com/siyuan-note/siyuan/issues/9388) +* [重命名 PDF 时关联重命名 .sya 标注文件](https://github.com/siyuan-note/siyuan/issues/9390) +* [添加 `复制块引超链接(Markdown)` 快捷键](https://github.com/siyuan-note/siyuan/issues/9392) +* [改进移动端文本选择后的工具栏位置](https://github.com/siyuan-note/siyuan/issues/9393) +* [改进代码块语言默认选择](https://github.com/siyuan-note/siyuan/issues/9396) + +### 修复缺陷 + +* [导出数据 Data 失败](https://github.com/siyuan-note/siyuan/issues/9389) +* [修复一些插件的兼容性问题](https://github.com/siyuan-note/siyuan/issues/9397) + +### 开发者 + +* [编辑器中的块显示数据库角标](https://github.com/siyuan-note/siyuan/issues/8894) +* [改进事件总线 `open-siyuan-url-plugin`](https://github.com/siyuan-note/siyuan/pull/9256) +* [改进数据库创建时间和更新时间列值](https://github.com/siyuan-note/siyuan/issues/9391) +* [改进数据库列过滤器包含空值时的处理](https://github.com/siyuan-note/siyuan/issues/9394) +* [数据库启用过滤器后添加行覆盖数据](https://github.com/siyuan-note/siyuan/issues/9395) diff --git a/kernel/av/av.go b/kernel/av/av.go index e689a8db7..9c7c708a8 100644 --- a/kernel/av/av.go +++ b/kernel/av/av.go @@ -99,11 +99,12 @@ type KeySelectOption struct { } type Value struct { - ID string `json:"id,omitempty"` - KeyID string `json:"keyID,omitempty"` - BlockID string `json:"blockID,omitempty"` - Type KeyType `json:"type,omitempty"` - IsDetached bool `json:"isDetached,omitempty"` + ID string `json:"id,omitempty"` + KeyID string `json:"keyID,omitempty"` + BlockID string `json:"blockID,omitempty"` + Type KeyType `json:"type,omitempty"` + IsDetached bool `json:"isDetached,omitempty"` + IsInitialized bool `json:"isInitialized,omitempty"` Block *ValueBlock `json:"block,omitempty"` Text *ValueText `json:"text,omitempty"` diff --git a/kernel/av/table.go b/kernel/av/table.go index 536de5cd7..a829dec2a 100644 --- a/kernel/av/table.go +++ b/kernel/av/table.go @@ -508,6 +508,16 @@ type TableRow struct { Cells []*TableCell `json:"cells"` } +func (row *TableRow) GetBlockValue() (ret *Value) { + for _, cell := range row.Cells { + if KeyTypeBlock == cell.ValueType { + ret = cell.Value + break + } + } + return +} + func (table *Table) GetType() LayoutType { return LayoutTypeTable } @@ -569,6 +579,12 @@ func (table *Table) FilterRows() { rows := []*TableRow{} for _, row := range table.Rows { + block := row.GetBlockValue() + if !block.IsInitialized && nil != block.Block && "" == block.Block.Content && block.IsDetached { + rows = append(rows, row) + continue + } + pass := true for j, index := range colIndexes { operator := table.Filters[j].Operator @@ -578,6 +594,10 @@ func (table *Table) FilterRows() { case FilterOperatorIsNotEmpty: pass = false } + + if KeyTypeText != row.Cells[index].ValueType { + pass = false + } break } diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index afe6667ce..0f14c3c22 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -430,7 +430,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a ial := GetBlockAttrs(row.ID) updatedStr := ial["updated"] if "" == updatedStr { - block := getTableRowBlockValue(row) + block := row.GetBlockValue() cell.Value.Updated = av.NewFormattedValueUpdated(block.Block.Updated, 0, av.UpdatedFormatNone) cell.Value.Updated.IsNotEmpty = true } else { @@ -475,16 +475,6 @@ func getRowBlockValue(keyValues []*av.KeyValues) (ret *av.Value) { return } -func getTableRowBlockValue(row *av.TableRow) (ret *av.Value) { - for _, cell := range row.Cells { - if av.KeyTypeBlock == cell.ValueType { - ret = cell.Value - break - } - } - return -} - func (tx *Transaction) doSetAttrViewName(operation *Operation) (ret *TxErr) { err := setAttributeViewName(operation) if nil != err { @@ -693,7 +683,7 @@ func addAttributeViewBlock(blockID string, operation *Operation, tree *parse.Tre content = getNodeRefText(node) } now := time.Now().UnixMilli() - value := &av.Value{ID: ast.NewNodeID(), KeyID: blockValues.Key.ID, BlockID: blockID, Type: av.KeyTypeBlock, IsDetached: operation.IsDetached, Block: &av.ValueBlock{ID: blockID, Content: content, Created: now, Updated: now}} + value := &av.Value{ID: ast.NewNodeID(), KeyID: blockValues.Key.ID, BlockID: blockID, Type: av.KeyTypeBlock, IsDetached: operation.IsDetached, IsInitialized: false, Block: &av.ValueBlock{ID: blockID, Content: content, Created: now, Updated: now}} blockValues.Values = append(blockValues.Values, value) if !operation.IsDetached { @@ -1301,6 +1291,7 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string, for _, v := range kv.Values { if rowID == v.Block.ID { v.Block.Updated = time.Now().UnixMilli() + v.IsInitialized = true break } }