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 sorting posts by views and comment count #5614

Merged
merged 15 commits into from
Apr 11, 2024

Conversation

ZJamss
Copy link
Contributor

@ZJamss ZJamss commented Mar 29, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

文章支持根据访问量和评论量排序

Which issue(s) this PR fixes:

Fixes #3216

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. labels Mar 29, 2024
@CLAassistant
Copy link

CLAassistant commented Mar 29, 2024

CLA assistant check
All committers have signed the CLA.

ZJamss added 2 commits March 30, 2024 19:57
Signed-off-by: ZJamss <zjamss@qq.com>
Signed-off-by: ZJamss <zjamss@qq.com>
@ZJamss ZJamss requested a review from guqing April 2, 2024 00:59
@guqing
Copy link
Member

guqing commented Apr 2, 2024

Hi @ZJamss , 我这提供一个实现思路你参考一下吧 main...guqing:halo:feature/sortby-visits

@ZJamss
Copy link
Contributor Author

ZJamss commented Apr 2, 2024

Hi @ZJamss , 我这提供一个实现思路你参考一下吧 main...guqing:halo:feature/sortby-visits

好的,再次感谢,那我也是继续重构代码重新提交commit to review吗

@guqing
Copy link
Member

guqing commented Apr 2, 2024

Hi @ZJamss , 我这提供一个实现思路你参考一下吧 main...guqing:halo:feature/sortby-visits

好的,再次感谢,那我也是继续重构代码重新提交commit to review吗

是的,由于此 issue 是你在解决,所以你继续提交即可, 我给出的解决方式只是参考

ZJamss and others added 2 commits April 2, 2024 13:28
Signed-off-by: ZJamss <zjamss@qq.com>
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

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

Project coverage is 56.49%. Comparing base (5fdf6c0) to head (3b61fc8).
Report is 102 commits behind head on main.

Files Patch % Lines
...in/java/run/halo/app/metrics/PostStatsUpdater.java 50.00% 17 Missing ⚠️
...re/extension/reconciler/PostCounterReconciler.java 6.25% 15 Missing ⚠️
...tion/src/main/java/run/halo/app/content/Stats.java 0.00% 14 Missing ⚠️
...run/halo/app/event/post/PostStatsChangedEvent.java 0.00% 6 Missing ⚠️
...ain/java/run/halo/app/infra/SchemeInitializer.java 66.66% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5614      +/-   ##
============================================
- Coverage     56.91%   56.49%   -0.42%     
- Complexity     3319     3332      +13     
============================================
  Files           587      598      +11     
  Lines         18968    19325     +357     
  Branches       1401     1359      -42     
============================================
+ Hits          10795    10918     +123     
- Misses         7594     7843     +249     
+ Partials        579      564      -15     

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

@ZJamss ZJamss changed the title feat: added new sorting rules for posts on the console, sorted by visit count and comment count feat: add new sorting rules for posts on the console, sorted by visit count and comment count Apr 4, 2024
@ZJamss
Copy link
Contributor Author

ZJamss commented Apr 4, 2024

Hi @ZJamss , 我这提供一个实现思路你参考一下吧 main...guqing:halo:feature/sortby-visits

好的,再次感谢,那我也是继续重构代码重新提交commit to review吗

是的,由于此 issue 是你在解决,所以你继续提交即可, 我给出的解决方式只是参考

Hello,@guqing,请问有时间review一下吗,我好像不能re-request review了

@guqing
Copy link
Member

guqing commented Apr 4, 2024

Hi @ZJamss 感谢你的付出,等解决之后,请等待我们测试之后的反馈,如果没有问题将会进入合并流程

Signed-off-by: ZJamss <zjamss@qq.com>
@ZJamss ZJamss requested a review from guqing April 4, 2024 15:16
Signed-off-by: ZJamss <zjamss@qq.com>
@ZJamss ZJamss requested a review from guqing April 4, 2024 15:52
@guqing guqing changed the title feat: add new sorting rules for posts on the console, sorted by visit count and comment count feat: support sorting posts by views and comment count Apr 8, 2024
@guqing
Copy link
Member

guqing commented Apr 8, 2024

/milestone 2.15.x
/area core
/area console

@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Apr 8, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.15.x milestone Apr 8, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Apr 8, 2024
Copy link

sonarcloud bot commented Apr 9, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
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

@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.

It works very well!

Thanks for your first contribution!

/approve

/ping @halo-dev/sig-halo

@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 Apr 11, 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 Apr 11, 2024
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.

/approve

Congrats on merging your pull request! 🎉🎉🎉 Thank you for your efforts

Copy link

f2c-ci-robot bot commented Apr 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing, 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 merged commit 817963c into halo-dev:main Apr 11, 2024
8 checks passed
@ZJamss
Copy link
Contributor Author

ZJamss commented Apr 11, 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/console Issues or PRs related to the Halo Console 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.

后台页面新增按照访问量和评论量排序功能
6 participants