Compare commits

...

9 commits
1.8.23 ... main

Author SHA1 Message Date
Paul
494d159107
Merge pull request #333 from kyan001/patch-1
Bug Fix #330 & #332
2026-06-26 14:16:55 +02:00
Kyan
0532186cb2
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-26 11:52:15 +08:00
Kyan
f6a28dab67
Bug Fix #330 & #332
In the breadcrumb path processing loop, the function exits too early when it encounters a level without a folder note, so later levels are never checked. Because of this early return, clicking a deeper path segment does not open its folder note unless all ancestor folders also have folder notes.
2026-06-26 11:38:34 +08:00
Paul
85cd981d8d Update main.ts 2026-06-15 11:51:21 +02:00
Paul
f172b8508f Update manifest.json 2026-06-05 10:06:51 +02:00
Paul
4a71e3d795 Fix #328 2026-06-05 10:06:39 +02:00
Paul
101758a52b Fix plugin not loading on some devices 2026-06-03 10:02:40 +02:00
Paul
a493120095 Update manifest.json 2026-06-02 16:51:48 +02:00
Paul
8248de14d9 Update obsidian-folder-overview 2026-06-02 16:51:36 +02:00
4 changed files with 24 additions and 16 deletions

View file

@ -1,7 +1,7 @@
{
"id": "folder-notes",
"name": "Folder notes",
"version": "1.8.23",
"version": "1.8.26",
"minAppVersion": "1.4.10",
"description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.",
"author": "Lost Paul",

View file

@ -202,8 +202,12 @@ async function updateFolderNamesInPath(
viewHeaderTitle.classList.remove('path-is-folder-note');
}
}
if (!folderNote) return;
if (folderNote) breadcrumb.classList.add('has-folder-note');
if (!folderNote) {
breadcrumb.classList.remove('has-folder-note');
breadcrumb.removeAttribute('data-path');
continue;
}
breadcrumb.classList.add('has-folder-note');
breadcrumb?.setAttribute('data-path', path.slice(0, -TRAILING_SLASH_LENGTH));
if (!breadcrumb.onclick) {
breadcrumb.addEventListener('click', (e) => {

View file

@ -221,9 +221,13 @@ export default class FolderNotesPlugin extends Plugin {
registerFileExplorerObserver(this);
const fileExplorer = getFileExplorer(this);
if (fileExplorer) {
// @ts-expect-error use internal API
fileExplorer.view.tree.infinityScroll.rootMargin = 1.5;
// @ts-expect-error use internal API
const infinityScroll = fileExplorer?.view?.tree?.infinityScroll;
if (infinityScroll) {
// increase infinity scroll buffer to show hidden folder notes
// Issue: https://github.com/LostPaul/obsidian-folder-notes/issues/274
infinityScroll.rootMargin = 1.5;
}
this.registerView(FOLDER_OVERVIEW_VIEW, (leaf: WorkspaceLeaf) => {
@ -302,13 +306,13 @@ export default class FolderNotesPlugin extends Plugin {
clipboardProto.handleDragOver as unknown as ClipboardManagerLike['handleDragOver'];
const originalHandleDrop =
clipboardProto.handleDrop as unknown as ClipboardManagerLike['handleDrop'];
clipboardProto.handleDragOver = (evt: DragEvent, ...args: unknown[]): void => {
const { dragManager } = clipboardManager.app;
const folderNotePlugin = this;
clipboardProto.handleDragOver = function (evt: DragEvent, ...args: unknown[]): void {
const { dragManager } = (this as ClipboardManagerLike).app;
const draggable = dragManager?.draggable;
if (draggable?.file instanceof TFolder) {
const folderNote = getFolderNote(this, draggable.file.path);
const folderNote = getFolderNote(folderNotePlugin, draggable.file.path);
if (folderNote) {
dragManager.setAction(
window.i18next.t('interface.drag-and-drop.insert-link-here'),
@ -317,22 +321,22 @@ export default class FolderNotesPlugin extends Plugin {
}
}
originalHandleDragOver(evt, ...args);
return originalHandleDragOver.call(this, evt, ...args);
};
clipboardProto.handleDrop = (evt: DragEvent, ...args: unknown[]): void => {
const { dragManager } = clipboardManager.app;
clipboardProto.handleDrop = function (evt: DragEvent, ...args: unknown[]): void {
const { dragManager } = (this as ClipboardManagerLike).app;
const draggable = dragManager?.draggable;
if (draggable?.file instanceof TFolder) {
const folderNote = getFolderNote(this, draggable.file.path);
const folderNote = getFolderNote(folderNotePlugin, draggable.file.path);
if (folderNote) {
draggable.file = folderNote;
draggable.type = 'file';
}
}
originalHandleDrop(evt, ...args);
return originalHandleDrop.call(this, evt, ...args);
};
if (this.settings.fvGlobalSettings.autoUpdateLinks) {

@ -1 +1 @@
Subproject commit 2bc9795b1feede51554dafacfe56123af5e2f2a6
Subproject commit f047859cc9a7f1c04ad35ecdc440a31a300bc6c2