Skip to content

0.2.5

Choose a tag to compare

@github-actions github-actions released this 03 Aug 22:01
2989a62

Worth taking for the first fix: a control in Obsidian's Properties panel could act on a note you were no longer looking at.

Fixed

  • A property control acts on the note in front of you. Obsidian owns the rows of its Properties panel and recycles them — switching notes keeps the element and rewrites its contents — and Fileclass rebuilt its button only when the property name changed. On a second note carrying the same property, the first note's button survived with that note captured inside it. With a list you could see it: one book's editions opened under another book's name, which is how it was found. With a Cycle or a Boolean it was silent — the wrong note's value advanced, no modal, nothing on screen to give it away. The note and the field are now read from the row at the moment of the click, and the note's path and the field's type join the property name in the button's identity, so it is rebuilt rather than reused — which also stops an icon and a label from outliving the type they described
  • A child field may share a root field's name. A class keeps its nested children in the same list as its root fields, told apart by their path, and the resolver de-duplicated that list by name alone. A Book with a publisher and an editions list whose items each have their own therefore lost the child: absent from the schema, and never offered when adding an item. A field is identified by its name at its level now. Overriding an inherited child still works, at its own level, and excludes follow the same rule — they name a field of a class, which is a root field; a group's children go with their parent
  • An item you start and abandon is no longer written. Add item on an ObjectList pushed an empty item into the draft before opening its editor, and cancelling didn't take it back: nothing showed it — the list still read two rows, the Unsaved changes line stayed quiet — and the next Save wrote {} into the frontmatter, where it came back as a phantom item. An item exists once its editor is saved
  • An empty item reads as empty. With a display template, an item holding nothing rendered as the template's own separators — a lone ·, which reads as a value. Such an item now shows as (empty), and a list summarises it as 2. (empty) rather than as a bare rank

Learning the plugin

One new take, on the type these fixes are about: a list of grouped fields — three editions of Dune typed as items of one property, a display template bringing each back to one line, the order changed by hand, and a base that counts them per book. The documentation gained what that last step had to be measured for: a base reaches a list through a formula — note.editions.length counts, note.editions[0].year reaches into an item — while mapping over the list renders an empty cell rather than an error.

Twenty-four videos now, fifty-five minutes: https://mdelobelle.github.io/fileclass/videos/

Compatibility: minAppVersion 1.12.7. Fileclass builds on the core Bases plugin, which needs to be enabled.