graphlab-fr/cosma

[Enhancement] Detect `#tags` for customization

Opened this issue · 3 comments

Which part of Cosma is your request about?

  • GUI version (Electron-based app)
  • CLI version (command-line tool)
  • cosmograph (records & cosmoscope creation)
  • cosmoscope (exported graph & records)
  • documentation
  • other

Describe your request:

A minor enhancement for the future.
It would be nice to detect tags in the text (like Zettlr does), so that they could be formatted and rendered nicely.

Cosma current behaviour

image

#toread tag is treated as normal text.

Zettlr behaviour

Zettlr detects the tag and exposes it via the .cm-zkn-tag CSS class. This allows to customize the rendering:

body.dark #editor .CodeMirror .cm-zkn-tag {
   background-color: rgba(275,171,171, 1);
   color: rgba(138,0,0, 1);
   padding: 2px;
   border-radius:5px;
}

image

In addition, to .cm-zkn-tag, Zettlr also generates additional classes for each tag (eg. .cm-zkn-tag-toread) so that they can be customized separately.

image

Anyway, this is not a priority, just thought it could a nice addition. Thanks!

Thanks for the suggestion @IgnacioHeredia! I'm adding it to our list. I will ping you here if we work on it.

I second this, it would be great to have this feature!

@IgnacioHeredia @yanntrividic I'm revisiting this now that we're back into a development cycle. I suggest that we re-frame the issue as two things:

  • Support #tags in the body, in addition to the tags/keywords metadata in the YAML header.
  • Add the ability to customize tags visually through custom CSS.

I'm presenting things this way, because I don't want to split tag features depending on the way they're written. Ideally all tags should open the same set of features (existing features like filtering the display, and new features like customizing tags visually).

I'll discuss this with @Myllaume and will keep you posted here.