windingwind / zotero-better-notes

Everything about note management. All in Zotero.
GNU Affero General Public License v3.0
5.11k stars 182 forks source link

[Feature] 工作区跳转到已打开笔记预览的笔记时重新聚焦 #996

Closed woqq111 closed 2 months ago

woqq111 commented 2 months ago

Is there an existing issue for this?

Environment

Describe the feature request

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

在工作区中进行笔记跳转,会在右侧打开笔记预览,但是如果已经打开的情况下,不会聚焦到目标笔记

在日志中可以看到下面的输出:

(2)(+1232671): ItemPaneManager: 'paneID' must be unique, got Knowledge4Zotero-windingwind-com-bn-note-preview-4AkloWdn-10052 this.warn@chrome://zotero/content/xpcom/zotero.js:1258:71 _validateSectionOptions@chrome://zotero/content/xpcom/itemPaneManager.js:272:14 _addSection@chrome://zotero/content/xpcom/itemPaneManager.js:186:15 registerSection@chrome://zotero/content/xpcom/itemPaneManager.js:145:29 openNotePreview@jar:file:///C:/Users/Eric/AppData/Roaming/Zotero/Zotero/Profiles/798ewhve.default/extensions/Knowledge4Zotero@windingwind.com.xpi!/chrome/content/scripts/BetterNotes.js:33087:41 onOpenNote@jar:file:///C:/Users/Eric/AppData/Roaming/Zotero/Zotero/Profiles/798ewhve.default/extensions/Knowledge4Zotero@windingwind.com.xpi!/chrome/content/scripts/BetterNotes.js:35958:24 doAction@jar:file:///C:/Users/Eric/AppData/Roaming/Zotero/Zotero/Profiles/798ewhve.default/extensions/Knowledge4Zotero@windingwind.com.xpi!/chrome/content/scripts/BetterNotes.js:28150:23 ZoteroPane</this.loadURI@chrome://zotero/content/zoteroPane.js:4019:21 _messageHandler@chrome://zotero/content/xpcom/editorInstance.js:547:18 

Why do you need this feature? A clear and concise description of why you need this feature.

当我工作区右侧打开的笔记预览较多时,如果无法在跳转到已打开笔记时聚焦,我可能找不到目标笔记

Describe the solution you'd like

The solution you'd like A clear and concise description of what you want to happen.

我希望在跳转时检索是否存在,如果存在,执行如下行为: 运行类似最右侧竖条中笔记跳转的代码,但是如果跳转的行与当前显示的行不同,需要重新定位行。 或执行如下行为: 关闭目标笔记预览,重新跳转

Alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

当前我想到的解决方法是关闭全部的笔记预览,然后重新跳转

Anything else?

No response

github-actions[bot] commented 2 months ago

:rocket: This ticket has been resolved in v1.1.4-beta.80. See Release v1.1.4-beta.80 for release notes.

woqq111 commented 2 months ago

感谢,已经实现了在工作区进行笔记跳转时,如果目标笔记预览已经打开,会聚焦并跳转至指定行

但是发现每次打开zotero后第一个工作区笔记,是完全可以实现上述功能的,但是如果关闭这篇笔记再打开或者打开另一篇笔记,则无法跳转到已打开的笔记预览,日志仍然输出ItemPaneManager: 'paneID' must be unique

woqq111 commented 2 months ago

作者好,请问我是否需要再开一个 issue,关于这个问题:https://github.com/windingwind/zotero-better-notes/issues/996#issuecomment-2145276496

这是我复现这个问题的日志:Debug Output.txt

github-actions[bot] commented 2 months ago

:rocket: This ticket has been resolved in v1.1.4-beta.82. See Release v1.1.4-beta.82 for release notes.

windingwind commented 2 months ago

一般来说重新开issue较好,应该已经修复了

woqq111 commented 2 months ago

没问题了,非常感谢!