obsidian-day-planner
obsidian-day-planner copied to clipboard
Sort PlanSummaryData items by time
This commit makes sure that all PanItems are sorted by timne in the summary data. This allows for having separate sections with time slots throughout the note and still have them presented organzied in the timeline.
Fixes #106
I'm using the day-planner plugin with version number 0.5.8. Items are not sorted by time. Does that mean the version I'm using does not include the commit?
I'm using the day-planner plugin with version number 0.5.8. Items are not sorted by time. Does that mean the version I'm using does not include the commit?
Correct! This PR hasn't been merged so I don't think you have it :)
You can apply it manually if you want it today.
@flaper87 Perfect! It works.
@flaper87
I'd like this feature so much but afraid I don't know how to apply it manually. I'm not a coder. I tried downloading the source code and changed the appropriate file, but after an hour of googling, I still don't know how to build it into the "main.js" format that obsidian is looking for.
I checked your forked repo but it doesn't have any "Releases".
Any tips? I'm on a mac, and have typescript installed.
@csss1234
With plugins, you can look at the modifications made and then find those lines in the main.js file, generally.
Assuming you're using standard file structure:
Go to
.obsidian\Plugins\obsidian-day-planner
Open
main.js
Find
this.items = items
Modify that line to read
this.items = items.sort((a, b) => (a.time < b.time ? -1 : 1));
Merged this and a few other PRs into this fork which I've 'released' as v0.60: https://github.com/replete/obsidian-day-planner
Closing this, since the issue is already fixed in 0.7.0