Repository navigation
0.17.0 — Multiple conditions per rule (any/all)
Each rule now supports a flat list of conditions combined with Match any / Match all of the following, inspired by Zotero. Replaces the old workaround of using temporary properties to simulate AND/OR.
New Features
- Multiple conditions per rule (any/all): each rule now supports a flat list of conditions and a
Match any of the following/Match all of the followingselector at the top of the IF block. Tracked in FRD-001 v2.0. + Add conditionbutton appended to the IF block — arbitrary number of conditions per rule, each keeping the existing layout (PROPERTY / FIRST_LEVEL_HEADING + operator + value).- Per-condition remove (
×): each condition gets a remove button when more than one is present. When the rule is back to a single condition, the match dropdown auto-hides.
Migration
- Automatic, one-time migration from the legacy single-condition shape to the new
{ match, conditions: [...] }shape. Migration version bumps from 2 to 3 inside_migrateRules()and is idempotent. - All legacy rules default to
match: "any". Because there is exactly one condition, behavior is bit-for-bit identical to v0.16.3 until the user adds a second condition. data.backup.jsonis written next todata.jsonin the plugin folder before the migration writes anything, so users can recover the pre-v0.17.0 settings by copying it back if needed.- Downgrade is not supported after the first v0.17.0 load. Older plugin versions don't understand
conditions[]and will silently ignore the new rules.
Bug Fix Bundled
applyRulesToFrontmatterwas shallow-copying frontmatter ({...currentFrontmatter}), which preserved nested array references shared with Obsidian'smetadataCache. Mutations likenewFm.tags.push(...)polluted the cache permanently and the next run would see the value as "already applied" and skip the write. Replaced with a deep clone (JSON round-trip).
UI Polish
- Buttons migrated to the official
ButtonComponentAPI with.setCta()(Add rule, + Add condition, + Add action),.setWarning()(Remove), or default styling (Run this rule). - Match selector migrated to
DropdownComponent. - IF header rebuilt to mirror the THEN header structure, with the match dropdown flex-aligned to the right.
- Condition rows now reuse the same visual treatment as action rows (
.conditional-then-action).
CSS
- Dropped all legacy
.eis-btn*rules, removed orphan.conditional-remove-action, removed--cp-red-color. - Scoped
.setting-item-nameunder#eis-cp-pluginso it stops leaking into other plugins' settings tabs. - Deduplicated
.conditional-rules-header.
Compatibility
- Minimum Obsidian version: 1.5.0 (unchanged).