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

colors.description in Google calendar changes colour of time in the event's title #638

Closed
indradhanush opened this issue Sep 16, 2019 · 1 comment · Fixed by #640
Closed
Labels
🐛 bug "Houston, we've had a problem."

Comments

@indradhanush
Copy link
Contributor

What's broken?

colors.description in Google calendar changes colour of time in the event's title.

For example, with the following configuration, where title is orange and description is white:

    gcal_0:
      type: gcal
      colors:
        title: "orange"
        description: "white"
        highlights:
        - ['Engineering team daily', 'lightblue']

s_2019-09-16_170726

And when I change the description to grey, I have:

s_2019-09-16_170700

There could be two possible approaches to fix this:

  1. Leave the time of the event to a neutral color independent of title and description.
  2. Set the color of time of the event to the same as that of the title.

Additionally, if we choose to go with 1. above, maybe we can add a colors.event_time to allow for customizing the time of the event, independent of this issue.

I'd be happy to dig into the code and try fixing this if this sounds reasonable and we can decide what approach would be best. 🙂

@senorprogrammer
Copy link
Collaborator

I think this is a left-over result. It used to be that "time" + ''title" = "description". But then "title" got the "highlights" capability and "time" got left behind. As such, colors.description only affects "time" now, I think.

I personally like "time" being a consistent colour: one colour for events that haven't happened yet, and another for events in the past (as is currently done for "time" + "title"). Having the future events colour be customizable sounds good.

I like your eventTime idea. That could be added in a backward-compatible manner by doing something like this in gcal/settings.go:57:

ymlConfig.UString("colors.eventTime", ymlConfig.UString("colors.description", "white"))

If you want to take a shot at making that work, that would be great. And if you have a better approach, feel free to go with that.

@senorprogrammer senorprogrammer added the 🐛 bug "Houston, we've had a problem." label Sep 17, 2019
indradhanush added a commit to indradhanush/wtf that referenced this issue Sep 17, 2019
Color of description should not change the color of event time. This
commit uses the independent setting color.eventTime instead. This
defaults to "white" and is consistent with the current behaviour when
a value for colors.description is not set.

Fixes wtfutil#638
indradhanush added a commit to indradhanush/wtf that referenced this issue Sep 17, 2019
Color of description should not change the color of event time. This
commit uses the independent setting color.eventTime instead. This
defaults to "white" and is consistent with the current behaviour when
a value for colors.description is not set.

Fixes wtfutil#638
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug "Houston, we've had a problem."
Development

Successfully merging a pull request may close this issue.

2 participants