obsidian-day-planner icon indicating copy to clipboard operation
obsidian-day-planner copied to clipboard

Sort PlanSummaryData items by time

Open flaper87 opened this issue 2 years ago • 5 comments

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.

image

Fixes #106

flaper87 avatar May 10 '22 08:05 flaper87

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?

sierxue avatar Jul 04 '22 02:07 sierxue

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 avatar Jul 04 '22 04:07 flaper87

@flaper87 Perfect! It works.

sierxue avatar Jul 05 '22 01:07 sierxue

@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 avatar Jul 25 '22 19:07 csss1234

@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));

jerryhcooke avatar Aug 19 '22 08:08 jerryhcooke

Merged this and a few other PRs into this fork which I've 'released' as v0.60: https://github.com/replete/obsidian-day-planner

replete avatar Feb 21 '23 20:02 replete

Closing this, since the issue is already fixed in 0.7.0

ivan-lednev avatar Aug 30 '23 20:08 ivan-lednev