Conversation
- Add 'mode' setting ('default' | 'graph') to plugin settings
- Create ContributionGraph.svelte component with GitHub-style grid layout
- Update HabitTracker.svelte to conditionally render graph mode
- Add CSS styles for contribution graph cells, labels, and layout
- Add Display mode dropdown to plugin settings tab
Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
…t column layout The template previously iterated dayIndex (outer) then weeks (inner), which with CSS grid-auto-flow:column placed all Mondays in the first columns, all Tuesdays next, etc. Now iterates weeks (outer) then days (inner) so each column correctly shows Mon through Sun of a single week, matching GitHub's contribution graph layout. Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
Add contribution graph mode
Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
Update documentation to reflect changes made with the latest PR, adding GitHub contribution graph mode.
|
I’m not able to look at it this week. I did test it quickly the day you made it and noticed that the months are not aligned with when the months actually start. Try putting a full year and you will se 13 month headers. I’ll review it properly next week. I love github’s graph but TBH I’m not sure how I feel about the current implementation in HT21. You/we’d need to figure out how to show streaks and multiple habits in one tracker. Plus look all the other features and params and see if they are supported. I hope this helps keep the ball rolling until I’m back. |
|
@zincplusplus Thank you for the feedback. I'll try and implement some of what you mentioned this weekend 👍 |
Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
…contribution-graph Add streak functionality to contribution graph mode
Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
Fix misaligned month labels in contribution graph
…atchLineLength for graph mode Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
…xes only Co-authored-by: MySTerY1747 <98713042+MySTerY1747@users.noreply.github.com>
…between-modes Refactor some of the logic
|
Quick update on the contribution graph PR. I’ve made several improvements since your initial feedback:
One thing I’d like to clarify from your earlier comment about “multiple habits in one tracker.” Right now, if a folder is used as the path, each habit renders as its own contribution graph, one after the other. For example: This produces a stack of graphs, one per habit, which seems consistent with how the default row mode displays multiple habits. Is this the behavior you had in mind? Happy to adjust the implementation if needed :)) |
|
hey. checked it out. I appreciate the enthusiasm for contributing, and no judgment on using AI to write code (I do it too). The issue is that the last update shows it didn't fully grasp how the existing features work, which ends up creating more back-and-forth than necessary for both of us.
I haven't dug into the code yet, but I think getting these right first would be a solid step forward. Happy to clarify anything. |
|
Thanks again for the feedback! I genuinely do appreciate it. I really care about getting this right, and I'll 100% keep trying. Might take a while, but I will get back to you when it's ready 🫡 |

Goal
Added a new
graphdisplay mode, that renders habits in a GitHub-style contribution graph: weeks as columns, and days of the week as rows.Changes
src/ContributionGraph.svelte: New components that build a week by day grid from the date range given.src/HabitTracker.svelte: Adds in amodesetting, which renders the output as a contribution graph ifmode === 'graph'src/main.ts: Adds a new setting to the page,mode, which is either set todefaultorgraphstyles.css: Add CSS grid layout for the contribution graph.Usage
The usage works almost exactly the same way as it did before, but there's a new option that users can add, to indicate whether to use default mode or contribution graph mode:
{ "path": "habits", "mode": "graph" }Screenshot