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: add API to obtain the bundled js file for all enabled plugins #3444

Merged
merged 17 commits into from
Aug 25, 2023

Conversation

guqing
Copy link
Member

@guqing guqing commented Mar 2, 2023

What type of PR is this?

/kind feature
/milestone 2.3.x
/area core

What this PR does / why we need it:

提供 /apis/api.console.halo.run/v1alpha1/plugins/bundle.js 来获取已启用插件的捆绑后的 main.js 和 style.css 文件

Which issue(s) this PR fixes:

Fixes #3442

Does this PR introduce a user-facing change?

优化已启用插件 jsbundle 文件的加载方式

@f2c-ci-robot f2c-ci-robot bot added kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Mar 2, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.3.x milestone Mar 2, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Mar 2, 2023
@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Merging #3444 (88c80f7) into main (67a101e) will decrease coverage by 0.27%.
Report is 1 commits behind head on main.
The diff coverage is 14.86%.

@@             Coverage Diff              @@
##               main    #3444      +/-   ##
============================================
- Coverage     61.11%   60.84%   -0.27%     
- Complexity     2523     2525       +2     
============================================
  Files           372      372              
  Lines         12942    13015      +73     
  Branches        929      935       +6     
============================================
+ Hits           7909     7919      +10     
- Misses         4582     4645      +63     
  Partials        451      451              
Files Changed Coverage Δ
...core/extension/service/impl/PluginServiceImpl.java 55.26% <0.00%> (-31.04%) ⬇️
...halo/app/plugin/resources/BundleResourceUtils.java 96.00% <ø> (ø)
...lo/app/core/extension/endpoint/PluginEndpoint.java 67.42% <33.33%> (-3.61%) ⬇️

@ruibaby ruibaby modified the milestones: 2.3.x, 2.4.x Mar 6, 2023
@f2c-ci-robot f2c-ci-robot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2023
@ruibaby ruibaby modified the milestones: 2.4.x, Backlog Mar 29, 2023
@f2c-ci-robot f2c-ci-robot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 8, 2023
@f2c-ci-robot f2c-ci-robot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 27, 2023
# Conflicts:
#	application/src/main/java/run/halo/app/core/extension/endpoint/PluginEndpoint.java
#	application/src/main/java/run/halo/app/core/extension/service/impl/PluginServiceImpl.java
@f2c-ci-robot f2c-ci-robot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 21, 2023
@ruibaby ruibaby modified the milestones: Backlog, 2.9.x Aug 21, 2023
Signed-off-by: Ryan Wang <i@ryanc.cc>
@guqing
Copy link
Member Author

guqing commented Aug 22, 2023

/hold wait for #4454 merged

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 22, 2023
Signed-off-by: Ryan Wang <i@ryanc.cc>
@ruibaby
Copy link
Member

ruibaby commented Aug 23, 2023

/unhold

@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 23, 2023
# Conflicts:
#	application/src/main/java/run/halo/app/core/extension/reconciler/PluginReconciler.java
@guqing guqing changed the title [WIP] feat: add API to obtain the bundled js file for all enabled plugins feat: add API to obtain the bundled js file for all enabled plugins Aug 23, 2023
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 23, 2023
@ruibaby
Copy link
Member

ruibaby commented Aug 23, 2023

需要注意,当前 Console 的改动会影响到三方编辑器插件的 Logo 显示:

image

因为之前这里 Logo 的显示是使用的 plugin.status.logo,但目前 bundle.js 不会包含插件的信息,并且这种方式也不是一个可取的方式。所以在这个 PR 中给 EditorProvider 接口添加了单独的 logo 字段,需要其他的编辑器插件重新设置。

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

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2023
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Aug 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

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 25, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 5c11556 into halo-dev:main Aug 25, 2023
2 checks passed
@ruibaby ruibaby modified the milestones: 2.9.x, 2.9.0 Aug 25, 2023
f2c-ci-robot bot pushed a commit to halo-sigs/plugin-bytemd that referenced this pull request Sep 4, 2023
 适配 Halo 2.9 的改动,为 EditorProvider 添加 Logo 。

see halo-dev/halo#3444 (comment)

```release-note
适配 Halo 2.9 关于编辑器 Logo 的改动。
```
f2c-ci-robot bot pushed a commit to halo-sigs/plugin-stackedit that referenced this pull request Sep 4, 2023
 适配 Halo 2.9 的改动,为 EditorProvider 添加 Logo 。

see halo-dev/halo#3444 (comment)

```release-note
适配 Halo 2.9 关于编辑器 Logo 的改动。
```
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/core Issues or PRs related to the Halo Core 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.

新增获取插件入口文件的 API
3 participants