-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
feat: add annotation setting extension #3028
Conversation
@guqing: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind feature |
等待这个 PR 合并之后,期望可以添加一些内置的。目前我能想到的是菜单项还缺少 icon 和 target 的设置,可以默认提供一下。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#### What type of PR is this? /kind feature #### What this PR does / why we need it: 提供一个 Annotations 编辑组件,支持由主题或者插件提供表单定义,也支持使用者自定义 key-value,用于扩展资源字段。 #### Which issue(s) this PR fixes: Fixes halo-dev/halo#2858 #### Screenshots: <img width="789" alt="image" src="https://user-images.githubusercontent.com/21301288/209517622-80111fd2-8e79-480f-8ca0-9f7073300b2b.png"> #### Special notes for your reviewer: 测试方式: 1. 将一下内容放到任意一个主题下,后缀为 `yaml`,文件名随意。 ```yaml spec: targetRef: group: content.halo.run kind: Post formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- ``` 3. 后端需要使用 halo-dev/halo#3028 4. 测试为文章设置 Annotations 和自定义的 Annotations。 5. 检查是否可以设置正常。 #### Does this PR introduce a user-facing change? ```release-note 文章设置支持设置元数据。 ```
#### What type of PR is this? /kind feature #### What this PR does / why we need it: 为更多模型添加 Annotation Form 的支持。此 PR 包括: 1. 自定义页面。 2. 文章分类。 3. 文章标签。 4. 菜单项。 5. 用户。 此 PR 是对 #770 的补充。 #### Special notes for your reviewer: 测试方式: 1. 将一下内容放到任意一个主题下,后缀为 `yaml`,文件名随意。 ```yaml spec: targetRef: group: content.halo.run kind: Post formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: content.halo.run kind: SinglePage formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: content.halo.run kind: Category formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: content.halo.run kind: Tag formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: "" kind: MenuItem formSchema: - $formkit: "text" name: "icon" label: "图标" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- ``` 3. 后端需要使用 halo-dev/halo#3028 4. 测试上述提到的模型的 Annotations 表单。 5. 检查是否可以设置正常。 #### Does this PR introduce a user-facing change? ```release-note None ```
…lo-dev/console#770) #### What type of PR is this? /kind feature #### What this PR does / why we need it: 提供一个 Annotations 编辑组件,支持由主题或者插件提供表单定义,也支持使用者自定义 key-value,用于扩展资源字段。 #### Which issue(s) this PR fixes: Fixes halo-dev#2858 #### Screenshots: <img width="789" alt="image" src="https://user-images.githubusercontent.com/21301288/209517622-80111fd2-8e79-480f-8ca0-9f7073300b2b.png"> #### Special notes for your reviewer: 测试方式: 1. 将一下内容放到任意一个主题下,后缀为 `yaml`,文件名随意。 ```yaml spec: targetRef: group: content.halo.run kind: Post formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- ``` 3. 后端需要使用 halo-dev#3028 4. 测试为文章设置 Annotations 和自定义的 Annotations。 5. 检查是否可以设置正常。 #### Does this PR introduce a user-facing change? ```release-note 文章设置支持设置元数据。 ```
#### What type of PR is this? /kind feature #### What this PR does / why we need it: 为更多模型添加 Annotation Form 的支持。此 PR 包括: 1. 自定义页面。 2. 文章分类。 3. 文章标签。 4. 菜单项。 5. 用户。 此 PR 是对 halo-dev/console#770 的补充。 #### Special notes for your reviewer: 测试方式: 1. 将一下内容放到任意一个主题下,后缀为 `yaml`,文件名随意。 ```yaml spec: targetRef: group: content.halo.run kind: Post formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: content.halo.run kind: SinglePage formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: content.halo.run kind: Category formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: content.halo.run kind: Tag formSchema: - $formkit: "text" name: "download" label: "下载地址" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- --- spec: targetRef: group: "" kind: MenuItem formSchema: - $formkit: "text" name: "icon" label: "图标" - $formkit: "text" name: "version" label: "版本" apiVersion: v1alpha1 kind: AnnotationSetting metadata: generateName: annotation- ``` 3. 后端需要使用 halo-dev#3028 4. 测试上述提到的模型的 Annotations 表单。 5. 检查是否可以设置正常。 #### Does this PR introduce a user-facing change? ```release-note None ```
What type of PR is this?
/kind feature
/milestone 2.1.x
/area core
What this PR does / why we need it:
新增 AnnotationSetting 自定义模型以扩展自定义元数据设置表单
主题安装/更新/重载时都会重新加载与 theme.yaml 同层级的其他 yaml,但只会保存 kind 为 Setting 和 AnnotationSetting的,主题卸载时会删除这些 yaml 资源
Which issue(s) this PR fixes:
Fixes #3005
Special notes for your reviewer:
how to test it?
/cc @halo-dev/sig-halo
Does this PR introduce a user-facing change?