konodyuk / obsidian-typing

Programmatic customizations for groups of notes
https://konodyuk.github.io/obsidian-typing/
MIT License
134 stars 8 forks source link

Feature summary, clarifications and documentation #16

Open asdafa3 opened 11 months ago

asdafa3 commented 11 months ago

Hey, first of all I want to say, that you did an amazing piece of work here and I greatly appreciate and awaited this kind of contribution to the obsidian plugins. To me, it seems like a perfect bridge between the casual obsidian workflow and eg. capacities.io's with its object centered approach. I have a few questions though.

  1. Could you give a more comprehensive outline of the already implemented features soon, with possibly minimum examples, like for the already documented features?
  2. I use the latest version as of rn but hiding inline properties does not work using hide_inline_fields = "all" inside styles, am I doing something wrong? I have a base type that adds this style to and all other types inherit that base type.
  3. Is any close intergration with the templater plugin intended? Or asked differently, is there currently a way to use markdown templates with typing somehow? Headers and footers are a nice feature but not really flexible atm
  4. Do you plan on providing more extensive options for automatic formating of note titles like {compact_date} with a customizable, more human readable date format instead?
konodyuk commented 11 months ago
  1. Yes, I am planning to update the docs completely, add examples and start publishing type packages
  2. This is strange, I would appreciate providing a minimal example reproducing this, e.g. a type in typing.otl and a content of a typed note where the fields are not hidden but are configured to be
  3. Yes, I am planning to provide support for some templating engine. In the meanwhile you can use <api.ui.Markdown />, for example:

    type A {
    style {
        header = fn"""
            let var = 1
            let text = `
                # Some markdown text
    
                with ${var} interpolation
            `
            return <api.ui.Markdown text={text} dedent />
        """
    }
    }
  4. Yes, something like prefix = "A-{date:yyyyMMdd}" with configurable format is planned
asdafa3 commented 11 months ago

Thank you for your response

For 2.: Im going to do that those days but currently Im not able to.

For 3.: But this way Im also stuck to the header right, which doesn't work in live preview and also the content in there is not modifiable right?

For 4.: Really looking forward to that

Beyond that, I have a further questions and mentions 😅:

  1. Lists and Tags are not working yet right?
  2. Tags are not equal to tags in obsidian right, but rather an own type that is used in the Typing Plugin or do I get something wrong?
  3. Ive noticed that either on my phone or on my MacBook, Im not able to use obsidian when using this plugin. When I remove the plugin temporarily on one device and move it back to plugins it works on this device but on no other which is really weird 😅
konodyuk commented 11 months ago

Yes, headers/footers are not supported in live preview yet, but will be. Their content is not designed to be modifiable, they are configured type-wide.

When I mentioned integration with templater I meant it as another marginal type, so the header would be dynamic and rendered each time you open the note:

type A {
    style {
        header = templater"""
            << [[<% tp.date.now("YYYY-MM-DD", -1) %>]] | [[<% tp.date.now("YYYY-MM-DD", 1) %>]] >>
        """
    }
}

If you meant something different, e.g. ability to specify the content template to be filled on note creation, I can put it on my roadmap too.

As for the new questions:

  1. Lists and tags do work, but to add an item to list you should press Cmd or Ctrl when submitting it (e.g. if you have List[Choice["one", "two"]], you can type on, then press Cmd+Enter and it will be added to the list). The Tag type works only if you have dataview installed.
  2. Yes, tags are like Choice, but dynamic: they scan which values this field has across the notes of this type and suggests them as options.
  3. Very strange. Can you provide more details such as vault size, type schema, startup time (Settings -> Community plugins -> Debug startup time)? I think this may be related to the way I preload js and otl files, which I hope to optimize later.
asdafa3 commented 11 months ago

Thank you for clarification, I also understood marginal types like that. Although I think dynamic header and footer content would be handy as well, I actually meant a content template that gets inserted when the note is created, as you said, but is modifiable. If you could put that on your roadmap, that would be really great.

1./2. I didnt know that, but I figured it out now, thank you. Ok, I get now what you intend with tags, but is there a way to use them together with obsidian tags with #? That would be great to blend in with the rest of my notes.

  1. Im gonna do that when I have time, but rn it doesnt seem too long, it either works or not. But Im gonna provide more information soon.

I just thought about it and I would have like 2 feature requests / ideas too maybe, but they don't have that much priority, but would still be really nice to have.

Feature requests: