Open ALegendsTale opened 4 months ago
Is the fieldsOrder intended to apply to the order of the properties in the target notes, or only in the order shown in the FileClass Fields configuration views?
I'd like it to, but I can't find any evidence that it is intended to.
The experience described originally is confirmed, but it is not exactly:
Fields are inserted in order created instead of modified order
The class definition note body has system properties, but two properties involved here: fields (which is a type of input that is not recognized by core obsidian currently) fieldsOrder (simple array)
Fields are an array of the definitions of the fileClass Properties the user has added, in the order they were added, by property name, example below:
**fields**:
- name: aliases
type: MultiFile
options:
dvQueryString: dv.pages( '"zz_Meta/Obsidian/Community Plugins"' )
customRendering: function (page) { return pages.file.aliases; }
path: ""
id: Tx3JrE
- name: Description
type: Input
options: {}
path: ""
id: 7uDiRg
- name: Active
type: Boolean
options: {}
path: ""
id: HRDUip
fieldsOrder is an array of the ids from fields objects(?) only. The order of the ids in fieldsOrder is directly controlled by the FileClass Fields tab with the Fileclass configuration page arrows.
When using one of the commands to review / add missing frontmatter, a pop-up will appear. In that pop-up, the properties are displayed with the following logic:
When Missing Properties are applied to the FrontMatter, it seems to be using the order in the fields property rather than fieldsOrder property.
Expected Resolutions As I mentioned above, the documentation doesn't really make clear what is expected to happen here, so all I can offer is that my expectation is that:
Partial Workaround In the class definition note body using source code mode, you can re-arrange the array entries order directly there. This will allow all of the FrontMatter to apply to a new note in the desired order if you don't have any mix of Properties (or if the pre-existing ones happen to be the top ones anyway). It will still be some kind of mix-up for files that have some of the order, or if you were trying to insert a new property in the middle of pre-existing note property lists.
Yep, I'm constantly moving things up and down in the frontmatter view, I'd love to have better ordering by default.
Steps to reproduce issue:
Release Version: 0.8.3