Problem
Currently, the main page's contributions graph only displays year buttons for the last three years, regardless of the user's actual activity history on the platform. This leads to two usability issues:
- Users who have been on the platform longer cannot access contribution data for years older than the last three, even if they have relevant pomodoro activity for those years.
- New users will see unnecessary year buttons for inactive years, when only the current year is relevant for their experience.
Solution (Client-Side Improvement)
Since all pomodoros are stored client-side, update the JS logic responsible for rendering the year buttons:
- Scan all locally stored pomodoros and determine the distinct years in which at least one pomodoro exists.
- Generate a button for every year with data: Only show years where the user has created at least one pomodoro session.
- Hide years with zero pomodoros: If the user is new and only has data for the current year, show only that button.
- There is no need for backend/database changes as all user data is local.
Where to change
- Update the corresponding JavaScript file that prepares the year button list for the contributions graph on the main page.
- Remove/rewrite the logic that statically includes the last three years, and instead generate the buttons dynamically from the set of years found in user data.
Problem
Currently, the main page's contributions graph only displays year buttons for the last three years, regardless of the user's actual activity history on the platform. This leads to two usability issues:
Solution (Client-Side Improvement)
Since all pomodoros are stored client-side, update the JS logic responsible for rendering the year buttons:
Where to change