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

Ignore assets associated with the custom-data-assets block attribute when cleaning unreferenced assets #12574

Closed
suka233 opened this issue Sep 24, 2024 · 5 comments
Assignees
Milestone

Comments

@suka233
Copy link

suka233 commented Sep 24, 2024

清理未引用资源时,文档块也支持忽略custom-data-assets和data-assets属性定义的资源文件

In what scenarios do you need this feature?

开发插件的时候,有一些数据是文档相关的,和文档强绑定的,所以有这个需求,目前看源码,只有widget类型的块支持上述俩属性:
图片

Describe the optimal solution

更改应该很简单 ,全局搜索只有这俩处适配custom-data-assets和data-assets属性。可惜我不会go。
图片

有一点需要注意,custom-data-assets和data-assets的设计可能要优化一下:因为过往这俩忽略属性只在widget块生效,所以一般不会有其它的插件或者挂件占用。

但是一旦文档块要加上这俩忽略属性的话,可能会有不同的插件都需要使用这个属性,这个时候,设计成忽略所有以custom-data-assets和data-assets开头的属性的资源内容更合理。
比如custom-data-assets-xxx1,custom-data-assets-xxx2都应该被正确处理。

Describe the candidate solution

No response

Other information

No response

@88250 88250 self-assigned this Sep 24, 2024
@88250 88250 changed the title 清理未引用资源时,文档块也支持忽略custom-data-assets和data-assets属性定义的资源文件 Ignore assets associated with the custom-data-assets block attribute when cleaning unreferenced assets Sep 24, 2024
@88250
Copy link
Member

88250 commented Sep 24, 2024

data-assets 是个过时的属性,这里不再支持了,仅考虑 custom-data-assets 开头的属性。

88250 added a commit that referenced this issue Sep 24, 2024
@88250 88250 added this to the 3.1.8 milestone Sep 24, 2024
@88250 88250 closed this as completed Sep 24, 2024
@88250
Copy link
Member

88250 commented Sep 24, 2024

等 v3.1.8-dev1 发布后麻烦帮忙测试看看。

@TCOTC
Copy link
Contributor

TCOTC commented Sep 24, 2024

@88250 这个应不应该算 Development ?感觉只有插件开发者需要关心

@88250
Copy link
Member

88250 commented Sep 25, 2024 via email

@2234839
Copy link
Member

2234839 commented Oct 10, 2024

非常棒的想法呀

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