graphlab-fr / cosma

Cosma is a document graph visualization tool. It modelizes interlinked Markdown files and renders them as an interactive network in a web interface.
https://cosma.arthurperret.fr
GNU General Public License v3.0
125 stars 4 forks source link

[Enhancement] Detect `#tags` for customization #40

Open IgnacioHeredia opened 1 year ago

IgnacioHeredia commented 1 year ago

Which part of Cosma is your request about?

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!

infologie commented 1 year ago

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

yanntrividic commented 1 year ago

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

infologie commented 5 months ago

@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:

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.