From 64d66223b57ef0431af1cfb9bbdbef01c2403e05 Mon Sep 17 00:00:00 2001
From: Tajim
Date: Fri, 28 Aug 2026 19:15:53 +0600
Subject: [PATCH] refactor(profile): remove title from public profile and
rename appreciations to appreciators
---
.../Controllers/UserProfileController.php | 9 +++----
resources/js/pages/User/Show.vue | 26 ++++++-------------
resources/views/app.blade.php | 3 +--
3 files changed, 13 insertions(+), 25 deletions(-)
diff --git a/app/Http/Controllers/UserProfileController.php b/app/Http/Controllers/UserProfileController.php
index a4e94cf0..b4a88ec9 100644
--- a/app/Http/Controllers/UserProfileController.php
+++ b/app/Http/Controllers/UserProfileController.php
@@ -49,13 +49,13 @@ public function show(string $username)
: false;
$appreciators = $user->appreciators()
- ->select(['users.id', 'users.name', 'users.username', 'users.image_path', 'users.institution', 'users.title'])
+ ->select(['users.id', 'users.name', 'users.username', 'users.image_path', 'users.institution'])
->inRandomOrder()
->take(30)
->get();
$appreciating = $user->appreciatingUsers()
- ->select(['users.id', 'users.name', 'users.username', 'users.image_path', 'users.institution', 'users.title'])
+ ->select(['users.id', 'users.name', 'users.username', 'users.image_path', 'users.institution'])
->inRandomOrder()
->take(30)
->get();
@@ -194,7 +194,7 @@ public function show(string $username)
$contributorUsers = User::where('id', '!=', $user->id)
->whereNotNull('username')
->whereHas('roles')
- ->select(['id', 'name', 'username', 'title', 'institution', 'image_path', 'about'])
+ ->select(['id', 'name', 'username', 'institution', 'image_path', 'about'])
->inRandomOrder()
->take(2)
->get();
@@ -204,7 +204,7 @@ public function show(string $username)
$randomUsers = User::whereNotIn('id', $excludedIds)
->whereNotNull('username')
- ->select(['id', 'name', 'username', 'title', 'institution', 'image_path', 'about'])
+ ->select(['id', 'name', 'username', 'institution', 'image_path', 'about'])
->inRandomOrder()
->take($remainingNeeded)
->get();
@@ -216,7 +216,6 @@ public function show(string $username)
'id' => $user->id,
'name' => $user->name,
'username' => $user->username,
- 'title' => $user->title,
'about' => $user->about,
'institution' => $user->institution,
'image_url' => $user->image_url,
diff --git a/resources/js/pages/User/Show.vue b/resources/js/pages/User/Show.vue
index 370ccb57..2b869025 100644
--- a/resources/js/pages/User/Show.vue
+++ b/resources/js/pages/User/Show.vue
@@ -32,7 +32,6 @@ const props = defineProps<{
id: number;
name: string;
username: string;
- title: string | null;
about: string | null;
institution: string | null;
image_url: string | null;
@@ -156,7 +155,6 @@ const props = defineProps<{
id: number;
name: string;
username: string;
- title: string | null;
institution: string | null;
image_url: string | null;
image_path: string | null;
@@ -270,7 +268,7 @@ const handleAppreciate = () => {
- {{ profileUser.title }}
-
@@ -489,8 +479,8 @@ const handleAppreciate = () => {
>{{ localAppreciationsCount }}
{{
localAppreciationsCount === 1
- ? 'Appreciation'
- : 'Appreciations'
+ ? 'Appreciator'
+ : 'Appreciators'
}}
@@ -1103,10 +1093,10 @@ const handleAppreciate = () => {
- {{ person.title || person.institution }}
+ {{ person.institution }}
{
v-else
class="py-6 text-center text-xs text-slate-400 dark:text-gray-500"
>
- No appreciations yet.
+ No appreciators yet.
diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php
index a897ca1d..081daad9 100644
--- a/resources/views/app.blade.php
+++ b/resources/views/app.blade.php
@@ -44,14 +44,13 @@
$profileUser = $props['profileUser'];
$userName = data_get($profileUser, 'name');
$userHandle = data_get($profileUser, 'username');
- $userTitle = data_get($profileUser, 'title');
$userInstitution = data_get($profileUser, 'institution');
$userAbout = data_get($profileUser, 'about');
$metaTitle = "{$userName} (@{$userHandle}) - " . config('app.name', 'HSCStack');
$ogTitle = "{$userName} (@{$userHandle})";
- $descParts = array_filter([$userTitle, $userInstitution, $userAbout]);
+ $descParts = array_filter([$userInstitution, $userAbout]);
$metaDescription = !empty($descParts)
? implode(' · ', array_slice($descParts, 0, 2))
: "View {$userName}'s profile, completed study topics, and contributions on HSCStack.";