Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Detect #tags for customization #40

Open
1 of 6 tasks
IgnacioHeredia opened this issue May 22, 2023 · 3 comments
Open
1 of 6 tasks

[Enhancement] Detect #tags for customization #40

IgnacioHeredia opened this issue May 22, 2023 · 3 comments
Labels
enhancement Feature requests

Comments

@IgnacioHeredia
Copy link

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!

@IgnacioHeredia IgnacioHeredia added the enhancement Feature requests label May 22, 2023
@infologie
Copy link
Contributor

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

@yanntrividic
Copy link
Contributor

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

@infologie
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests
Projects
None yet
Development

No branches or pull requests

3 participants