stable

Clone or download

Read-only

fix: Lazy loading of avatars

Users avatars are not a critical resource and can be lazy loaded. This will avoid consuming too much resources when the avatar is not displayed yet to the user (aka "below the fold"). To test, have a project with lot of members (e.g 200). Open a console and follow the access logs: `tail -f /var/log/nginx/access.log`. Force refresh the project member page. You should see a bunch of avatar-xxx.png url appearing in access log. Scroll to see more project members, the corresponding avatars should be loaded only when member is appearing in the viewport. Most of avatar usages have been blindly converted to loading="lazy". There are probably missing spots. Current avatar in navbar is kept as is since it is always above the fold. TLP documentation has been updated in case of people are copy pasting code from there (`pnpm --filter=tlp-doc run storybook`). Closes request #39752: Lazy loading of avatars Change-Id: I5aee956598053e2757f5f2742eeebe6ab8d3c774

Modified Files

Name
M plugins/docman/templates/item-details-notifications.mustache +1 −1 Go to diff View file
M plugins/git/templates/settings/notifications.mustache +1 −1 Go to diff View file
M plugins/gitlab/templates/admin/linked-group-information.mustache +2 −2 Go to diff View file
M plugins/ldap/scripts/project-admin/preview.mustache +2 −2 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/Image/index.mustache +1 −1 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/index.mustache +1 −1 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/template-metadata.mustache +1 −1 Go to diff View file
M plugins/project_ownership/templates/project-admin.mustache +1 −1 Go to diff View file
M plugins/svn/templates/admin/mail_notification.mustache +1 −1 Go to diff View file
M plugins/taskboard/scripts/taskboard/src/components/TaskBoard/Body/Swimlane/Card/Editor/Assignees/PeoplePicker.vue +2 −2 Go to diff View file
M plugins/timetracking/templates/artifact-tab.mustache +1 −1 Go to diff View file
M plugins/tracker/templates/form-element/reference/cross_reference.mustache +1 −1 Go to diff View file
M plugins/tracker/templates/notifications/admin-notifications-unsubscribers.mustache +1 −1 Go to diff View file
M plugins/tracker/templates/notifications/notifications.mustache +1 −1 Go to diff View file
M src/common/User/Account/templates/account-information.mustache +2 −2 Go to diff View file
M src/common/User/Profile/tooltip-title.mustache +1 −1 Go to diff View file
M src/scripts/main/src/project/admin/src/members-import/project-admin-member-import-preview.mustache +1 −1 Go to diff View file
M src/scripts/tlp-doc/stories/TLP/visual-assets/avatars/tlp-avatar.stories.ts +1 −1 Go to diff View file
M src/templates/admin/users/invited-by-user.mustache +1 −1 Go to diff View file
M src/templates/admin/users/user.mustache +1 −1 Go to diff View file
M src/templates/admin/users/userlist.mustache +1 −1 Go to diff View file
M src/templates/project/admin/ugroup-settings-member-list.mustache +1 −1 Go to diff View file
M src/templates/project/members/project-members.mustache +1 −1 Go to diff View file
M src/templates/user/profile.mustache +1 −1 Go to diff View file
M src/templates/widgets/project-members.mustache +1 −1 Go to diff View file