Control which block properties are hidden in view mode

I like that there are some properties that are built-in and don’t clutter the block when you edit them (task timestamps for example)

But since properties are so useful for custom workflows, it would be nice if it was possible to hide more properties - for example properties added by plugins/templates or custom workflows.

Maybe we can have a prefix that causes the properties not to appear? like an underscore?

Love this idea a lot!

1 Like

I don’t want to start a separate thread for this, but I came her to request that we could collapse the block properties, the way one collapses child blocks. Perhaps they could be completely hidden with a symbol that they are there which you could click to expand - or collapse down to just the first property. But when I have more than one it takes a lot of screen space.

7 Likes

Please merge the PR if it looks ok, thanks.

3 Likes

Just merged! Thank you for solving this problem!

Ahh … Now config.edn has another configuration option

 ;; hide specific properties for blocks
 ;; E.g. #{:created-at :updated-at}
 ;; :block-hidden-properties #{}
3 Likes

I also want to add properties to a to-do block so that I can use these properties in queries, but not display them when the block is collapsed.

Can someone please explain what I need to do to hide a specific block property?

  1. Go to Settings and click Edit config.edn
  2. Find these rows @sabre23t mentioned

;; hide specific properties for blocks
;; E.g. #{:created-at :updated-at}
;; :block-hidden-properties #{}

  1. delete the two semi-colons in front of the :block-hidden-properties row – it should change color
  2. enter the properties you want to hide into the curly brackets on this row, preceded by a colon and separated by spaces, as shown in the example in the row above
1 Like

I changed my config.edn as suggested here, and a property I chose stopped being displayed… but it’s gone for good; I can’t see its value even if I click on a block to edit… is it just like it is designed to work, or can I have an option to see it “on demand”?

context: I have a “Task completion” plugin, but my todo lists and queries looked messy with all this “completed” properties… so I excluded them in my config.edn and it worked, but now I can’t look up the date of completion even if I’m curious, or to check if that specific task have it appended (or was done before I installed the plugin).

4 Likes

I agree with agata that it’d be a good idea to also have a second configuration option that only hides the proprieties from view mode, but remain accessible in edit mode. Perhaps something like “block-dot-proprieties”, as @alex0 suggested on this page.

@gombiuda, I’m tagging you since you provided the previous fix so this might be something of your interest?

4 Likes

This would still be useful and nothing in sight so far… :-/

Wondering how to hide ALL properties in the config?

Obviously I can put in all properties but it would be a bit huge.
:block-hidden-properties #{}

Hiding all properties could be useful for mobile version since the screen is small.

Hiding ALL properties is easy with CSS. The approaches in Hide block properties when block is collapsed can be adapted for when it’s not collapsed as well.

3 Likes