This feature is very important to me.
I loved @BOT_bkcd css solution! Kudos!
This feature is very important to me.
I loved @BOT_bkcd css solution! Kudos!
Maybe using this JavaScript snippet with the Templater plugin to automatically toggle fold properties when opening notes:
<%* function toggleFoldProperties(){app.commands.executeCommandById('editor:toggle-fold-properties')} app.workspace.on('file-open',()=>{setTimeout(toggleFoldProperties,300)}); if(app.workspace.getActiveFile()){toggleFoldProperties()} %>
I am not a developer, This works for me on mobile but it’s not perfect as there’s no method (correct me if I’m wrong) in the Obsidian API to directly check if the properties of a note are folded or unfolded. This ends unfolding the properties when they were already folded when you open any page.
How It Works:Function Definition: toggleFoldProperties runs the command to toggle fold properties.File Open Event: Listens for the file-open event and toggles properties with a delay.Immediate Check: If a file is already open, it toggles properties immediately.Add this to your Templater template to ensure properties are folded/unfolded.
For PC just ended keeping the properties hidden as takes almost a quarter of the available space, even folded. Waiting for a solution since last year.
(+1 to the list of people that created account to request this)
+1 for this feature requset!
I added commands to Note Toolbar to completely hide/unhide and fold/unfold the Properties section.
Closed properties seem to stay maintained if operating within the same tab. Opening a new tab requires the close to be run again.
See the Toggle Properties command.
Give it a try. YMMV!
Thanks you for this css! It works wonderful. ![]()
It would be nice if this was in native, but this is also a solution!
Has anyone created a plugin for this functionality?
4 posts were split to a new topic: Fold / Unfold properties in all files
I’ve upgraded your css to also include editing mode:
/* Voor leesmodus */
.workspace-leaf-content[data-type=markdown] .metadata-container:hover .metadata-content,
.workspace-leaf-content[data-type=markdown] .frontmatter-container:hover .metadata-content {
display: block;
}
.workspace-leaf-content[data-type=markdown] .metadata-container .metadata-content,
.workspace-leaf-content[data-type=markdown] .frontmatter-container .metadata-content {
display: none;
}
/* Voor bewerkmodus */
.cm-s-obsidian .HyperMD-frontmatter:hover,
.cm-s-obsidian .frontmatter-container:hover {
display: block;
}
.cm-s-obsidian .HyperMD-frontmatter,
.cm-s-obsidian .frontmatter-container {
display: none;
}
Thank you all for the valuable contributions. I appreciate learning about toggle-fold-properties, as this issue has been a persistent annoyance. The properties feature compromises the aesthetic appeal of Obsidian, which is one of the reasons for using it over plain markdown editing.
To enhance aesthetics, Obsidian could draw inspiration from the iOS user interface, such as the Notes app, where swiping down on the notes list reveals the search field.
Similarly, in Obsidian, it would be convenient if a note, when first displayed, automatically aligns its body content with the top. Swiping down would then reveal the note’s properties.
Implementing this with CSS might be easy. However, I’m too lazy to learn.
The workarounds shared here are pretty clever, but honestly, this should just be a built-in feature. Having the option to collapse fold properties across all notes by default would make things so much smoother. It’s a simple enhancement that could save us a lot of hassle in our daily use.
The plugin “Fold Properties” by itsonlyjames, which I found in the Obsidian Community Plugins, solves this for me. Really, give it a try!
thanks so much Steve!
this, ++++1
This could be a very quick win to implement. As an avid properties user (I have dozens of them sometimes) it’d be great to be able to fold them by default.
I’m thinking that could be a nice idea for my first Obsidian plugin. I’m sure it’s easily feasible.
same here, I have a lot of properties, hoping they will implement this feature, seems to resonate and evidence that people want it
Bump. Although the workarounds are great, having this functionality to auto-collapse the properties built in would be really useful, as already mentioned, especially on mobile when there is already a limited screen space.
Upvote from me. And if it gets implemented, please have them in separated sync file for Obsidian Sync, so that I can show properties on laptop but collapse them on mobile.
I just installed this CSS as a snippet, and it does exactly what I wanted. It keeps the properties out of the way but doesn’t outright disable them in case I need to reference them.
This is one of the things I like so much about Obsidian. If something isn’t quite to your liking, there’s a good chance someone has already written a plugin or snippet to tweak it.
Just added the custom CSS myself, great work around.
Would still prefer a native option in Obsidian for this, I’m sure others also do.
BUMP
I’d love to use this plugin: auto folds the properties by default in source view upon opening a note: Fold Properties By Default by @tbergeron (GitHub page)