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 the shaking issue for avatars with an aspect ratio that is not 1:1. #32604

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kerwin612
Copy link
Member

before:
1

after:
2

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 22, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 22, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Nov 22, 2024
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Nov 22, 2024
@silverwind
Copy link
Member

silverwind commented Nov 22, 2024

Hmm I'm not sure about those changes. Would like to know why it resizes in first place as I thought aspect-ratio would prevent any such resizing. Maybe you put a demo avatar on https://demo.gitea.com/ for me to investigate.

@kerwin612
Copy link
Member Author

Hmm I'm not sure about those changes. Would like to know why it resizes in first place as I thought aspect-ratio would prevent any such resizing. Maybe you put a demo avatar on https://demo.gitea.com/ for me to investigate.

https://upload.wikimedia.org/wikipedia/en/3/3d/Longcat_is_loooooooooong.jpg
The image I used is for testing purposes; my environment is the latest version of Edge browser on Windows.

@kerwin612 kerwin612 requested review from silverwind, wxiaoguang and a team November 25, 2024 02:46
@kerwin612
Copy link
Member Author

https://demo.gitea.com/kerwin612
It's strange that I didn't encounter the issue on the demo website.

demo: 1.23.0+dev-686-gefb55cd8ef
1

latest-main: 1.23.0+dev-705-gc363bd06e9
2

@yp05327
Copy link
Contributor

yp05327 commented Nov 25, 2024

I can reproduce it. So something has changed from 686 to 705.

And if you open the dev tool, then refresh the page, even in 705 it will not shake.

@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 25, 2024
@yp05327
Copy link
Contributor

yp05327 commented Nov 25, 2024

As it works in 686, and the removed lines in this PR are not newly added codes, so I guess there's other reasons caused it.
Before we figure out it, I suggest pending giving more approves.

Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

I do not think this change is right if you haven't really understood the problem.

Even without the "real" problem, is it clear about: why the width could be remove? What if there is an avatar with width=2000 and height=100?

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 25, 2024
@wxiaoguang wxiaoguang marked this pull request as draft November 26, 2024 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged modifies/go Pull requests that update Go code 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.

7 participants