SebastianMC / obsidian-custom-sort

Take full control over the order and sorting of folders and notes in File Explorer in Obsidian
GNU General Public License v3.0
302 stars 23 forks source link

Plugin broken in obsidian 1.7.2 #160

Closed Azmoinal closed 2 months ago

Azmoinal commented 2 months ago

Updating to the insider Obsidian 1.7.2 seems to broke the plugin.

My guess is that is related to a change into API done by Obsidian team more info here,

SebastianMC commented 2 months ago

Thanks a lot @Azmoinal for reporting this early!!!

After a quick check - indeed the problem is related to this new idea of deferred views. There is also some other breaking change in Obsidian on top of that.

The Obsidian team is again contradicting their core idea - they declare that plugin's community is a fundamental part of Obsidian ecosystem, at the same time they don't care about backward compatibility and introduce breaking changes. This is like they did this for the fifth time...

I wonder how many of existing plugins will break and will be left unmaintained after this yet another revolution.


Status update 2024-09-20: After more detailed investigation it turns out that there was a significant internal refactoring in Obsidian. In result the plugin-integration-point used by this plugin no longer exists. Technically it was the createFolderDom function which allowed the plugin to hook up the custom sort function, overriding the built-in sort function of the folder. Knowing the above, finding a potential fix for this could require a significant amount of time and there is no guarantee it is feasible. I don't have much free time to spent on this now.

Is anyone reading this able to help?

For my personal use, I will roll back Obsidian to 1.6.7 (the most recent public version) and stay on that version until I find time sufficient to find a new plugin-integration-point.

Azmoinal commented 2 months ago

Hi @SebastianMC, thanks a lot for the quick response and clarification.

Unfortunately, I'm not a developer so I cannot help you.

I could report the situation to the discord insider channel, trying to push them to provide a possible solution.

I'm sad about the situation because your plugin is one of the most useful for me and it changes the way I use obsidian.

SebastianMC commented 2 months ago

Hi @Azmoinal

a potential plugin-integration-point at technical level remains the function getSortedFolderItems - it is still exposed in 1.7.2 This will be the first investigation point, a next step. I should be able to relatively quickly (few days) expose a proof-of-concept plugin on github, a clone of the main plugin code adjusted for 1.7.2, installable via BRAT. The goal - see if the custom-sort plugin can stil fully integrate with Obsidian having only the getSortedFolderItems as interfacing point. If this works, then I will make it backward compatible and port to / merge with the main plugin home in github. That is the long-term plan.

At the same time I'm currently short on time which I could spend on the plugin (investigations, discussions, etc.)

I hope the official public release 1.7.x won't appear very soon.

SebastianMC commented 2 months ago

The 2.1.14 version of the plugin (released a minute ago) works correctly with Obsidian 1.7.2

The long story short:

Please update the plugin to 2.1.14, retest and let me know in case of problems

bray commented 2 months ago

Thanks for the quick fix! It seems to be working now when manually sorting via the toggling command. But it no longer automatically sorts when I first open Obsidian (desktop and mobile v1.7.2). I'm almost positive it did that automatically before... ?

Azmoinal commented 2 months ago

Hi @SebastianMC, I cannot test it right now on my desktop but on the iPad al start the plugin is enabled but at start the custom sorting is not applied (the orange icon is showed into the sidebar) activating it, all works fine.

SebastianMC commented 2 months ago

Hi @bray, the behavior which you describe was first observed in Obsidian 1.6.3, reported under #147 with a fix released in June in 2.1.11. The fix only partially addressed the issue. It is possible that in Obsidian 1.7.3, because of their new 'lazy views' performance optimisation , the issue is more prevalent, observable more frequently. If it is reproducible on demand please open a ticket.

Hi @Azmoinal, it is possible that what you encounter is exactly the same as described by @bray

Having fixed the blocker under this ticket, the less critical issue(s) can be reported and wait for convenient time.

Thanks for testing and providing the feedback!

Azmoinal commented 2 months ago

Hi @bray,

the behavior which you describe was first observed in Obsidian 1.6.3, reported under #147 with a fix released in June in 2.1.11. The fix only partially addressed the issue. It is possible that in Obsidian 1.7.3, because of their new 'lazy views' performance optimisation , the issue is more prevalent, observable more frequently.

If it is reproducible on demand please open a ticket.

Hi @Azmoinal,

it is possible that what you encounter is exactly the same as described by @bray

Having fixed the blocker under this ticket, the less critical issue(s) can be reported and wait for convenient time.

Thanks for testing and providing the feedback!

Hi,

Yes. It is the same issue. I didn't realized that @bray posted in the meantime I was writing.

I can reproduce it on my iPad Pro M1 simply force quitting e reopening Obsidian. I would check on desktop before raising a new, specific,ticket of the remaining issue.

Thanks a lot for the quick fix.

bray commented 2 months ago

Hi @SebastianMC - I created https://github.com/SebastianMC/obsidian-custom-sort/issues/163. Thanks!