### Description
Closing #5905 . This PR improves the user profile heatmap by adding a `yearly` 
template to display exact one year starting from todays date respectively and 
`CalendarLabel` plugin for better month labeling. The changes include:

- Adding a yearly template to show exactly one year of data
- Integrating the CalendarLabel plugin for proper month label display since 
there is no way to do it automatically when creating new template according to 
official [docs](https://cal-heatmap.com/).
- Handling the special case where months start after the 15th by rotating them 
to the end

### How has this been tested?
- Tested the heatmap display with different start dates to verify month label 
rotation
- Verified tooltips appear correctly and follow the mouse cursor
- Checked dark/light theme compatibility
- Verified the heatmap shows exactly one year of data

### Screenshots

Before:
![Screenshot 2025-04-08 at 09 57 
02](https://github.com/user-attachments/assets/3a0b768b-568d-4957-9291-81f7d961fee7)


After:
![Screenshot 2025-04-08 at 09 58 
06](https://github.com/user-attachments/assets/8faa5be9-e291-4c78-80a9-f9d94ce62b16)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5906

-- Commit Summary --

  * Add yearly template and CalendarLabel plugin for month labels

-- File Changes --

    M app/assets/javascripts/heatmap.js (166)
    M app/assets/stylesheets/common.scss (3)
    M app/views/users/show.html.erb (33)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5906.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5906.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5906
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to