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

The calendar report is ignoring rule.precedence.color and rule.color.merge settings #3691

Open
d2718nis opened this issue Nov 20, 2024 · 0 comments
Labels
topic:themes Issues related to color themes or colorized output

Comments

@d2718nis
Copy link
Contributor

d2718nis commented Nov 20, 2024

Current behavior

The calendar report does not respect the rule.precedence.color or rule.color.merge settings as expected. At the same time, both the taskrc (precedence, merge) and task-color (precedence, merge) man pages lack any mention that they do not apply to the calendar report.

Example

In the following example, I set rule.precedence.color=scheduled,due intending that dates with both scheduled and due tasks (e.g., November 22nd) would adopt the color defined for scheduled tasks. However, the color for that date defaults to the due task color instead of prioritizing scheduled.

Additionally, I set rule.color.merge=0 to prevent blending of scheduled and due colors, but the colors are still merged.

screenshot-2024-11-21-01-44-27

Analysis

A quick review of the source code for the calendar report reveals:

  1. Precedence handling appears to be hardcoded, as seen here, and depends on the order of if clauses
  2. The blend() method from libshared is used in several places, disregarding the rule.color.merge setting
@djmitche djmitche added the topic:themes Issues related to color themes or colorized output label Nov 20, 2024
@d2718nis d2718nis changed the title The calendar report is ignoring rule.precedence.color and rc.rule.color.merge settings The calendar report is ignoring rule.precedence.color and rule.color.merge settings Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:themes Issues related to color themes or colorized output
Projects
Status: Backlog
Development

No branches or pull requests

2 participants