kelszo / obsidian-file-explorer-plus

A plugin for https://obsidian.md, which enables the ability to hide and pin specific files and folders in the file explorer by applying custom filters.
GNU Affero General Public License v3.0
57 stars 3 forks source link

Add "Hide path" option with new Path filter type #24

Open datenwurm opened 1 month ago

datenwurm commented 1 month ago

What would you like to be added?

  1. Introduce a new filter type called "Path" in addition to the existing filter types.
  2. Add a new context menu entry "Hide path" in the file explorer pane.
  3. Implement the Path filter to match the exact path.

Why is this needed?

Currently, the "Hide folder" option applies a folder filter that can match folders with the same name at different levels in the file hierarchy. This behavior can lead to unintended hiding of folders in other parts of the vault.

A dedicated "Hide path" option would provide users with more precise control over which folders and files are hidden. It would ensure that only the specific selected path and its contents are hidden, without affecting similarly named folders elsewhere in the vault. This aligns better with user expectations when interacting with the file explorer interface, where hiding a folder typically means hiding this specific folder path.

kelszo commented 1 month ago

This should already be a feature by selecting the filter type "strict" and then writing the path such as "notes/file to hide". And you should already be able to hide a file by right clicking the file in the explorer pane, this will add a strict filter like the one above. Is this what you meant?

image

image

datenwurm commented 1 month ago

Hi @kelszo, your solution unfortunately does not apply for root-folders. If you hide a root folder, both, the selected folder and any other folder with the same name is being hidden.