Skip to content
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

Fix large image overflow in comment page #31740

Merged
merged 6 commits into from
Nov 15, 2024
Merged

Conversation

charles7668
Copy link
Contributor

Close #31709

52px is calculate by avatar size in templates\repo\issue\view_content\comments.tmpl

<img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40">
.ui.comments .comment > .avatar ~ .content {
  margin-left: 12px;
}

圖片

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 31, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 31, 2024
@KN4CK3R KN4CK3R requested a review from silverwind July 31, 2024 08:53
@lunny lunny added this to the 1.23.0 milestone Aug 1, 2024
@yp05327
Copy link
Contributor

yp05327 commented Aug 22, 2024

Why this is related to the avatar's size/location?

@techknowlogick techknowlogick added the topic/ui Change the appearance of the Gitea UI label Sep 7, 2024
@silverwind
Copy link
Member

silverwind commented Sep 12, 2024

Hmm I need to check this, but my feeling is that the fix is wrong and we should not need to specify any pixel values.

How to reproduce, just a overly large image?

@silverwind
Copy link
Member

silverwind commented Sep 12, 2024

The actual problem is this CSS:

image

Setting width to 100% !important fixes it. Needs more investigation. There must be some difference in the CSS for these elements somewhere between table and img, but I can't see any right now.

@wxiaoguang
Copy link
Contributor

The proper fix should be this

image

@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Nov 15, 2024
@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 Nov 15, 2024
@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 Nov 15, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 15, 2024
@lunny lunny enabled auto-merge (squash) November 15, 2024 18:15
@lunny lunny merged commit e546480 into go-gitea:main Nov 15, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 15, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Nov 17, 2024
* giteaofficial/main:
  Fix basic auth with webauthn (go-gitea#32531)
  Fix and refactor markdown rendering (go-gitea#32522)
  Fix large image overflow in comment page (go-gitea#31740)
  Improve testing and try to fix MySQL hanging (go-gitea#32515)
  Fix `recentupdate` sorting bugs (go-gitea#32505)
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/templates This PR modifies the template files size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tables with large images cause overflow in issue templates
7 participants