Oliver-Akins / file-hider

A plugin for https://obsidian.md that allows hiding specific files and folders from the file explorer.
MIT License
60 stars 12 forks source link

possible to hide the files within the folder too, so that these files appear within the search panel, tag panel, etc.? #17

Closed ghweili closed 1 year ago

ghweili commented 1 year ago

when I have to handle notes on different topics within the same vault, many folders and tags will be created, making the tag panel overwhelmingly crowded. I'm thinking if there is any way to make the tag panel (search pane) not showing tags from specific folders, e.g., with the aid of the current plugin?

Oliver-Akins commented 1 year ago

Interesting suggestion, I hadn't considered anything with the search results before, but I'll think about it and see whether it falls within the scope of the plugin and how feasible it is to implement.

ghweili commented 1 year ago

I'm very glad to hear that, and would appreciate your effort. For my case, the biggest burden of handling notes on different topics in the same vault is that, when we do search or look at the tag panel, etc., the tags/files related to all the notes will pop up, making it difficult to handle. I could consider using individual vaults for different topics, but if one wants to modify the settings of all the vault (e.g., to modify the .obsidian folder ), one has to do the change for each individual vault. Moreover, one can't create links between files from different vaults.

The best way to handle this, in my opinion, is to create a plugin, which can create different "views" of the same vault, for each view, one can decide which folders and files are visible or searchable in different functionalities, such as the folder pane, the tag pane, etc. The user experience will be improved even if only part of the functions are implemented.

Alternatively, one could consider enhancing the tag pane or search pane so that they offer options to the users to choose whether the tags/searches should apply to the whole vault or to a specific folder. This could also work concerning the behavior I requested, though I believe that the "view" approach will improve the overall performance of obsidian in terms of many aspects, in one shot.

Oliver-Akins commented 1 year ago

Yeah, I have some ideas brewing on how to implement this functionality, and am going to work on collecting some more info to see if it's feasible then writing up a proper feature specification before beginning to implement it.

I recently created a new discussion (#19) about how people would prefer to have the plugin implemented, since right now it's design goal was to utilize what was already in Obsidian instead of adding new views, though it's currently seeming like using a new view will be the best way to go about adding all of the new features that people are wanting, so I want to gauge how people feel about a separate view for the plugin.

In terms of the actual search results and/or customizing that side of things, I can't say how far I'll take it at the moment since it heavily depends on the result of the poll and what sort of HTML Obsidian uses for the results.

ghweili commented 1 year ago

I wasn't talking about adding an extra Custom File Explorer; Basically what I'm requesting is similar to the plugin managing the "workspace" of obsidian, namely, a plugin capable of offering several options created by the user; once the user choose one of the options, the folder menu on the LHS will hide a specific set of files, specified by the users; moreover, the user can specify whether he wants the hidden files to be searchable or to be indexed in the tag pane. This is what I meant by "views".

Adding a separate Custom File Explorer could also be an option, but I'm not sure what you are planning to do would be beneficial to providing a better experience in terms of searching files and looking at the tag menus when one has to handle many notes on different topics. This is what I believe to be the most important application of the feature I required, whether implemented with the default explorer or Custome File Explorer. If this is possible, one can indeed handle notes on different topics and create a lot of tags in the same vault.

Oliver-Akins commented 1 year ago

Ah, gotchya. Currently, I'm gonna have to say that offering multiple sets of hidden files (what you're referring to as "views") isn't really within the scope of this plugin, however hiding results from the search I can see fitting within the plugin's scope and will consider adding based on how feasible it is.

Oliver-Akins commented 1 year ago

Upon further investigation into this, there is a setting for this built in to Obsidian from what I can tell.

Settings > Files & Links > Excluded Files

This should do what you're wanting, because this is in Obsidian by default I will not be implementing search result hiding.

ghweili commented 1 year ago

this looks like a promising way, which can improve the experience when using search pane/graphics-view pane of a vault including several different topics, though it doesn't affect the tag pane according to its description.

Besides, it would be better if one can be allowed to specify several different rules, from which one can choose, each corresponding to hiding a specific set of files and folders in the search/graphics-view/tag pane. Not sure if this can be made possible in the future.

ghweili commented 1 year ago

it would also be great if one can set a list of rules, each rule triggers hiding all the folders that meet a specific pattern, such as those folders that include the string "research" or "life" or "software", etc.

Oliver-Akins commented 1 year ago

In terms of the file explorer, that will be done through #15, because RegEx is the easiest and most powerful way to do that sort of matching.