Skip to content

feat: property and computed columns in collection views - #78

Merged
d12frosted merged 1 commit into
masterfrom
feat/collection-property-columns
Sep 26, 2026
Merged

d12frosted merged 1 commit into
masterfrom
feat/collection-property-columns

Conversation

@d12frosted

Copy link
Copy Markdown
Owner

Notes already carry their :PROPERTIES: drawer and vulpea indexes it (vulpea-db-query-by-property), but the collection view could not show or filter on it, and there was no way to add a column of your own. Came up on Reddit.

What's new:

  • (property KEY) column. c a offers prop:KEY for every property found on the notes in view. e sets it on the selection (empty input removes it, Z undoes) and = narrows to its value.
  • :properties filter, same shape as :meta: (("COMMIT_ID" . "abc") ("CREATED_TS" . t)). In queries it's prop:KEY=VALUE / prop:KEY=*, in the buffer / p. Keys are case-insensitive like in org. When no tag condition is cheaper, it's pushed down to the property index.
  • Adaptive columns show the properties the view is filtered by (like feat: show filtered meta keys as adaptive collection columns #77 does for meta).
  • (fn NAME FUNCTION) computed columns: FUNCTION gets the note and returns the cell, so anything derivable from a note can be a column.

Property writes locate the entry by its ID rather than the stored position, since positions go stale once an earlier write in the same batch touched the file.

README and CHANGELOG are updated.

Notes carry their :PROPERTIES: drawer and vulpea indexes it, but the
collection view had no way to show or filter on it.

- (property KEY) column, offered as prop:KEY by c a; e edits it on the
  selection (undoable), = narrows to its value
- :properties filter with the :meta shape, prop:KEY=VALUE and
  prop:KEY=* in queries, / p in the buffer; pushed down to the
  property index when no tag condition is cheaper
- adaptive columns include the filtered properties
- (fn NAME FUNCTION) computed columns for anything else

Property writes find the entry by ID, so a batch touching several
notes of one file does not write through stale positions.
@d12frosted
d12frosted merged commit 6fbc99c into master Sep 26, 2026
2 checks passed
@d12frosted
d12frosted deleted the feat/collection-property-columns branch September 26, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant