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: support JSON-based retrieval and update for theme and plugin configs #6661

Merged
merged 5 commits into from
Sep 28, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Sep 14, 2024

What type of PR is this?

/kind improvement
/area core
/milestone 2.20.x

What this PR does / why we need it:

新增 API 用于以 JSON 的方式获取和更新插件和主题的配置

之前一直是返回的 ConfigMap 让前端去操作字符串 JSON 需要转换,渲染表单值回显等操作都不方便,例如像 SEO 插件这样还会去获取配置在业务中使用而不仅仅是只有后端会使用到配置,因此使用 JSON 的方式返回可能要更合理一些

Does this PR introduce a user-facing change?

新增 API 用于以 JSON 格式获取和更新插件和主题的配置

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 14, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.20.x milestone Sep 14, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Sep 14, 2024
@guqing
Copy link
Member Author

guqing commented Sep 14, 2024

@ruibaby 帮忙适配一下前端部分

@guqing guqing force-pushed the refactor/setting-config-update branch from 8762122 to a072a36 Compare September 14, 2024 04:43
@guqing guqing added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Sep 14, 2024
Copy link

codecov bot commented Sep 14, 2024

Codecov Report

Attention: Patch coverage is 79.20000% with 26 lines in your changes missing coverage. Please review.

Project coverage is 58.29%. Comparing base (7e911e9) to head (982a45b).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...re/user/service/impl/SettingConfigServiceImpl.java 5.26% 18 Missing ⚠️
...in/java/run/halo/app/infra/utils/SettingUtils.java 0.00% 4 Missing ⚠️
...halo/app/core/endpoint/console/PluginEndpoint.java 96.07% 1 Missing and 1 partial ⚠️
...ava/run/halo/app/theme/endpoint/ThemeEndpoint.java 96.07% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6661   +/-   ##
=========================================
  Coverage     58.28%   58.29%           
- Complexity     3962     3963    +1     
=========================================
  Files           680      680           
  Lines         23337    23338    +1     
  Branches       1584     1584           
=========================================
+ Hits          13603    13604    +1     
  Misses         9108     9108           
  Partials        626      626           

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

@guqing guqing force-pushed the refactor/setting-config-update branch from a072a36 to a634065 Compare September 14, 2024 08:10
@guqing guqing changed the title refactor: optimize theme and plugin config retrieval and saving feat: support JSON-based retrieval and update for theme and plugin configs Sep 14, 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 release-note-none Denotes a PR that doesn't merit a release note. labels Sep 14, 2024
@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 Sep 23, 2024
@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 Sep 24, 2024
@ruibaby ruibaby marked this pull request as ready for review September 25, 2024 08:17
@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 Sep 25, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from Aanko September 25, 2024 08:17
Copy link

pkg-pr-new bot commented Sep 25, 2024

Open in Stackblitz

@halo-dev/api-client

pnpm add https://pkg.pr.new/@halo-dev/api-client@6661

@halo-dev/components

pnpm add https://pkg.pr.new/@halo-dev/components@6661

@halo-dev/console-shared

pnpm add https://pkg.pr.new/@halo-dev/console-shared@6661

@halo-dev/richtext-editor

pnpm add https://pkg.pr.new/@halo-dev/richtext-editor@6661

@halo-dev/ui-plugin-bundler-kit

pnpm add https://pkg.pr.new/@halo-dev/ui-plugin-bundler-kit@6661

commit: 982a45b

Copy link

sonarcloud bot commented Sep 28, 2024

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 f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Sep 28, 2024
Copy link

f2c-ci-robot bot commented Sep 28, 2024

[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 Sep 28, 2024
@JohnNiang JohnNiang merged commit a4c9067 into halo-dev:main Sep 28, 2024
9 of 10 checks passed
@ruibaby ruibaby modified the milestones: 2.20.x, 2.20.0 LTS Sep 28, 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/core Issues or PRs related to the Halo Core kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/improvement Categorizes issue or PR as related to a improvement. 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