github chhoumann/quickadd 2.5.0

23 hours ago

2.5.0 (2025-10-10)

🌟 Release Highlights

This is a major feature release with significant improvements to QuickAdd's capabilities:

  • 🎨 Native YAML Property Types (Beta) - Use JavaScript arrays and objects directly in scripts, automatically formatted as proper Obsidian properties
  • 🛑 Macro Abort Control - New params.abort() method and automatic stopping on errors/cancellations
  • 🔍 Searchable Multi-Select Inputs - New suggester field type with search and multi-select capabilities for One Page Inputs
  • 🐛 Important Bug Fixes - Script-provided titles, escape sequences in code input, and property type handling

📊 By the numbers: 61 files changed, 8,177 lines added, 593 tests passing


⚠️ Breaking Behavior Change

Macro execution now stops when you press Escape or encounter errors. Previously, pressing Escape would continue execution with undefined values, which could cause confusing downstream errors.

New behavior:

  • Press Escape → macro stops immediately
  • Script error occurs → macro stops with clear error message
  • Call params.abort() → macro stops with your custom message

This is a better, more predictable experience, but if you have workflows that rely on the old behavior, see the migration guide below.


Features

🎨 Native YAML Front Matter Support for Structured Variables (Beta)

PR #932 | Commit 714ee32

QuickAdd can now automatically convert JavaScript data types into proper Obsidian property types in front matter!

Before:

// Manual string formatting 😓
QuickAdd.variables.authors = "John Doe, Jane Smith, Bob Wilson";
QuickAdd.variables.tags = "#work, #project";

After:

// Native data structures! 🎉
QuickAdd.variables.authors = ["John Doe", "Jane Smith", "Bob Wilson"];
QuickAdd.variables.tags = ["work", "project"];
QuickAdd.variables.metadata = { status: "active", priority: 1 };
QuickAdd.variables.completed = true;

Supported types:

  • Arrays → List properties
  • Objects → Object properties
  • Numbers → Number properties
  • Booleans → Checkbox properties
  • Null → Null values

⚠️ This is a beta feature disabled by default. Enable it here:

📚 Full documentation: https://quickadd.obsidian.guide/docs/TemplatePropertyTypes

Demo:

CleanShot.2025-10-10.at.21.48.11.mp4

🛑 Macro Abort Functionality

PR #937 | Closes #755, #897

Macros now stop executing when they encounter errors or when you cancel an input. This prevents confusing cascading errors and gives you programmatic control over macro execution.

