FlorianWoelki / obsidian-iconize

Simply add icons to anything you want in Obsidian.
https://florianwoelki.github.io/obsidian-iconize/
MIT License
836 stars 54 forks source link

Inherit Icon no longer applying to subfolder and its contents #283

Closed i-report-bugs closed 10 months ago

i-report-bugs commented 10 months ago

Describe the bug When I updated Icon Folder to Obsidian Iconize, the subfolders stopped having the inherit icon. I have a lot of subfolders and it would really be a pain to maintain all of them individually if they don't inherit the icon properly.

To Reproduce Steps to reproduce the behavior:

  1. Right click a folder
  2. Select Inherit Icon and set an icon
  3. Observe how only the files get affected
  4. Despair when you realize all the subfolders and their subfolders did not inherit anything and you'd have to manually set them all

Expected behavior I expect the old behavior where Inherit Icon applies to subfolders too and its own subfolders etc

Additional context If this is something that is intentionally done for Iconize, please just let me downgrade to the older Icon Folder.

FlorianWoelki commented 10 months ago

This seems to be a duplicate of #205.

i-report-bugs commented 10 months ago

@FlorianWoelki but it's already a thing that exists? It isn't a feature request, the behavior I'm describing works properly on version 2.1.2, I did some testing while waiting for a response and found out that the immediate version released after that broke it

FlorianWoelki commented 10 months ago

@FlorianWoelki but it's already a thing that exists? It isn't a feature request, the behavior I'm describing works properly on version 2.1.2, I did some testing while waiting for a response and found out that the immediate version released after that broke it

Yes I did some explicit changes to the logic of inheritance. So it's sort of not a bug but a feature :D However, it seems like that it is confusing.

i-report-bugs commented 10 months ago

@FlorianWoelki So it's sort of not a bug but a feature

Oof, is there any chance of having that behavior back and just have a toggle in the extension setting to specifically re-enable that functionality? That way the default behavior is still what you intended but there's a path forward for people like me who want folders to inherit the icon

FlorianWoelki commented 10 months ago

Sure yeah. There is the way of custom rules. You can enable an option for custom rules which respects the path instead of just the name of e.g., a file which is exactly what you want. I was even thinking about deprecating the inheritance functionality because by now (if I am not mistaken), you can have the same functionality of inheritance with custom rules.

i-report-bugs commented 10 months ago

@FlorianWoelki Sure yeah. There is the way of custom rules. You can enable an option for custom rules which respects the path instead of just the name of e.g., a file which is exactly what you want. I was even thinking about deprecating the inheritance functionality because by now (if I am not mistaken), you can have the same functionality of inheritance with custom rules.

How do I make a rule that makes it so all folders and files under a main folder (e.g. General) will inherit the parent's icon?

I tried General/.* but it does not work.

I enabled the "Whether to apply the icon to all files/folders that match the file path." But when I restart Obsidian the option keeps turning off on its own. :/

FlorianWoelki commented 10 months ago

Your rule worked fine for me. Did you use an icon or emoji? I've recently pushed a fix for updating custom rules with emojis, maybe this was the issue?

i-report-bugs commented 10 months ago

@FlorianWoelki I opened a proper bug report for it here: https://github.com/FlorianWoelki/obsidian-iconize/issues/298