Skip to content

Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue"#36654

Merged
wxiaoguang merged 12 commits intogo-gitea:mainfrom
e6aluga:feature/add-icon-to-close-comment-issue-btn
Feb 22, 2026
Merged

Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue"#36654
wxiaoguang merged 12 commits intogo-gitea:mainfrom
e6aluga:feature/add-icon-to-close-comment-issue-btn

Conversation

@e6aluga
Copy link
Copy Markdown
Contributor

@e6aluga e6aluga commented Feb 17, 2026

Newbies often use the "Close with Comments" button instead of deleting their comment.
Icon should prevent missclicks.

Before
image
image

After
image
image

Copilot AI review requested due to automatic review settings February 17, 2026 07:26
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 17, 2026
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Feb 17, 2026
@e6aluga e6aluga marked this pull request as draft February 17, 2026 07:27
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 pull request adds an icon to the "Close" button for issues and pull requests to help prevent accidental clicks by new users who might confuse it with a "delete comment" action.

Changes:

  • Added an inline SVG icon (octicon-git-pull-request-closed) to the close button in issue/PR comment forms

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

@wxiaoguang
Copy link
Copy Markdown
Contributor

Newbies often use the "Close with Comments" button instead of deleting their comment. Icon should prevent missclicks.

Why the "icon" can "prevent missclicks"? If newbies don't understand what "Close with Comments" does, do they understand that the icon mean?

@silverwind
Copy link
Copy Markdown
Member

silverwind commented Feb 17, 2026

I's consistent with GitHub, so I'm for adding the icon.

image

BTW I would also remove the ugly "outline" style on the button.

@wxiaoguang
Copy link
Copy Markdown
Contributor

I's consistent with GitHub, so I'm for adding the icon.

Then it needs to distinguish between "issue" and "pull request".

@silverwind
Copy link
Copy Markdown
Member

Yes, issue button has different icon:

image

@e6aluga
Copy link
Copy Markdown
Contributor Author

e6aluga commented Feb 18, 2026

Issue:
image
image

PR:
image
image

@e6aluga e6aluga marked this pull request as ready for review February 18, 2026 14:28
@e6aluga e6aluga changed the title WIP: Add icon to buttons "Close with Comment", "Close Pull Request" Add icon to buttons "Close with Comment", "Close Pull Request" Feb 18, 2026
@e6aluga e6aluga changed the title Add icon to buttons "Close with Comment", "Close Pull Request" Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue" Feb 18, 2026
@silverwind
Copy link
Copy Markdown
Member

@e6aluga would you be ok with me pushing some fixes onto your branch to align with GitHub's rendering?

@e6aluga
Copy link
Copy Markdown
Contributor Author

e6aluga commented Feb 19, 2026

@e6aluga would you be ok with me pushing some fixes onto your branch to align with GitHub's rendering?

👍

@silverwind
Copy link
Copy Markdown
Member

Ok I will have a look soon.

silverwind and others added 3 commits February 22, 2026 10:46
Match GitHub's rendering: monochrome button background with only the
icon colored (red for close, green for reopen). Also add icon and
text wrappers to the reopen button for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change "Reopen" to "Reopen Issue" and "Reopen Pull Request" to match
the close button pattern which already distinguishes between them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@silverwind
Copy link
Copy Markdown
Member

Button styling and text updated to match GitHub exactly:

Screenshot 2026-02-22 at 10 52 44 Screenshot 2026-02-22 at 10 52 54 Screenshot 2026-02-22 at 10 55 28 Screenshot 2026-02-22 at 10 55 44

silverwind and others added 2 commits February 22, 2026 11:03
Double the gap on .ui.button (keeping compact buttons at default),
and remove now-unnecessary tw-mr-1/tw-mr-2 from SVG icons inside
buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented Feb 22, 2026

Button styling and text updated to match GitHub exactly:

Two cases are still missing

Details image

Update: misleading but not missing. Added comment.

@silverwind
Copy link
Copy Markdown
Member

What is the effect of the recent changes? Is gap the same for compact and non-compact buttons?

@wxiaoguang
Copy link
Copy Markdown
Contributor

What is the effect of the recent changes? Is gap the same for compact and non-compact buttons?

I think the code is already clear enough:

image

@silverwind
Copy link
Copy Markdown
Member

Looks the same as before, so lgtm.

@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 22, 2026
@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 Feb 22, 2026
@wxiaoguang wxiaoguang enabled auto-merge (squash) February 22, 2026 12:58
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 22, 2026
@wxiaoguang wxiaoguang merged commit d9ac063 into go-gitea:main Feb 22, 2026
26 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Feb 22, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 22, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 23, 2026
* giteaofficial/main: (81 commits)
  Add keyboard shortcuts for repository file and code search (go-gitea#36416)
  Refactor text utility classes to Tailwind CSS (go-gitea#36703)
  Prevent redirect bypasses via backslash-encoded paths (go-gitea#36660)
  Fix force push time-line commit comments of pull request (go-gitea#36653)
  Fix get release draft permission check (go-gitea#36659)
  Move `X_FRAME_OPTIONS` setting from `cors` to `security` section (go-gitea#30256)
  Update JS and PY deps (go-gitea#36708)
  Move jobparser from act repository to Gitea (go-gitea#36699)
  Fix push time bug (go-gitea#36693)
  Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue" (go-gitea#36654)
  various fixes (go-gitea#36697)
  Add AI Contribution Policy to CONTRIBUTING.md (go-gitea#36651)
  Add some validation on values provided to USER_DISABLED_FEATURES and EXTERNAL_USER_DISABLED_FEATURES (go-gitea#36688)
  Rework e2e tests (go-gitea#36634)
  Remove unused functions (go-gitea#36672)
  Add migration http transport for push/sync mirror lfs (go-gitea#36665)
  Fix track time issue id (go-gitea#36664)
  Refactor inline style attributes (go-gitea#36652)
  Update Nix flake (go-gitea#36679)
  Upgrade gogit to 5.16.5 (go-gitea#36680)
  ...

# Conflicts:
#	web_src/js/features/repo-issue-content.ts
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/templates This PR modifies the template files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants