Skip to content

fixed: Prefer display name of user on UI#18404

Merged
snipe merged 1 commit intogrokability:developfrom
kenchan0130:patch-displayname
Jan 7, 2026
Merged

fixed: Prefer display name of user on UI#18404
snipe merged 1 commit intogrokability:developfrom
kenchan0130:patch-displayname

Conversation

@kenchan0130
Copy link
Copy Markdown

@kenchan0130 kenchan0130 commented Jan 7, 2026

Updated UI logic to prioritize the user's display name when available.
Previously, some parts of the UI used the user's name directly.

This change ensures that wherever a name is shown, the display name is used if it has been set.

appendix

To identify where the relevant method was used in the UI helper, I ran the following command:

$ git grep getFullNameAttribute -- app/Presenters
app/Presenters/ActionlogPresenter.php:            return '<del>'.$user->getFullNameAttribute().'</del> (deleted)';
app/Presenters/UserPresenter.php:        return (string) link_to_route('users.show', $this->getFullNameAttribute(), $this->id);

@kenchan0130 kenchan0130 requested a review from snipe as a code owner January 7, 2026 08:59
@kenchan0130 kenchan0130 changed the title fixed: Prefer display name on UI fixed: Prefer display name of user on UI Jan 7, 2026
@kenchan0130
Copy link
Copy Markdown
Author

I’m not very familiar with Eloquent ORM, but based on the following accessor definition:

protected function displayName(): Attribute
{
    return Attribute::make(
        get: fn (mixed $value) => $value ?? $this->getFullNameAttribute(),
    );
}

my understanding is that calling the display_name accessor (e.g., $user->display_name) will automatically invoke this method.
If my understanding is incorrect, please let me know.

@snipe
Copy link
Copy Markdown
Member

snipe commented Jan 7, 2026

Hi there - thanks for this! Can you please re-target this PR to point to the develop branch, per our Contributing documentation?

You don't need to close and re-open. After you create a pull request, you can modify the base branch so that the changes in the pull request are compared against a different branch. By changing the base branch of your original pull request rather than opening a new one with the correct base branch, you’ll be able to keep valuable work and discussion.

mhuxq

Thanks!

@kenchan0130 kenchan0130 changed the base branch from master to develop January 7, 2026 12:57
@kenchan0130
Copy link
Copy Markdown
Author

@snipe
Sorry about I mistakenly set the wrong base branch.
I’ve corrected it now.

@snipe snipe merged commit 14ff325 into grokability:develop Jan 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants