Skip to content

fix(repo): unify DEFAULT_SHOW_FULL_NAME output in templates and dropdown#36597

Merged
wxiaoguang merged 15 commits intogo-gitea:mainfrom
tyroneyeh:main_showFullName
Mar 4, 2026
Merged

fix(repo): unify DEFAULT_SHOW_FULL_NAME output in templates and dropdown#36597
wxiaoguang merged 15 commits intogo-gitea:mainfrom
tyroneyeh:main_showFullName

Conversation

@tyroneyeh
Copy link
Copy Markdown
Contributor

@tyroneyeh tyroneyeh commented Feb 12, 2026

The design of DefaultShowFullName has some problems, which make the UI inconsistent, see the new comment in code

This PR does a clean up for various legacy problems, and clarify some "user name display" behaviors.

New screenshots are in #36597 (comment)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 12, 2026
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/frontend labels Feb 12, 2026
@silverwind silverwind requested a review from Copilot February 12, 2026 08:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make user display names consistent across repo search templates and the issue list “remote user search” dropdown when DEFAULT_SHOW_FULL_NAME is enabled, so the UI shows a single identifier instead of username + full name.

Changes:

  • Update issue list remote-search dropdown rendering to show full_name instead of username + full_name (when available).
  • Update repo/search_name template to show only full name when DefaultShowFullName is enabled, otherwise show username.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
web_src/js/features/repo-issue-list.ts Changes dropdown remote-search item rendering to prefer full name over username when full name is present.
templates/repo/search_name.tmpl Changes shared “search name” template to conditionally render full name vs username based on DefaultShowFullName.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@silverwind
Copy link
Copy Markdown
Member

Review

Overall the approach is sound — the template change follows the same pattern already used in latest_commit.tmpl, commits_list.tmpl, and graph/commits.tmpl. The JS change is logically correct because the backend in issue_poster.go only populates full_name in the response when DefaultShowFullName is enabled, so the item.full_name check in JS implicitly gates on the setting.

However, I see a visual issue:

search-fullname class causes dimmed text for the primary display name

The search-fullname CSS class applies color: var(--color-text-light-2) (a lighter/muted text color). Previously this was appropriate because the full name was secondary text shown alongside the username. But now, when DefaultShowFullName is true, the full name is the only text displayed — and it will appear in a muted color, while the username path uses the normal text color. This creates an inconsistent visual appearance: users with full names will have dimmer display text than users without.

This affects both the template change and the JS change since both wrap the full name in the search-fullname class.

Consider either:

  • Removing the search-fullname class when the full name is the sole display text, or
  • Adjusting the CSS so that search-fullname only applies the lighter color when it's used as a secondary label (e.g. via a parent selector or an additional modifier class)

This comment was written by Claude (claude-opus-4-6).

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 13, 2026
@lunny
Copy link
Copy Markdown
Member

lunny commented Feb 18, 2026

It's still not convenient to only show full name. It might be useful to display both.

@tyroneyeh
Copy link
Copy Markdown
Contributor Author

It's still not convenient to only show full name. It might be useful to display both.

How about displaying it on the tooltip?
image

@wxiaoguang
Copy link
Copy Markdown
Contributor

I believe the "DefaultShowFullName" is a wrong design and a lot of old code doesn't do the right thing.

For most cases, it should show either username or username (Full Name)

@tyroneyeh
Copy link
Copy Markdown
Contributor Author

tyroneyeh commented Mar 4, 2026

It has been changed to display username and full name.

image image

@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Mar 4, 2026
@wxiaoguang wxiaoguang marked this pull request as draft March 4, 2026 08:03
@wxiaoguang wxiaoguang self-assigned this Mar 4, 2026

This comment was marked as resolved.

@wxiaoguang wxiaoguang requested a review from Copilot March 4, 2026 11:13
@wxiaoguang wxiaoguang marked this pull request as ready for review March 4, 2026 11:16

This comment was marked as resolved.

@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented Mar 4, 2026

@tyroneyeh does the new change look good to you and addressed your concern?

Screenshots:

Details image image image image image image

This comment was marked as resolved.

@wxiaoguang wxiaoguang added this to the 1.26.0 milestone Mar 4, 2026
@wxiaoguang wxiaoguang force-pushed the main_showFullName branch 2 times, most recently from 597b8b2 to 85c1ad5 Compare March 4, 2026 12:20

This comment was marked as resolved.

@tyroneyeh
Copy link
Copy Markdown
Contributor Author

@tyroneyeh does the new change look good to you and addressed your concern?

Screenshots:

Details

Yes, look good

Thanks

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 4, 2026
@wxiaoguang wxiaoguang merged commit 79ae9ea into go-gitea:main Mar 4, 2026
30 checks passed
@tyroneyeh tyroneyeh deleted the main_showFullName branch March 4, 2026 13:26
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 6, 2026
* giteaofficial/main:
  Fix non-admins unable to automerge PRs from forks (go-gitea#36833)
  upgrade to github.com/cloudflare/circl 1.6.3, svgo 4.0.1, markdownlint-cli 0.48.0 (go-gitea#36837)
  Fix dump release asset bug (go-gitea#36799)
  build(deps): update material-icon-theme v5.32.0 (go-gitea#36832)
  Fix bug to check whether user can update pull request branch or rebase branch (go-gitea#36465)
  Fix forwarded proto handling for public URL detection (go-gitea#36810)
  Fix artifacts v4 backend upload problems (go-gitea#36805)
  Add a git grep search timeout (go-gitea#36809)
  fix(repo): unify DEFAULT_SHOW_FULL_NAME output in templates and dropdown (go-gitea#36597)
  Harden render iframe open-link handling (go-gitea#36811)
silverwind added a commit to silverwind/gitea that referenced this pull request Mar 6, 2026
* origin/main: (27 commits)
  Fix OAuth2 authorization code expiry and reuse handling (go-gitea#36797)
  Fix org permission API visibility checks for hidden members and private orgs (go-gitea#36798)
  Fix non-admins unable to automerge PRs from forks (go-gitea#36833)
  upgrade to github.com/cloudflare/circl 1.6.3, svgo 4.0.1, markdownlint-cli 0.48.0 (go-gitea#36837)
  Fix dump release asset bug (go-gitea#36799)
  build(deps): update material-icon-theme v5.32.0 (go-gitea#36832)
  Fix bug to check whether user can update pull request branch or rebase branch (go-gitea#36465)
  Fix forwarded proto handling for public URL detection (go-gitea#36810)
  Fix artifacts v4 backend upload problems (go-gitea#36805)
  Add a git grep search timeout (go-gitea#36809)
  fix(repo): unify DEFAULT_SHOW_FULL_NAME output in templates and dropdown (go-gitea#36597)
  Harden render iframe open-link handling (go-gitea#36811)
  [skip ci] Updated translations via Crowdin
  fix: /repos/{owner}/{repo}/actions/{runs,jobs} requiring owner permissions (go-gitea#36818)
  Fix CRAN package version validation to allow more than 4 version components (go-gitea#36813)
  Fix API not persisting pull request unit config when has_pull_requests is not set (go-gitea#36718)
  feat: Add Actions API rerun endpoints for runs and jobs (go-gitea#36768)
  Fix bug when pushing mirror with wiki (go-gitea#36795)
  Pull Request Pusher should be the author of the merge (go-gitea#36581)
  Delete non-exist branch should return 404 (go-gitea#36694)
  ...

# Conflicts:
#	routers/web/repo/issue_view.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants