go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.25k stars 5.43k forks source link

Heatmap not showing contributions from previous year #27075

Open ymefg opened 1 year ago

ymefg commented 1 year ago

Description

Today is Sep 14, 2023. I made some contributions on Sep 13, 2022, but they don't show in the heatmap. It seems the heatmap only displays contributions from the current calendar year and does not include those from the previous year.

Sorry, English is not my native language. There may be some parts above that are not expressed very clearly.

Gitea Version

1.20.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

1 2

Git Version

No response

Operating System

Windows 10

How are you running Gitea?

I download the binary file "gitea-1.20.4-windows-4.0-amd64.exe" and run it as Windows Service on Windows 10.

Database

SQLite

KazzmanK commented 1 year ago

Look like it behaves as expected. Heatmap displays last 12 months. Okay, as on the right corner it does not display tomorrow (empty white square), it may remove square for 13SEP2022 instead of drawing it without activities. Heatmap is external component, appears to be unmaintained. There are a couple of other issues waiting for a fix too.

yp05327 commented 6 months ago

Heatmap will fill in empty days if the start date is not Sunday, as the heatmap will always start at Sunday. https://github.com/julienr114/vue-calendar-heatmap/blob/f975157454ea97da5ecc384712e5438bc723b12b/src/components/Heatmap.js#L68-L70 So maybe what we need to do is that getting heatmap data at least one year and one week ago image

And Heatmap does not consider leap year, may have issue in 2024. https://github.com/julienr114/vue-calendar-heatmap/blob/f975157454ea97da5ecc384712e5438bc723b12b/src/components/consts.js#L13