Closed cdloh closed 1 year ago
Hey @cdloh I'm currently not at home until friday but I'll try to review the changes as early as possible thank you for your work!
No stress @LostPaul. Note that I made some changes to the way that renaming works for files to make it more consistent.
Apologies as this is a fairly large set of changes so if you'd rather me somehow split it up into smaller changes I can give that a shot.
Apologies as this is a fairly large set of changes so if you'd rather me somehow split it up into smaller changes I can give that a shot.
That would be great
It doesn't seem to be adding the has folder note class when a new folder note has been created
@LostPaul forgot to push the styles changes. As it's now applied to the parent DIV gotta change the styles slightly.
@cdloh I didn't mean the style isn't applied but the folder html element doesn't even have the css class I checked it with the dev tools and other folder names were underlined.
I've just tested this branch locally again and it's working fine when I either create the note manually or use the Command menu.
I'm running insider but I doubt that would make any difference for this
I've just tested this branch locally again and it's working fine when I either create the note manually or use the Command menu.
I'm running insider but I doubt that would make any difference for this
Does it also work for you with ctrl + clicking on the folder name?
Or nvm I'm not sure anymore if I had used the right version I'll try it later again
I had this error spam in the console @cdloh
The element doesn't even seem to exist
What version of Obsidian are you running? Are you using a custom file explorer?
The latest insider version and no
What do you get back from
app.workspace.getLeavesOfType('file-explorer')[0].view.files
I'm currently not at my pc I'll tell you this later
What version of Obsidian are you running? Are you using a custom file explorer?
What do you get back from app.workspace.getLeavesOfType('file-explorer')[0].view.fileItems['/']
or replace /
with any valid file path.
@LostPaul I downloaded latest insiders and the API has changed in 1.2.2
I've pushed a fix for it. Odd as it's been stable for a chunk of versions.
Yeah now it works for me
But will it work in older versions?
I've made it default to the old version of the API and only use new version when available. Ideally once 1.2.2 goes Public Release cut a new version of the app with the old API version cleaned up and then bump the minimum app version.
Deleting a folder note currently doesn't remove the class from the folder
Found the issue
Not sure yet what it causes but currently I one folder still collapses @cdloh https://user-images.githubusercontent.com/70213368/230781118-0bebc6a8-be3e-4e66-a023-b7a48d9018e1.mp4
or am I dumb and blacklisted the folder I'm not sure anymore
Updated to fix parent / children issues with adding classes to DIV as the element I was using included children, instead of just that folder.
Not sure yet what it causes but currently I one folder still collapses @cdloh https://user-images.githubusercontent.com/70213368/230781118-0bebc6a8-be3e-4e66-a023-b7a48d9018e1.mp4
Can you compare to the old version of the plugin? I'm not entirely sure what the functionality is meant to look like here.
I'm not sure what the functionality is meant to do here
Not sure yet what it causes but currently I one folder still collapses @cdloh https://user-images.githubusercontent.com/70213368/230781118-0bebc6a8-be3e-4e66-a023-b7a48d9018e1.mp4
Can you compare to the old version of the plugin? I'm not entirely sure what the functionality is meant to look like here.
I'm not sure what the functionality is meant to do here
Everything seems to work fine. I'm not sure if I excluded the folder. The attachments folder shouldn't collapse normally, but I also couldn't reproduce it.
Until which version of obsidian does the plugin now work @cdloh ?
It will work with all versions @LostPaul
The changes needed for 1.2.X are backwards compatible. When other changes are made that aren't backward compatible that code can be cleaned up.
It will work with all versions @LostPaul
The changes needed for 1.2.X are backwards compatible. When other changes are made that aren't backward compatible that code can be cleaned up.
Alright has anything else improved besides the css classes getting applied and removed when they should? (for the release notes) @cdloh
Styles now work from startup and are applied correctly regardless of file explorer status (ie if the child is shown / expanded) and automatically updates styles when files change.
File Renaming is now handled in a few more scenarios.
Excluded folder now correctly cascades to more than one folder down.
This enables loading of classes before hand so that the user experience is cleaner whilst browsing the file tree
I've hooked a few more events up to support this so that CSS classes can be updated as they go
Note that it requires the changes from #4 if that MR needs changes I'll rebase this one.