mdelobelle / metadatamenu

For data management enthusiasts : type and manage the metadata of your notes.
https://mdelobelle.github.io/metadatamenu
MIT License
520 stars 27 forks source link

Globalclass overwrites other fileclasses that don't have fields defined #666

Open jmonroynieto opened 5 months ago

jmonroynieto commented 5 months ago

I've been tweaking my configuration following #451. I managed to display a single selector in the modal but I stopped seeing the appropriate fileclass icons on some files unless I add my global fileclass to the list in the metadata. For the sake of example, I use an alias type and my global class is supposed to be Any.md. So now I have to add type: Any, myOtherClass. This did not use to be so, I could just add a single class. I wonder if this relied on my other file classes having an extends: Any declaration before.

The weird behavior stops when I remove Any from the location or otherwise disable the global fileclass option. This is not a suitable workaround because it now doesn't show the modal button for those notes that do not have fileclass defined.

Further exploring the issue reveals that those classes that have fields declared, do not have the same problems.

Configuration of global fileclass Any.md
---
limit: 100
mapWithTag: false
icon: plus
tagNames: 
excludes: 
extends: 
version: "2.13"
fields:
  - id: K6aVjl
    name: dateUpdated
    options:
      dateFormat: YYYY-MMM-DD
      defaultInsertAsLink: "false"
      dateShiftInterval: 3 days
    type: Date
    path: ""
  - name: fako
    type: Cycle
    options:
      sourceType: ValuesList
      valuesList:
        "1": £
        "2": ¥
        "3": €
        "4": $
        "5": §
        "6": ¢
    path: ""
    id: 3aDeAl
filesPaths: 
bookmarksGroups: 
savedViews: []
favoriteView: 
fieldsOrder:
  - 3aDeAl
  - K6aVjl
---

dateUpdated:: {"type":"Date","options":{"dateFormat":"YYYY-MMM-DD","defaultInsertAsLink":"false","dateShiftInterval":"3 days"}}