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

Hide .edtz files in styles.css #10

Open
antoniotejada opened this issue Sep 12, 2023 · 6 comments
Open

Hide .edtz files in styles.css #10

antoniotejada opened this issue Sep 12, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@antoniotejada
Copy link
Owner

          This `CSS` snippet hides the `edtz` files from the file explorer.
.tree-item.nav-file:has(div[data-path$=edtz]) {
  display: none;
}

Obsidian v1.4.9

Originally posted by @gapmiss in #2 (comment)

@antoniotejada antoniotejada added the enhancement New feature or request label Sep 12, 2023
@gapmiss
Copy link

gapmiss commented Sep 20, 2023

Was having problems with the above CSS rule and have since changed it to:

.tree-item.nav-file > div[data-path$=edtz] {
  display: none;
}

Still needs more testing to make sure the CSS specificity does not effect other menu items.

@ricardonevesmusic
Copy link

ricardonevesmusic commented Sep 25, 2023

Yes, do this.

We really need it (it's really annoying to find and use such files by mistake when looking for a template).

Either a specific folder to store the saves/edits is needed or we need to hide the files by starting the files by ".filename";

Whatever works best.

Then just release an updated version of the plugin.

If the provided code is working, I might give it a try to see if it hides it in Obsidian.


UPDATE:

By the way, I've tested this (with or without this it doesn't seem to make much of a difference in the Obsidian file explorer, which doesn't show such files by default, but when trying to insert a template via Templater plugin, the edit/history files appear on the template list and you might insert the wrong template by accident).

Yeah, that's it.

It just needs some tiny little improvements to be perfect.

@ricardonevesmusic
Copy link

I would suggest creating a hidden folder ".edit-history" with hidden save/history files.

Let's say you have the folder "Templates":

  • Inside that folder (and any other subsequent folder), an ".edit-history" hidden folder would be created and hidden save/history files would be stored there (much like that option Obsidian has for setting up the default "attachments" folder: "In subfolder under current folder").

This would ensure better file/folder organization inside Obsidian, but also in file explorer outside of Obsidian.

I think having this possibility of choosing a hidden folder location much the same way you can do for attachments folder inside Obsidian, would enhance and make this plugin a lot better.

Yeah, hopefully just a good suggestion of improvement (eventually this could be a game-changer for file organization inside and outside Obsidian).

If you take this suggestion and apply it, I think the plugin will improve a lot.

Hope this helps.

Thank you.

@antoniotejada
Copy link
Owner Author

@ricardonevesmusic

with or without this it doesn't seem to make much of a difference in the Obsidian file explorer, which doesn't show such files by default

Right, this css change would only be for useful for people who have "detect all file extensions" enabled. See #2 for full discussion on hiding .edtz files and why moving the edit history files to a hidden folder is a bad idea.

@antoniotejada
Copy link
Owner Author

Also see discussion in https://forum.obsidian.md/t/show-hide-file-types-to-be-shown-in-file-explorer/764/16 for CSS alternatives

@ricardonevesmusic
Copy link

@ricardonevesmusic

with or without this it doesn't seem to make much of a difference in the Obsidian file explorer, which doesn't show such files by default

Right, this css change would only be for useful for people who have "detect all file extensions" enabled. See #2 for full discussion on hiding .edtz files and why moving the edit history files to a hidden folder is a bad idea.

Also see discussion in https://forum.obsidian.md/t/show-hide-file-types-to-be-shown-in-file-explorer/764/16 for CSS alternatives

I've tried/tested the plugin.

Changed the saving path in the "data.json" file and yes, if the folder is hidden, the plugin won't find any saves/edit history, because it's designed in a specific way.

Also tried using the path "edit-history" or "Archive/edit-history" as the saving path and noticed it will replicate the vault structure.

Right now, I've decided to keep using the plugin default settings and prefer for the saving/edtz files to be saved directly into the root folders of where the documents are.

If it's possible to prevent the edtz files from being detected by the Templater plugin awesome, if not, I'll eventually get used to it or find another way.

Hope you have a nice weekend.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants