Be able to re-use windows/splits by plugins

未关闭
#370 4 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@EduardMe 已经在做这个了。

开始于 2022年12月2日。

评估

这个 Issue 还没有评估数据。

描述

API E-2 enhancement P-7

We can ask for new windows or split-view panels to be shown from API calls.
But as we use these more, we need some other controls as well. Particularly, to reuse existing splits/windows if open when opening a new split or window. This will stop many windows piling up when calling the same commands in quick succession.

I can think of various potential solutions, but as I don't know the relative complexity of these, I'll restrict myself to giving some more detailed use cases.

SearchExtensions' /quickSearch and /searchOver* commands

These commands open a new split window as a convenience when they run. When you run the command again (or via the psuedo-button at the top of the note), another split window is created, even when there's an existing split showing the same note.
I want a way to say "show note in new split, unless that note is already open in a window, in which case just give it focus".

Reviews' /project lists command

This opens an HTML window. If it's run again, it re-uses the same window -- this is what I want in the first use case above.
But it's easier here, as there's a limit of just 1 HTML window at a time.
When that limit is removed, this also needs a way to say 'reuse'.

NoteHelpers' /open current note new split

To make things slightly harder, this command shows the need to be able to deliberately open a second split view of the same note as is already open in the Editor.

主要语言
JavaScript
星标
204
派生
82
平均合并
22 小时 27 分钟
30 天内合并 PR
3

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NotePlan/plugins 的其他 Issue

查看 NotePlan/plugins 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。