Commit graph

99 commits

Author SHA1 Message Date
Vanessa
219ec0f292 🎨 https://github.com/siyuan-note/siyuan/pull/15814 2025-10-16 11:09:45 +08:00
Vanessa
214ceb37b1 🎨 https://github.com/siyuan-note/siyuan/pull/15814 2025-10-15 20:32:13 +08:00
Achuan-2
7545c2517f
Improve the outline panel (#15814)
*  实现大纲持久化
- 添加折叠状态变化的实时保存功能
- 在文档更新时恢复折叠状态
- 保存拖拽前的折叠状态并在拖拽后恢复
- 更新本地存储结构以支持折叠状态

* 🎨 clean code

*  在`data/storage`文件夹下创建`outline/${docID}.json`文件,存储标题outline展开信息

*  alt click折叠/展开统计标题

* 添加层级控制功能
- 新增层级控制滑条,允许用户展开指定层级

* 🌐 添加多语言支持的展开层级功能

*  f添加层级重置显示功能
- 新增 resetLevelDisplay 方法以重置层级显示状态
- 更新层级控制的初始化逻辑,默认不显示层级
- 在文档切换时重置层级显示状态

* 优化层级控制功能
- 添加用户主动层级控制标记
- 修改层级显示重置逻辑,仅在非用户操作时重置
- 更新层级控制滑条的点击事件处理

* ♻️ 重构大纲存储逻辑
- 合并大纲存储为单一文件 outline.json

* ♻️ outline.json 单行存储

* ♻️ outline.json参考recent-doc.json,只存储前1000个文档信息,每次新增信息会把数据放在最前面

* ♻️单行存储json

* ♻️ 增加outline.json存储限制至2000个

*  新增`保持当前标题展开`按钮,`保持全部展开`改为`全部展开`按钮

*  保持当前标题展开优化
- 超过两级折叠,也能都展开
- 如果父节点折叠,展开时自动折叠兄弟节点,只展开当前节点路径,如果父节点是展开状态,则不影响兄弟节点折叠状态

* 🔥 移除层级文本

*  右键点击toggle时展开所有子标题

*  右键click点击折叠图标,会折叠/展开所有子标题

*  大纲支持筛选功能

*  feat(大纲): 优化筛选功能以显示所有子标题
- 添加 showAllDescendants 函数以显示所有子标题
- 修改 processUL 函数以在父标题命中时显示所有子标题
- 确保未命中的子标题隐藏

*  优化大纲筛选

- 如果标题命中筛选,这个标题的所有父标题展开,以显示出这个标题位置
- 如果父标题命中筛选,子项都没有命中筛选,则折叠全部子项(依然可以展开显示)
- 如果父标题命中筛选,子项也有命中筛选,则展开命中的子项,其他无关子项隐藏

* 💄 展开层级改为按钮,原先的圆点样式碍眼

* 💄 展开层级改为按钮,原先的圆点样式碍眼

* 💄 style(菜单): 优化展开层级菜单的样式和位置
- 添加图标以增强可视化
- 调整菜单弹出位置以改善用户体验

* ♻️ refactor(大纲): 优化标题级别获取逻辑
- 调整展开到指定层级的逻辑,使用标题级别进行判断

* 🎨

*  feat(大纲): 添加右键菜单功能
- 实现右键点击标题时显示上下文菜单
- 增加标题升级、降级、插入、删除等操作
- 基于标题级别展开/折叠同级标题

*  feat(大纲): 添加子标题功能
- 在右键菜单中添加“添加子标题”选项
- 实现子标题的添加逻辑,支持最大级别为H6
- 使用当前标题作为父标题,插入新子标题

*  feat(大纲): "添加子标题"确保父标题展开状态

*  feat(大纲): 使用expandIds方式保存父标题展开状态
- 确保父标题保持展开状态
- 保存展开状态到持久化存储
- 移除冗余的状态保存逻辑

*  feat(大纲): 调整右键菜单顺序,将“全部折叠”功能移至“全部展开”之后

* 🌐 i18n optimization
2025-10-15 10:01:47 +08:00
Vanessa
508eb93183 ♻️ https://github.com/siyuan-note/siyuan/pull/15347 2025-07-23 13:08:38 +08:00
Jeffrey Chen
c88f99646c
Replace the deprecated isSameNode method in DOM Level 4 with the === operator (#15347) 2025-07-23 12:21:59 +08:00
Vanessa
c4f42142a8 🎨 https://github.com/siyuan-note/siyuan/issues/15111 2025-06-22 18:11:04 +08:00
Vanessa
47ec703f18 🎨 https://github.com/siyuan-note/siyuan/issues/14729 2025-05-08 16:57:30 +08:00
Vanessa
783573ee8a 🎨 https://github.com/siyuan-note/siyuan/issues/14725 2025-05-06 13:20:58 +08:00
Vanessa
626d5ecd32 🎨 https://github.com/siyuan-note/siyuan/pull/14312 2025-03-10 11:45:43 +08:00
sommermorgentraum
aedbd6bee8
Refactor setCurrentById of Outline func scroll policy (#14312)
* scroll for outline

* remove kernel bin

* remove debug print

* gitignore
2025-03-10 11:41:05 +08:00
Vanessa
225ebc5dce 🎨 https://github.com/siyuan-note/siyuan/pull/13999 2025-02-08 19:23:58 +08:00
Jeffrey Chen
2088200677
fix: 未打开文档时点击大纲会弹出 未找到 ID 为 [] 的内容块 (#14026)
fix https://ld246.com/article/1738820297928
2025-02-07 10:42:29 +08:00
Vanessa
e5867b0c2e 🎨 https://github.com/siyuan-note/siyuan/pull/13999 2025-02-05 10:57:43 +08:00
Jeffrey Chen
180338a86f
fix: 改进文档树和大纲拖拽排序 (#13999)
fix https://github.com/siyuan-note/siyuan/issues/13901
2025-02-05 10:39:52 +08:00
Vanessa
20c225b7a3 🎨 关闭面板 2025-01-11 12:30:21 +08:00
Vanessa
544d82216b ♻️ https://github.com/siyuan-note/siyuan/issues/13785 2025-01-11 12:22:44 +08:00
Vanessa
a5c6b68103 🐛 https://github.com/siyuan-note/siyuan/issues/13409 2024-12-10 11:44:39 +08:00
Vanessa
b0229e6c7a 🎨 https://github.com/siyuan-note/siyuan/issues/12721 2024-10-25 16:58:06 +08:00
Vanessa
141889f058 https://github.com/siyuan-note/siyuan/issues/11981 2024-09-18 11:34:41 +08:00
Vanessa
e465fe5f97 🎨 https://github.com/siyuan-note/siyuan/issues/11981 2024-09-15 17:14:19 +08:00
Vanessa
8bb5c190b9 🎨 fix https://github.com/siyuan-note/siyuan/issues/12125 2024-09-14 17:05:06 +08:00
Vanessa
de69e19ab7 🎨 https://github.com/siyuan-note/siyuan/issues/12030 2024-09-12 21:47:05 +08:00
Vanessa
da7aad062d 🎨 https://github.com/siyuan-note/siyuan/issues/12029#issuecomment-2327872613 2024-09-08 22:23:59 +08:00
Vanessa
8c36764686 🚨 2024-07-06 09:57:00 +08:00
Vanessa
904b9faf8c 🎨 fix https://github.com/siyuan-note/siyuan/issues/11843 2024-07-04 23:29:59 +08:00
Vanessa
709af9adbf 🎨 https://github.com/siyuan-note/siyuan/issues/11529 2024-05-25 17:29:21 +08:00
Vanessa
92fb473d3e 🎨 https://github.com/siyuan-note/siyuan/issues/11372 2024-05-13 23:32:56 +08:00
Vanessa
9cc706c1b2 🎨 fix https://github.com/siyuan-note/siyuan/issues/10969 2024-04-10 18:35:45 +08:00
Vanessa
7089ab5de6 🚨 2024-04-09 08:24:34 +08:00
Vanessa
859e19d755 🎨 fix https://github.com/siyuan-note/siyuan/issues/10884 2024-04-08 20:45:31 +08:00
Vanessa
3c5775743e 🎨 fix https://github.com/siyuan-note/siyuan/issues/10931 2024-04-08 17:28:56 +08:00
Vanessa
7510c7dd22 🎨 https://github.com/siyuan-note/siyuan/issues/10884 2024-04-08 12:32:47 +08:00
Vanessa
c978a42d3f 🚨 2024-04-07 23:58:24 +08:00
Vanessa
60e2b51763 🎨 https://github.com/siyuan-note/siyuan/issues/10828 2024-04-03 21:32:00 +08:00
Daniel
5807ce7d35
🔖 Release v3.0.7 2024-04-03 16:04:13 +08:00
Vanessa
655d7cd41b 🎨 https://github.com/siyuan-note/siyuan/issues/10828 2024-04-02 23:50:22 +08:00
Vanessa
da63ef1be7 🎨 https://github.com/siyuan-note/siyuan/issues/10828 2024-04-02 23:34:30 +08:00
Vanessa
299437d751
🎨 Improve database template empty date rendering https://github.com/siyuan-note/siyuan/issues/10830 2024-04-02 21:15:07 +08:00
Vanessa
cebeba34ca 🎨 https://github.com/siyuan-note/siyuan/issues/10828 2024-04-02 20:42:16 +08:00
Vanessa
c6d69fd6f8 🎨 https://github.com/siyuan-note/siyuan/issues/10828 2024-04-02 17:32:20 +08:00
Vanessa
4df5be8f3f 🎨 https://github.com/siyuan-note/siyuan/issues/10828 2024-04-02 16:58:44 +08:00
Vanessa
8f3bc2f22c 🎨 https://github.com/siyuan-note/siyuan/issues/10828 2024-04-02 15:46:02 +08:00
Vanessa
daf043bd0c 🚨 2024-03-30 18:18:41 +08:00
Vanessa
4fe420a242 🎨 https://github.com/siyuan-note/siyuan/issues/7957 2024-03-29 21:29:57 +08:00
Vanessa
66360757b3 🎨 https://github.com/siyuan-note/siyuan/issues/7957 2024-03-29 20:48:02 +08:00
Vanessa
73d232bafb 🎨 https://github.com/siyuan-note/siyuan/issues/7957 2024-03-29 11:03:53 +08:00
Vanessa
b7f49bde1e 🎨 https://github.com/siyuan-note/siyuan/issues/7957 2024-03-29 10:08:58 +08:00
Vanessa
c9b2db8818 🎨 fix https://github.com/siyuan-note/siyuan/issues/10365 2024-02-19 17:12:59 +08:00
Vanessa
2f6d2cb28a 🎨 https://github.com/siyuan-note/siyuan/issues/10142 2024-01-19 23:59:34 +08:00
Vanessa
2b3b78485d 2023-12-12 12:09:31 +08:00