Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support focus block export template #8117

Closed
2 tasks
frostime opened this issue Apr 27, 2023 · 7 comments
Closed
2 tasks

Support focus block export template #8117

frostime opened this issue Apr 27, 2023 · 7 comments
Assignees
Milestone

Comments

@frostime
Copy link
Contributor

frostime commented Apr 27, 2023

In what scenarios do you need this feature?

  • 导出模板的时候允许自定义名称
  • 聚焦模式下导出模板时只导出当前视图的内容

说明

本 issue 受到社区文章 关于思源笔记运营推广方案的一些想法 的启发,意在降低创建模板的门槛。

这两个 TODO 分别对应两个问题:

  1. 导出模板的名称和文档名一模一样
  2. 导出模板的时候默认一次性把整个页面的内容全部作为模板导出

这两个点可以归结为一类:想要创建模板就必须单独创建一个独立的文件,单独命名。

然而思源倡导 daily note 工作流。我想要创建模板往往是我自己工作的时候发现自己刚刚调出来的块特别好用,想要随手转成模板。而由于上面提到的问题,我就必须:

  1. 单独创建一个文件
  2. 把模板内容单独复制过去

我认为这增加了心智负担。

Describe the optimal solution

  1. 导出的时候跳出一个对话确认框,用于编辑模板名称,默认和当前文件名一样
  2. 如果在聚焦模式下导出模板,就只导出当前可视的部分

Describe the candidate solution

No response

Other information

No response

@frostime
Copy link
Contributor Author

frostime commented Apr 27, 2023

补充一个:

  • 选择模板的时候允许按照 folder tree 来选择。这样就算以后模板多起来了,也不至于眼花缭乱。

按下面仁兄的分析,这个先不考虑吧。

@tcmtom
Copy link

tcmtom commented Apr 27, 2023

补充一个:

  • 选择模板的时候允许按照 文件夹树 来选择。这样就算以后模板多起来了,也不至于眼花缭乱。

那里有个搜索框,把整个文档树放进去太小了,塞不开的

@frostime
Copy link
Contributor Author

补充一个:

  • 选择模板的时候允许按照 文件夹树 来选择。这样就算以后模板多起来了,也不至于眼花缭乱。

那里有个搜索框,把整个文档树放进去太小了,塞不开的

哦,还有这种问题啊,那这条不算也行。

@88250 88250 changed the title 优化导出模板功能 Support for named and focused exports when exporting templates Apr 28, 2023
@88250
Copy link
Member

88250 commented Apr 28, 2023

这个设计每次都需要填名字会不会太麻烦?比如聚焦后导出,不大可能自动提取名称的。

@frostime
Copy link
Contributor Author

frostime commented Apr 28, 2023

这个设计每次都需要填名字会不会太麻烦?比如聚焦后导出,不大可能自动提取名称的。

将原文档名称作为默认值预先填入文本框,然后用户自己决定要不要修改如何?

这样的话默认行为和之前一样,用户只需要点一个「确定」,模板还是按照之前的文档命名导出;如果他有自定义需求,那就自己修改对话框里文件命名。

@88250
Copy link
Member

88250 commented Apr 28, 2023

聚焦的块不同,估计每次用户都要改。似乎也没有更好的方案了,我们先这样考虑着看吧,谢谢。

@88250 88250 added this to the 2.8.7 milestone Apr 28, 2023
@88250 88250 changed the title Support for named and focused exports when exporting templates Support focus block export template Apr 28, 2023
@88250
Copy link
Member

88250 commented Apr 28, 2023

使用块的文本默认填充名称输入框,最长 32 个字。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants