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

feat: make comment and reply list item operations extendable #6438

Merged

Conversation

chengzhongxue
Copy link
Contributor

@chengzhongxue chengzhongxue commented Aug 3, 2024

What type of PR is this?

/area console
/kind feature
/milestone 2.18.x

What this PR does / why we need it:

评论和回复管理列表项的操作按钮支持被插件扩展。
image
image

Which issue(s) this PR fixes:

Fixes #6392

Special notes for your reviewer:

需要评论和回复的关于列表的已有功能是否正常。

如果需要测试扩展点是否有效,可以使用此插件测试:plugin-starter-1.0.0-SNAPSHOT.jar.zip

export default definePlugin({
  components: {},
  routes: [],
  extensionPoints: {
    "comment:list-item:operation:create": (comment: Ref<ListedComment>) => {
      return [
        {
          priority: 21,
          component: markRaw(VDropdownItem),
          label: "测试评论菜单",
          visible: true,
          permissions: [],
          action: () => {
            console.log(comment)
          },
        },
      ];
    },
    "reply:list-item:operation:create": (reply: Ref<ListedReply>) => {
      return [
        {
          priority: 11,
          component: markRaw(VDropdownItem),
          label: "测试回复菜单",
          visible: true,
          permissions: [],
          action: () => {
            console.log(reply)
          },
        },
      ];
    },
  },
});

Does this PR introduce a user-facing change?

Console 评论和回复管理列表项的操作按钮支持被插件扩展。

Copy link

f2c-ci-robot bot commented Aug 3, 2024

@chengzhongxue: You must be a member of the halo-dev/milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Milestone Maintainers Team and have them propose you as an additional delegate for this responsibility.

In response to this:

What type of PR is this?

/area console
/kind feature
/milestone 2.18.x

What this PR does / why we need it:

评论和回复管理列表项的操作按钮支持被插件扩展。
image
image

Which issue(s) this PR fixes:

Fixes #6392

Special notes for your reviewer:

需要评论和回复的关于列表的已有功能是否正常。

如果需要测试扩展点是否有效,可以使用此插件测试:plugin-starter-1.0.0-SNAPSHOT.jar.zip

export default definePlugin({
 components: {},
 routes: [],
 extensionPoints: {
   "comment:list-item:operation:create": (comment: Ref<ListedComment>) => {
     return [
       {
         priority: 21,
         component: markRaw(VDropdownItem),
         label: "测试评论菜单",
         visible: true,
         permissions: [],
         action: () => {
           console.log(comment)
         },
       },
     ];
   },
   "reply:list-item:operation:create": (reply: Ref<ListedReply>) => {
     return [
       {
         priority: 11,
         component: markRaw(VDropdownItem),
         label: "测试回复菜单",
         visible: true,
         permissions: [],
         action: () => {
           console.log(reply)
         },
       },
     ];
   },
 },
});

Does this PR introduce a user-facing change?

Console 评论和回复管理列表项的操作按钮支持被插件扩展。

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.

@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Aug 3, 2024
@CLAassistant
Copy link

CLAassistant commented Aug 3, 2024

CLA assistant check
All committers have signed the CLA.

@f2c-ci-robot f2c-ci-robot bot requested a review from QuentinHsu August 3, 2024 17:27
@f2c-ci-robot f2c-ci-robot bot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 3, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from ruibaby August 3, 2024 17:27
@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 3, 2024
@ruibaby ruibaby requested review from JohnNiang, LIlGG and guqing and removed request for QuentinHsu August 5, 2024 02:54
@ruibaby
Copy link
Member

ruibaby commented Aug 5, 2024

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@chengzhongxue 感谢参与贡献,在合并之前需要先签署一下我们的 CLA。

@ruibaby ruibaby changed the title make comment and reply list item operations extendable feat: make comment and reply list item operations extendable Aug 5, 2024
@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 5, 2024
chengzhongxue and others added 2 commits August 5, 2024 11:23
Signed-off-by: Ryan Wang <[email protected]>
Copy link

sonarqubecloud bot commented Aug 5, 2024

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

感谢贡献,这个改动需要更新一下开发者文档。

https://github.com/halo-dev/docs

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2024
@chengzhongxue
Copy link
Contributor Author

/lgtm

感谢贡献,这个改动需要更新一下开发者文档。

https://github.com/halo-dev/docs

好的

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.08%. Comparing base (bc10336) to head (cb42bbc).
Report is 103 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6438      +/-   ##
============================================
+ Coverage     54.51%   58.08%   +3.57%     
- Complexity     3523     3767     +244     
============================================
  Files           646      651       +5     
  Lines         21862    22106     +244     
  Branches       1528     1555      +27     
============================================
+ Hits          11917    12841     +924     
+ Misses         9328     8641     -687     
- Partials        617      624       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

f2c-ci-robot bot commented Aug 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 4a4f8b6 into halo-dev:main Aug 5, 2024
8 checks passed
@ruibaby ruibaby added this to the 2.19.x milestone Aug 5, 2024
@ruibaby ruibaby modified the milestones: 2.19.x, 2.19.0 Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/console Issues or PRs related to the Halo Console kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

能否添加评论数据列表操作菜单
3 participants