obsidian-typing icon indicating copy to clipboard operation
obsidian-typing copied to clipboard

Headers and footers (marginals) are broken

Open TerrorJacktyl opened this issue 1 year ago • 0 comments

First, thank you!

First off, I wanted to say that I'm so thankful you made this plugin! I have done a lot of research into the different approaches to Notion "databases" in Obsidian (aka template notes with suggestions to capture a new note and queried views for inspecting and modifying notes of a particular type), and I think your typed language approach is the best possible approach. Your typed approach in this plugin allows the creation of a new note (ie "new book/tv/movie recommendation") with hints and a friendly, auto-generated wizard modal. I hope that in the future, we might extend Dataview's query language such that DQL codeblocks can provide hints if they are querying over a set of typed notes. I believe that typing notes with metadata is the secret sauce to making an extensible system that can supply amazing views (calendar, kanban, etc) and tame Zettelkasten-like note systems.

Praise aside though, I do have a bug to share with you!

Details

Obsidian version: 1.6.5 obsidian-typing version: 0.3.7 OS: MacOS Ventura 13.6.3

Problem

The following template does not work with headers and footers. More specifically, after writing the following type and using Typing: New > Media, the header content does not appear in the resulting note.

type Media {
    folder = "media"

    style {
        // Functions don't work
        // header = fn"""
        //    return <div>I am a header.</div>
        // """

        // Expressions don't work
        // header = expr"""<h1>I am a header.</h1>"""

        // Markdown doesn't work
        header = markdown"""
            ```
            # Fill out after consuming
            Rating :: 1-5
            Date finished :: date
            ```
        """
    }
    
    fields {
        Medium: Choice["Article", "Video", "Book", "TV", "Movie", "Documentary"]
        Desire: Number[min=1, max=3]
        "Recommended by": Tag[dynamic = true]
        Consumed: Boolean = false
    }
}

TerrorJacktyl avatar Jun 26 '24 13:06 TerrorJacktyl