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 hide categories and posts from the list #6116

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Jun 21, 2024

What type of PR is this?

/kind feature
/area core
/milestone 2.17.x

What this PR does / why we need it:

允许为分类设置从列表中隐藏则分类及子分类以及关联的文章将不会出现在列表上但可以通过链接访问

Which issue(s) this PR fixes:

Fixes #6093

Does this PR introduce a user-facing change?

允许为分类设置是否从列表中隐藏

@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 Jun 21, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.17.x milestone Jun 21, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Jun 21, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from JohnNiang and ruibaby June 21, 2024 09:46
@guqing
Copy link
Member Author

guqing commented Jun 21, 2024

Hi @ruibaby ,帮忙在分类设置 UI 上增加一个为从列表上隐藏的选项

Copy link

codecov bot commented Jun 22, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 68 lines in your changes missing coverage. Please review.

Project coverage is 54.98%. Comparing base (2c9d94f) to head (639d8e2).
Report is 3 commits behind head on main.

Current head 639d8e2 differs from pull request most recent head bc10336

Please upload reports for the commit bc10336 to get more accurate results.

Files Patch % Lines
.../core/extension/reconciler/CategoryReconciler.java 0.00% 28 Missing ⚠️
...run/halo/app/content/impl/CategoryServiceImpl.java 0.00% 15 Missing ⚠️
...halo/app/content/PostHideFromListStateUpdater.java 25.00% 12 Missing ⚠️
...app/event/post/CategoryHiddenStateChangeEvent.java 0.00% 6 Missing ⚠️
...alo/app/theme/finders/impl/CategoryFinderImpl.java 62.50% 2 Missing and 1 partial ⚠️
.../run/halo/app/core/extension/content/Category.java 0.00% 1 Missing ⚠️
...java/run/halo/app/core/extension/content/Post.java 0.00% 1 Missing ⚠️
...a/run/halo/app/extension/index/query/NotEqual.java 0.00% 1 Missing ⚠️
...ain/java/run/halo/app/infra/SchemeInitializer.java 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6116      +/-   ##
============================================
+ Coverage     54.59%   54.98%   +0.38%     
+ Complexity     3507     3495      -12     
============================================
  Files           643      637       -6     
  Lines         21713    21469     -244     
  Branches       1516     1503      -13     
============================================
- Hits          11855    11805      -50     
+ Misses         9247     9056     -191     
+ Partials        611      608       -3     

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

@guqing
Copy link
Member Author

guqing commented Jun 24, 2024

@ruibaby 需要限制一下只让第一层级可以勾选 hidden,建议除了第一层级外不渲染此选项

@ruibaby
Copy link
Member

ruibaby commented Jun 26, 2024

为分类设置隐藏之后,发现其中的文章还是会在首页查询出来。

@ruibaby
Copy link
Member

ruibaby commented Jun 26, 2024

@ruibaby 需要限制一下只让第一层级可以勾选 hidden,建议除了第一层级外不渲染此选项

已修改。

@guqing guqing marked this pull request as ready for review June 26, 2024 07:42
@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 Jun 26, 2024
@guqing
Copy link
Member Author

guqing commented Jun 26, 2024

为分类设置隐藏之后,发现其中的文章还是会在首页查询出来。

Done

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.

/approve

@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 Jun 26, 2024
Copy link
Member

@LIlGG LIlGG 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 Jun 26, 2024
Copy link

f2c-ci-robot bot commented Jun 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang, LIlGG

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

@JohnNiang JohnNiang added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2024
@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 26, 2024
Copy link

f2c-ci-robot bot commented Jun 26, 2024

New changes are detected. LGTM label has been removed.

@guqing guqing added the tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges. label Jun 26, 2024
@guqing
Copy link
Member Author

guqing commented Jun 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 Jun 26, 2024
@JohnNiang JohnNiang merged commit 1a0e20b into halo-dev:main Jun 26, 2024
3 of 4 checks passed
@ruibaby ruibaby modified the milestones: 2.17.x, 2.17.0 Jun 26, 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/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. tide/merge-method-merge Denotes a PR that should use a standard merge by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

期望支持隐藏文章分类
4 participants