Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - The prioritization buttons for the custom rules do not work. #611

Open
Drakemoor opened this issue Nov 11, 2024 · 0 comments
Open

Comments

@Drakemoor
Copy link

Describe the bug
The prioritization buttons for the custom rules do not work as they are suppose to.

To Reproduce

  1. Go to the plugin settings
  2. Click on the prioritize buttons.
  3. The rule doesn't move up or down.

Expected behavior
I expect the rules to move up or down in the list so I can prioritize them.

Additional context
I have quite a few custom rules, probably over 50, and this is an inconvenient bug. If I click once on one of the prioritization arrows in the settings nothing visibly changes, but the if I restart Obsidian, the rule I have just tried to re-prioritize IS moved one spot up or down.

Now, if I have to change the rule place---let's say 20 spots---I have to restart Obsidian 20 times.

Now, if I peek into the data.json file there is something that puzzels me:

     {
        "rule": ".*\\.(md)$",
        "icon": "BoBxsFileMd",
        "for": "everything",
        "order": 50,
        "color": "#ffffff"
      },
      {
        "rule": ".*\\.(jpg|png|webp|gif|avif)$",
        "icon": "MiZPicLandscape.01",
        "for": "files",
        "order": 50,
        "useFilePath": true
      },
      {
        "rule": "09 Misc/09.2 Templates",
        "icon": "MiZPlotBlueprint.05",
        "for": "folders",
        "order": 52,
        "useFilePath": true
      },
      {
        "rule": "09 Misc/09.2 Templates",
        "icon": "MiZPlotBlueprint.02",
        "for": "files",
        "order": 54,
        "useFilePath": true
      },
      {
        "rule": ".*/?\\b(Appa|Arnold—Nick|Eggy—Archie|Maya|Missy|Nelly|Pacha|Peaches|Pookie)\\b.*",
        "icon": "FasDog",
        "for": "everything",
        "order": 52,
        "useFilePath": true,
        "color": "#bed7fe"
      },
      {
        "rule": "(.*/*.*\\b[Mm]isc\\b.*)|(.*/*.*\\b[Mm]iscellaneous?\\b.*)",
        "icon": "RaDiceThree",
        "for": "folders",
        "order": 55,
        "useFilePath": true,
        "color": "#ffffff"
      },
      {
        "rule": ".*/?[Vv]acations?.*|.*/?[Tt]rips?.*",
        "icon": "",
        "for": "everything",
        "order": 55,
        "useFilePath": true
      }

The above snippet is only to illustrate what I'm seeing. One would notice that the `"order": ' part of the rules:

  1. is not consecutive in the file
  2. some rules have the same order number.

I don't know if that can be the reason for my problem or not, but I thought to stop by and report my findings.

Thank you for the otherwise great plugin. 🙇‍♂️

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

No branches or pull requests

1 participant