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

WIP: feat: category include childrenCategories #5719

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AirboZH
Copy link
Member

@AirboZH AirboZH commented Apr 16, 2024

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

在前端页面中加入 '独立分类' 选项
在后端 postFinder 和 CategoryReconciler 中修改了由分类获取文章和计数的相关逻辑

Which issue(s) this PR fixes:

Fixes #5663

Special notes for your reviewer:

Does this PR introduce a user-facing change?

分类文章和计数可自定义是否包含子分类

@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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. labels Apr 16, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from ruibaby and wan92hen April 16, 2024 02:03
@f2c-ci-robot f2c-ci-robot bot added the kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API label Apr 16, 2024
Copy link

f2c-ci-robot bot commented Apr 16, 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 assign johnniang for approval. 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

@AirboZH AirboZH force-pushed the feat/categoryIncludeChildren branch from 16d84a7 to e772561 Compare April 16, 2024 02:11
Comment on lines +172 to +179
Mono<Query> mergeQuery(List<Query> childrenQueryList) {
if (childrenQueryList.size() < 2) {
return Mono.just(and(all(), childrenQueryList.get(0)));
}
return Mono.just(
or(childrenQueryList.get(0), childrenQueryList.get(1), childrenQueryList)
);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

感觉可以再优化一下

@AirboZH AirboZH force-pushed the feat/categoryIncludeChildren branch from e772561 to 9a1dba2 Compare April 16, 2024 07:25
@AirboZH AirboZH changed the title WIP: feat: category include childrenCategories feat: category include childrenCategories Apr 16, 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 16, 2024
@guqing
Copy link
Member

guqing commented Apr 16, 2024

/hold wait for #5671 to be merged

@f2c-ci-robot f2c-ci-robot bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 16, 2024
@guqing
Copy link
Member

guqing commented Apr 22, 2024

Hi @AirboZH,#5671 PR 中更新了分类关联的文章数量的统计方式,因此本 PR 可能需要着重测试或重新修改一下包含子分类的关联文章数量的计算

@AirboZH AirboZH force-pushed the feat/categoryIncludeChildren branch from 9a1dba2 to f16d73f Compare April 23, 2024 02:41
@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 Apr 23, 2024
@AirboZH AirboZH changed the title feat: category include childrenCategories WIP: feat: category include childrenCategories Apr 23, 2024
@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 23, 2024
Copy link

sonarcloud bot commented Apr 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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. 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.

在多级分类情况下,父级文章分类可以点击但是显示文章内容不全(或为空)
2 participants