Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin broken in obsidian 1.7.2 #160

Closed
Azmoinal opened this issue Sep 20, 2024 · 9 comments
Closed

Plugin broken in obsidian 1.7.2 #160

Azmoinal opened this issue Sep 20, 2024 · 9 comments
Assignees
Labels

Comments

@Azmoinal
Copy link

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 SebastianMC self-assigned this Sep 20, 2024
@SebastianMC SebastianMC added the bug Something isn't working label Sep 20, 2024
@SebastianMC
Copy link
Owner

SebastianMC commented Sep 20, 2024

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
Copy link
Author

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
Copy link
Owner

SebastianMC commented Sep 20, 2024

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 added a commit that referenced this issue Sep 20, 2024
- the fileExplorer patchability check made smarter and version-dependent
- the plugin-integration-point support required by Obsidian 1.7.2 has been already incorporated in the plugin earlier on, for 1.6.0 Obsidian release
@SebastianMC
Copy link
Owner

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

The long story short:

  • the plugin has already been prepared for the specific Obsidian breaking changes
  • the heavy lifting of investigation of new plugin-integration-point in Obsidian and updating the plugin code accordingly was done for Obsidian 1.6.0 and has been present in the plugin 2.1.9, released and in use since May this year. My memory wasn't kind enough to tell me that right away today ;-)
  • the only remaining fix (applied today) was to make the plugin-integration-point detection logic smarter: not to verify the presence of the old integration point when actually the new integration point is going to be used
  • I created a clone of the plugin repo (https://github.com/SebastianMC/obsidian-custom-sort-poc-obsitian-1-7-2) only to quickly find out that the code needed for Obsidian 1.7.2 is already there and the fix for today is an easy low-hanging-fruit
  • I thanked myself for the heavy-lifting work done in May to make the plugin compatible with Obsidian 1.6.0+ :-)

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

@bray
Copy link

bray commented Sep 20, 2024

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link

bray commented Sep 23, 2024

Hi @SebastianMC - I created #163. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants