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 features for view post history snapshots #5787

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Apr 24, 2024

What type of PR is this?

/area ui
/kind feature
/milestone 2.15.x

What this PR does / why we need it:

支持查看文章发布历史,支持恢复、删除版本。

image

Which issue(s) this PR fixes:

Fixes #5391

Special notes for your reviewer:

Does this PR introduce a user-facing change?

支持浏览、恢复、删除文章历史快照

@f2c-ci-robot f2c-ci-robot bot added area/ui Issues or PRs related to the Halo UI 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 Apr 24, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.15.x milestone Apr 24, 2024
@f2c-ci-robot f2c-ci-robot bot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 24, 2024
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 39.41368% with 186 lines in your changes are missing coverage. Please review.

Project coverage is 56.28%. Comparing base (5fdf6c0) to head (85d6e03).
Report is 143 commits behind head on main.

❗ Current head 85d6e03 differs from pull request most recent head 5a5428b. Consider uploading reports for the commit 5a5428b to get more accurate results

Files Patch % Lines
...n/halo/app/content/impl/SinglePageServiceImpl.java 0.00% 56 Missing ⚠️
...ava/run/halo/app/content/impl/PostServiceImpl.java 0.00% 50 Missing ⚠️
...halo/app/core/extension/endpoint/PostEndpoint.java 71.79% 22 Missing ⚠️
...pp/core/extension/endpoint/SinglePageEndpoint.java 71.42% 22 Missing ⚠️
...a/run/halo/app/content/AbstractContentService.java 34.61% 17 Missing ⚠️
...n/java/run/halo/app/content/ListedSnapshotDto.java 0.00% 11 Missing ⚠️
.../java/run/halo/app/content/ContentUpdateParam.java 33.33% 2 Missing ⚠️
...rc/main/java/run/halo/app/content/PostRequest.java 0.00% 2 Missing ⚠️
...n/java/run/halo/app/content/SinglePageRequest.java 0.00% 2 Missing ⚠️
...main/java/run/halo/app/content/ContentRequest.java 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5787      +/-   ##
============================================
- Coverage     56.91%   56.28%   -0.63%     
- Complexity     3319     3381      +62     
============================================
  Files           587      607      +20     
  Lines         18968    20169    +1201     
  Branches       1401     1382      -19     
============================================
+ Hits          10795    11353     +558     
- Misses         7594     8244     +650     
+ Partials        579      572       -7     

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

@ruibaby
Copy link
Member Author

ruibaby commented Apr 24, 2024

ping @guqing

后端可能需要以下接口:

  1. 根据文章获取所有 Snapshots
  2. 获取 Snapshot 的内容接口,目前 Extension API 的 Snapshot 接口的 contentPath 结果无法在前端正常预览。
  3. 发布 Snapshot 的接口

Copy link

f2c-ci-robot bot commented Apr 26, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from ruibaby. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@guqing
Copy link
Member

guqing commented Apr 26, 2024

ping @guqing

后端可能需要以下接口:

  1. 根据文章获取所有 Snapshots
  2. 获取 Snapshot 的内容接口,目前 Extension API 的 Snapshot 接口的 contentPath 结果无法在前端正常预览。
  3. 发布 Snapshot 的接口

已添加

@ruibaby ruibaby changed the title WIP: feat: add features for view post history snapshots feat: add features for view post history snapshots Apr 26, 2024
@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 Apr 26, 2024
@guqing guqing added the tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges. label Apr 26, 2024
@LIlGG LIlGG added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Apr 26, 2024
@guqing guqing removed the tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges. label Apr 26, 2024
@LIlGG
Copy link
Member

LIlGG commented Apr 26, 2024

删除当前选中的版本时,右侧版本内容是否也应该发生变化。

删除前

image

删除后

image

Copy link

sonarcloud bot commented Apr 26, 2024

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold 手动合并

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

guqing commented Apr 26, 2024

/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 Apr 26, 2024
@guqing guqing merged commit 58f82d2 into halo-dev:main Apr 26, 2024
7 of 8 checks passed
@ruibaby ruibaby removed this from the 2.15.x milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Issues or PRs related to the Halo UI kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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