Skip to content

0.19.0 — Typed property coercion (checkbox / date)

Choose a tag to compare

@diegoeis diegoeis released this 17 May 02:58
· 58 commits to main since this release

Rules targeting properties registered as checkbox, date, or datetime now write the YAML with the right runtime type, so the native Obsidian widgets render properly. Closes part of #11.

New Features

  • Checkbox: rule value "true" (any casing) becomes the boolean true; anything else becomes false. Renders as a real Obsidian checkbox instead of plain text.
  • Date: values are normalized to YYYY-MM-DD before writing. If you type in ISO, it's used directly. Otherwise the plugin tries Daily Notes' configured date format (if the core plugin is enabled), then Templates' (if enabled), then DD-MM-YYYY, DD/MM/YYYY, and YYYY/MM/DD in that order. First strict match wins. MM-DD-YYYY is intentionally excluded to avoid silent DD-vs-MM ambiguity for non-US users.
  • Datetime: trimmed and written as-is (Daily Notes / Templates only expose date formats).
  • add collapses into overwrite for typed scalar properties — you can't push a second value into a checkbox or a date, so the plugin transparently overwrites.

Bug Fixes

  • _writeFrontmatter used to delete any property whose value was null OR undefined. It now only deletes on undefined. null is preserved as a valid value. No visible behavior change today, but it removes a footgun for future code paths.

Why

Issue #11 from @KenCrandall reported that checkbox and date property values were always written as strings, breaking the native widgets. This release fixes that.

Compatibility

  • Minimum Obsidian version: 1.5.0 (unchanged).