Christopher Wagner20 downloadsAdds collapsible group headers, canonical key ordering, folder-scoped templates, and cleanup tools to the native Properties panel.
Adds collapsible group headers to the native Properties panel, keeps frontmatter keys in a canonical order, applies folder-scoped field templates, and provides cleanup tooling for stale or empty fields. All of it is configured from a settings UI, with no source edits.
The native Properties panel renders every frontmatter key as a flat, unordered list. On a metadata-rich vault, AI-system fields, hidden fields, CRM fields, and content fields all pile up with no structure. As you adopt more metadata conventions, the clutter only grows.
Foldable Frontmatter Groups adds the structure the panel lacks: collapsible sections, a consistent key order, folder-appropriate defaults, and a way to find and scrub fields you no longer want, so the panel shows what matters for each note type.
prefix* wildcards (for example ai_*, aic_*, _*), or by a regex for power use. First match wins by settings order.<today> / <now> markers), a per-template key order, an optional group assignment, and optional note-body scaffolding (evaluated through Templater when installed).This plugin is not yet in the Community Plugins directory. Install it via BRAT.
cwagner223355/obsidian-foldable-frontmatter-groupsSettings live on three tabs.
| Tab | What it configures |
|---|---|
| Grouping | The master folding toggle and auto-reconcile toggle (with the exclude-list editor and the opt-in orphan-null scrub); Properties Order; global folder templates; and the groups, each with its matcher, fold-by-default state, and linked templates. |
| Customize Icons | Per-field Lucide icon overrides. |
| Cleanup | The in-scope key catalog with counts, per-field cleanup scope, remove-null / remove-all, the field-occurrence inspector, migrate field, and the scrub-log viewer. |
Key toggles:
| Setting | Default | Description |
|---|---|---|
| Group folding | on | Master switch. When off, the plugin unwraps every group and leaves the native panel untouched; settings below dim but persist. |
| Auto-reconcile frontmatter | off | When on, reconcile fires on both file open and file leave. Manual commands run regardless. |
| Exclude folder notes | on | Automatically exempt folder / MOC notes from reconcile, with per-note and per-folder whitelists. |
| Scrub orphaned nulls | off | During reconcile, delete null values whose key no matching template claims. Opt-in. |
| Command | Action |
|---|---|
| Reconcile frontmatter order (active file) | Run the full reconcile pass (defaults, cleanup, reorder) on the active file, regardless of the auto-reconcile toggle. |
| Apply default frontmatter (active file) | Same pass, surfaced as a defaults-first action. |
Each reconcile does three things in one processFrontMatter write: it inserts template defaults into missing or empty keys (never overwriting a value that already holds data), scrubs cleanup-flagged null values, and reorders keys to the canonical order (Properties Order keys first, then unmatched keys in place, then each group's matching-template order). A key that any matching template lists as a default is never scrubbed by the cleanup pass, so a field configured as both is stable. When the note is already correct, no file is written.
Reconcile is triggered only by you opening or leaving a note, never by a background vault watcher. Any DOM or write error leaves the native Properties UI untouched.
Every remove-null, remove-all, and migrate action appends the removed { path, value } pairs to scrub-log.json in the plugin folder (capped at 500 entries). The "View scrub log" modal renders them newest-first with a date-range JSON export. Recovery is manual (there is no one-click restore yet).
If Foldable Frontmatter Groups is useful to you, consider buying me a coffee.
MIT license. See LICENSE.