seanlowe / obsidian-timelines

Create a timeline view of all notes with the specified combination of tags
https://seanlowe.github.io/obsidian-timelines/
MIT License
39 stars 2 forks source link

[Feature] Override Node Colouring #14

Open Zhur06 opened 9 months ago

Zhur06 commented 9 months ago

About problem

I have some different types of events I need to display on my timeline, as I think, the best way to do it is to colour their nodes

Possible solution

The best UX for me would be replacing current data-class='orange' (as I saw in your code, data-class is useless) to something like data-node-color=orange and data-node-background-color=orangered

Probably it would be perfect if you could display a legend of a tags somewhere in a corner of timeline, but it's not in MVP of this feature

seanlowe commented 9 months ago

Interesting. I like the idea. I've been brainstorming ideas on how to add customization functionality and this is similar to something that I had been planning out. Right now, the majority of additional features are "on pause" until I finish the frontmatter PR that I have in progress (#9).

Just for clarity, data-class is a remnant from the original code that actually does handle the color of the event. In the frontmatter update I've changed this to data-color.

--

To flesh out your idea a little more (so I can have a better understanding):

Would having a flag or something to change the text color for readability (not sure if will change automatically at the moment - haven't tested that one) be useful? Really depends on what colors people would like to regularly use.

Thanks for the suggestion!

Zhur06 commented 9 months ago

As I thought it would be great if it'll be possible to define only one colour (and others would calculate or just choose from existing list) or to define all colours

For example, if I have 'data-node-background-color = #111' then border would be something like #000 and text color would be like #fff