What changed:

  1. Automatic abort on cancellation - Pressing Escape or clicking Cancel now stops the entire macro
  2. Automatic abort on errors - Unhandled exceptions stop execution (with preserved stack traces for debugging)
  3. Manual abort method - New params.abort(message) for validation scenarios
  4. Visual feedback - User-facing Notice when macros abort (PR #938)

Example use case:

module.exports = async (params) => {
    const file = params.app.workspace.getActiveFile();
    const cache = params.app.metadataCache.getFileCache(file);

    if (!cache?.frontmatter?.parent) {
        params.abort("This macro requires a note with a parent property");
    }
    // Macro stops here, no downstream errors
};

Another example:

module.exports = async (params) => {
    const projectName = await params.quickAddApi.inputPrompt("Project name:");

    if (!projectName || projectName.length < 3) {
        params.abort("Project name must be at least 3 characters");
        // Macro stops - no unwanted notes created
    }

    // Continue with valid input...
};

🔍 Searchable Multi-Select Suggester Field Type

PR #934 | PR #936 | Closes #934

One Page Inputs now support a new suggester field type with searchable autocomplete and multi-select capabilities!

Features:

  • 🔍 Searchable - Type to filter suggestions
  • Multi-select - Select multiple items (separated by commas)
  • 🎯 Custom options - Use static arrays or dynamic data sources (Dataview queries, etc.)
  • ⌨️ Custom input - Enter values beyond predefined options
  • 🎨 Configurable - Case-sensitivity, multi-select mode

Example:

const values = await quickAddApi.requestInputs([
  {
    id: "tags",
    label: "Select Tags",
    type: "suggester",
    options: ["#work", "#personal", "#project", "#urgent"],
    suggesterConfig: {
      multiSelect: true,
      caseSensitive: false,
      allowCustomInput: true
    }
  }
]);
// Result: values.tags = "#work, #project, #urgent"

Demo:

Suggester field with multi-select

📚 Full documentation: https://quickadd.obsidian.guide/docs/Advanced/onePageInputs

Huge thank you to @FindingJohnny for suggesting and helping develop this feature!


📝 Improved Script Discovery UX

PR #940 | Closes #895

QuickAdd now shows helpful notices when the Browse button finds no scripts, with clear guidance on:

  • Scripts must be in your vault (not .obsidian)
  • Hidden folders (starting with .) are not supported
  • Links to documentation

💡 Pro tip: Use underscore-prefixed folders instead: _quickadd/scripts/ instead of .quickadd/scripts/


Bug Fixes

🔧 Property Type Handling in Frontmatter Templates

Commit 2c24123

Critical follow-up fix for the Property Types feature (PR #932):

  • Preserves nested YAML paths when collecting template properties
  • Respects Obsidian property types when parsing array-like input
  • Ensures capture post-processing keeps frontmatter at top of files

This fix adds 173 new tests for capture choice frontmatter handling.


🔧 Script-Provided Title Values

PR #931 | Closes #929

Scripts can now override default title generation. When you set variables.title in a script, {{VALUE:title}} now respects that value instead of always using the file basename.

Before:

// Script sets custom title
variables.title = "My Custom Title";

// Template uses it
// Captured: {{VALUE:title}}

// Result: "Captured: NoteBasename" ❌

After:

// Script sets custom title
variables.title = "My Custom Title";

// Template uses it
// Captured: {{VALUE:title}}

// Result: "Captured: My Custom Title" ✅

🔧 Escape Sequences in wideInputPrompt

PR #939 | Closes #799

Long-standing issue from April 2024 now fixed!

Escape sequences like \n, \t, \" are now preserved as literal text when typing in wide input prompts. This is critical for code input use cases.

Before:

User types: "aa\nbb"
Result: "aa
bb" ❌ (actual newline)

After:

User types: "aa\nbb"
Result: "aa\nbb" ✅ (literal string)

🔄 Migration Guide

For the Macro Behavior Change

If you have macros that intentionally use undefined when users press Escape, update them to handle cancellation explicitly:

Before 2.5.0:

const input = await quickAddApi.inputPrompt("Optional input:");
// If user presses Escape, input is undefined, macro continues
if (input) {
    // Do something with input
}
// Macro continues regardless

After 2.5.0:

const input = await quickAddApi.inputPrompt("Optional input:");
// If user presses Escape, macro stops immediately

// To allow optional input, catch the abort:
// (Note: QuickAdd API still returns undefined on cancel for compatibility)
if (input === undefined) {
    // Handle optional case
    return; // or params.abort("Input required");
}

Most users won't need to change anything - this new behavior is more intuitive and prevents confusing errors.


⚠️ Known Limitations

  • Hidden folders (starting with .) are not supported for scripts. Use underscore-prefixed folders instead (e.g., _quickadd/scripts/ instead of .quickadd/scripts/)
  • Property Types feature is in beta - Please report any issues you encounter!

📚 Documentation Updates

New and updated documentation:


🙏 Thank You

Special thanks to:

  • @FindingJohnny for suggesting and helping develop the One Page Inputs improvements
  • Everyone who reported issues and provided feedback
  • All QuickAdd users for your continued support!

Full Changelog

Features:

  • add helpful notice when no scripts found and clarify hidden folder restrictions (#940) (2a3678a), closes #895
  • Add macro abort functionality (#937) (ad5076b), closes #755 #897
  • add multi-select support to suggester field type (#936) (969a9e0), closes #934
  • add searchable suggester field type to One Page Inputs (#934) (31d8a33)
  • Native YAML Front Matter Support for Structured Variables (Beta) (#932) (714ee32)

Bug Fixes:

  • honor property types when templating frontmatter (2c24123)
  • preserve script-provided title values in setTitle() (#931) (9e67ff9), closes #929
  • show user notice when macro execution is aborted (#938) (4567168)
  • wideInputPrompt not preserving escape sequences (#799) (#939) (4392ba2)

Don't miss a new quickadd release

NewReleases is sending notifications on new releases.