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

Set avatar image dimensions #12654

Merged
merged 5 commits into from
Sep 2, 2020
Merged

Set avatar image dimensions #12654

merged 5 commits into from
Sep 2, 2020

Conversation

da2x
Copy link
Contributor

@da2x da2x commented Aug 30, 2020

Set the avatar image dimensions to help browsers avoid layout reflows. Helps page load performance and user experience (less content jank).

Here’s an animated PNG demonstrating the problem this patch solved. (This is Codebase.org’s theme, but the issue is generic.)

(Animation) Profile image loading reflows the page layout

Set the avatar image dimensions to help browsers
avoid layout reflows. Helps page load performance and
user experience (less content jank).
@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2020

Codecov Report

Merging #12654 into master will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #12654   +/-   ##
=======================================
  Coverage   43.28%   43.28%           
=======================================
  Files         646      646           
  Lines       71625    71625           
=======================================
+ Hits        31002    31006    +4     
+ Misses      35608    35602    -6     
- Partials     5015     5017    +2     
Impacted Files Coverage Δ
modules/avatar/avatar.go 50.00% <0.00%> (-4.77%) ⬇️
modules/git/utils.go 73.77% <0.00%> (-3.28%) ⬇️
services/pull/check.go 47.69% <0.00%> (-2.31%) ⬇️
modules/queue/workerpool.go 58.77% <0.00%> (-1.23%) ⬇️
models/error.go 34.81% <0.00%> (-0.52%) ⬇️
modules/git/repo.go 49.23% <0.00%> (-0.51%) ⬇️
models/issue_comment.go 53.75% <0.00%> (-0.16%) ⬇️
services/pull/pull.go 41.57% <0.00%> (ø)
services/mirror/mirror.go 19.93% <0.00%> (+1.35%) ⬆️
modules/process/manager.go 75.00% <0.00%> (+2.50%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 714ab71...dd4330f. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 30, 2020
@lafriks lafriks added the topic/ui Change the appearance of the Gitea UI label Aug 31, 2020
@lafriks lafriks added this to the 1.13.0 milestone Aug 31, 2020
@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 Aug 31, 2020
@silverwind
Copy link
Member

silverwind commented Aug 31, 2020

Note for later: We should probably extract avatar rendering to a helper function, e.g. {{avatar .Owner.Name 290}}.

@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 Aug 31, 2020
@lafriks
Copy link
Member

lafriks commented Aug 31, 2020

🚀

@techknowlogick techknowlogick merged commit 72eeb13 into go-gitea:master Sep 2, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants