Leantime / leantime

Leantime is a goals focused project management system for non-project managers. Building with ADHD, Autism, and dyslexia in mind.
https://leantime.io
GNU Affero General Public License v3.0
4.49k stars 586 forks source link

Project list avatar - html based #2569

Closed jeppekroghitk closed 3 months ago

jeppekroghitk commented 3 months ago

Link to ticket

N/A

Description

This PR is a proposal for an alternative and simpler way to generate project avatars.

When loading the front-page, a get-request for each project is made to get the avatar for the project list in the header. In my test case, having 48 projects, the 48 simultaneous get-requests slowed each page load by over 50%.

Since the generated avatar svg is quite simple and consists of two letters, i thought that a way to go, or a simple short-term solution were to generate these avatars using HTML.

Screenshot of the result

Screenshot 2024-07-02 at 16 38 06

Checklist

If your code does not pass the requirements on the checklist, you should add a comment explaining why this change should be exempt from the list.

Additional comments or questions

If you have any further comments or questions for the reviewer, please add them here.

marcelfolaron commented 3 months ago

Hey, Thank you but this PR would prevent uploaded avatars from showing up as well. The svgs/images are all served with a cache header so on subsequent calls the browser should not load the images from the server anymore. Can you check in dev tools if the images show up as "Memory Cached". If not there may be something off in the way the images are being served.