-
-
Notifications
You must be signed in to change notification settings - Fork 87
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: migrate User Recent Posts to React.js #2664
feat: migrate User Recent Posts to React.js #2664
Conversation
@@ -322,7 +323,7 @@ private function buildRankMetadata( | |||
private function buildSocialStats(User $user): array | |||
{ | |||
$userSetRequestInformation = getUserRequestsInformation($user); | |||
$numForumPosts = $user->forumPosts()->count(); | |||
$numForumPosts = $user->forumPosts()->authorized()->viewable(Auth::user())->count(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change fixes a bug on the user profile. The current count of forum posts represents all posts made by the user, including the ones that can't be seen due to being unauthorized or locked behind a permissions gate.
The count now reflects the posts that are visible on the /user/[user]/posts
page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't review code. Spot checking forum posts page seems okay.
This PR is stacked on #2663.
This PR migrates the
/user/[user]/posts
route to React.js. This is achieved by largely reusing components from the/forums/recent-posts
page.There should only be one functional change on the page - it has been renamed from "Recent Posts" to "Forum Posts".