I’m sharing some thoughts as a software engineer as well on how this could potentially be implemented.
Just thinking out loud and don’t want to impact priorities as the devs have been AWESOME with shipping fast and building a great product, but wanted to be helpful rather than just begging.
The main benefit of Block References is knowledge re-use and composition.
The main benefit of Block Transclusion is maintaining a single source of truth for actively referenced blocks, you change one place, and the original gets updated as well.
Blocks are Lego Blocks of Atomic Thought to build regional brains of knowledge.
Although Markdown does not support native blocks, it should be possible locally using the natural structure of paragraphs.
You can think of each paragraph as a chunk of change, like in git, or how headers have a collapsible scope currently in obsidian. Each paragraph could then have its own unique hash that has an id, location(positional location within the document), parent(id of the page reference it is associated with), primary (is this the original pointer or a reference) and reference pointer(pointer to line location for editing transcluded source) stored and maintained in .obsidian runtime config.
Then they can be referenced with a GUI autocomplete similar to page references that index based on the words in the first sentence and wrapped in a reference, which has a key of the block reference hash and a body of the paragraph content.
The primary location of the block reference could then have a total count, which is the aggregate of the number of times the block has been referenced in other markdown files using the hash.
Thinking in paragraphs as blocks also enable moving chunks of paragraphs with navigational keys.
This is a constructive suggestion for the discussion - well done !!
Let’s say the pane on the right is complete, nothing to be added, nothing to be deleted.
There is a a green preview button on the top right (on live sheet on the linked page): what happens when that is clicked on, does it render as a normal page? Are the blocks rendered as paragraphs?
Hiding h6 (your example) only works in Preview mode in the note (note 1) itself where there is
###### If you dislike folding If you dislike folding for whatever reason, it can be turned off in Settings. ######
But, if you want to link to that header from another note (note 2), then that header ###### If you dislike folding is shown as [[note 1 title#If you dislike folding]]
Thanks for bringing the question over here @Klass. There may be several reasons that others could contribute. I may be missing an important part of your perspective (and I feel like that may be the case), my apologies if that’s true. But I’ll at least try to offer one reason.
It brings Obsidian closer to a Roam style utility, based on the current section referencing that the Obsidian developers have given us so far.
In roam, there’s a hidden UID for each block. Obsidian doesn’t have that, which is one of the reason for this whole thread. Creating an H6 that’s hidden is essentially letting us add a hidden UID to the parts of our content we want to embed elsewhere.
I understand the thinking behind hiding an h6 header, I use it myself in 1 or 2 notes. So, I see the header in Edit mode, I don’t in Preview. I link to that header from somewhere within that note.
But if I would want to link to it from another note, that other note does show that header, even if that other note is in Preview.
So, are we talking about linking within the same note only?
BTW, my pseudonym is KLAAS, nothing to do with “class”. @Klass doesn’t work.
For my uses, I’m definitely not talking about referencing only within the same note. I plan to use source content from one page in many different locations. I plan to transclude single lines, whole paragraphs, and sections with richer content like Latex and tables. And for clarity, we’re not talking about linking (which I associate with external, internal, and back links). We’re focusing on transclusion (which many are calling embeds in these discussions)
That’s strange that one note doesn’t show the header in the embed and another note does show the header in the embed. It shouldn’t be like that since the CSS should be consistent for all pages.
OK, now we’re talking. I initially assumed it was about transclusions, but since that has become my big love I thought I might have got into a rut and did not want to talk x-purposes.
Anyway, what I see is that when I have in note 1 ###### header text Some text. ######
and I transclude that in note 2 by using ![[note 2#header text]] then I do see that “header text” in note 2, it is not hidden. Hence my confusion.
It’s not implemented in Obsidian. We can just ‘hack’ any of the headings to try it out if you want. You have to change your CSS a little. And doing the change on H6 makes the most sense because it’s used the least often.
You have to find .markdown-preview-view h6 in your CSS and change whatever is in the brackets { } to
Further to my last note, I added the .markdown-preview-view bit, and then indeed the header does not show in the transclusion. Sorry for the mix-up, and thanks for a handy tip.
@Théry in the Obsidian CSS discord offered a little more refinement. I’m just copying it here because this is where people will find it. (I haven’t tested it yet)
For basic hiding of H6 in Preview:
.markdown-preview-view h6
{
display: none;
}
Refining margins with the embedded text:
h6 + p { margin-top: 0; }
h6 + ul { margin-top: 0; }
Using “quicker”, a third-party software, is close to the block reference function, which is not so convenient to use, but the effect is already good. Two-way link, synchronous modification can be as small as one letter.