Skip to content

fix: resolve #1674 — When reading is the default mode for new tabs and you create a new note from a Base configured create a file in a folder, the folder template does not fully trigger#1745

Open
andoan16 wants to merge 1 commit into
SilentVoid13:masterfrom
andoan16:contribai/improve/quality/verify-folder-template-execution-in-fuzz

Conversation

@andoan16

Copy link
Copy Markdown

Summary

fix: resolve #1674 — When reading is the default mode for new tabs and you create a new note from a Base configured create a file in a folder, the folder template does not fully trigger

Problem

Severity: Medium | File: src/handlers/FuzzySuggester.ts

Since the issue occurs when creating new notes through Base/folder creation, the fuzzy suggester logic may need to ensure proper template execution context, especially on mobile devices with reading view defaults.

Solution

Review the folder template triggering logic in the fuzzy suggester to ensure it properly handles the mobile reading view scenario and waits for complete editor initialization before template execution.

Changes

  • src/handlers/FuzzySuggester.ts (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

… new tabs and you create a new note from a Base configured create a file in a folder, the folder template does not fully trigger

Fixes SilentVoid13#1674

Signed-off-by: Ân Đoàn <33853760+andoan16@users.noreply.github.com>

@Zachatoo Zachatoo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add wdio tests, as per the contributing guide. Thanks!

Comment on lines +75 to +80
setTimeout(() => {
void this.plugin.templater.create_new_note_from_template(
item,
this.creation_folder,
);
}, 100);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't going to work, there is no editor available in reading mode, ever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants