Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix avatar radius problem on the new issue page #31506

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

charles7668
Copy link
Contributor

Close #31502

Related to #31419.

In this PR, the avatar width is set to 3em, but the height is not set, so the image is not squared.

When object-fit is set to contain, it can't maintain the radius of the image.

Result:
圖片

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 27, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 27, 2024
@yp05327 yp05327 added the topic/ui Change the appearance of the Gitea UI label Jun 27, 2024
@yp05327 yp05327 added this to the 1.23.0 milestone Jun 27, 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 Jun 27, 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 Jun 27, 2024
@yp05327 yp05327 self-requested a review June 27, 2024 07:27
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Jun 27, 2024
@yp05327
Copy link
Contributor

yp05327 commented Jun 27, 2024

Wait it looks strange in my local:
before (main branch)
image

after( the avatar is too big):
image
image

@yp05327
Copy link
Contributor

yp05327 commented Jun 27, 2024

It seems that #new-issue .avatar is used for
image
But it effected the avatars of assignees which is unexpected.

@yp05327
Copy link
Contributor

yp05327 commented Jun 27, 2024

So my suggestion is
image

After:
image

@silverwind
Copy link
Member

Ideally we should size avatars correctly inside the templates only and remove all the CSS that alters their size, it's unnecessary.

@charles7668
Copy link
Contributor Author

So my suggestion is image

After: image

This seems to be a better solution.

I have been updated.

@yp05327
Copy link
Contributor

yp05327 commented Jun 27, 2024

Ideally we should size avatars correctly inside the templates only and remove all the CSS that alters their size, it's unnecessary.

@silverwind
I agree, how do you think about this PR, close it or merged it first as a quick fix and do that later.

@silverwind
Copy link
Member

silverwind commented Jun 27, 2024

Fix is fine to take as a quick fix. It was a regression from #31419.

@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 Jun 27, 2024
@silverwind silverwind added backport/v1.22 This PR should be backported to Gitea 1.22 and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Jun 27, 2024
@silverwind silverwind enabled auto-merge (squash) June 27, 2024 13:20
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 27, 2024
@GiteaBot GiteaBot added the lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. label Jun 27, 2024
@silverwind silverwind merged commit d655ff1 into go-gitea:main Jun 27, 2024
26 checks passed
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Jun 27, 2024
Close go-gitea#31502

Related to go-gitea#31419.

In this PR, the avatar width is set to 3em, but the height is not set,
so the image is not squared.

When object-fit is set to contain, it can't maintain the radius of the
image.

Result:

![圖片](https://github.com/go-gitea/gitea/assets/30816317/bceb98aa-b0f7-4753-bc8b-3b9c41dfd55a)
@GiteaBot GiteaBot added backport/done All backports for this PR have been created and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Jun 27, 2024
wxiaoguang pushed a commit that referenced this pull request Jun 27, 2024
Backport #31506 by charles7668

Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 28, 2024
* giteaofficial/main:
  Fix avatar radius problem on the new issue page (go-gitea#31506)
  Make toast support preventDuplicates (go-gitea#31501)
  Improve attachment upload methods (go-gitea#30513)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 26, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
backport/done All backports for this PR have been created backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. 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.

Avatars are squared when opening new issue
5 participants