Skip to content

feat(ui): dynamic urgency color and per-cell report styling - #780

Draft
dianila68 wants to merge 1 commit into
kdheepak:mainfrom
dianila68:feat/urgency-cell-color
Draft

feat(ui): dynamic urgency color and per-cell report styling#780
dianila68 wants to merge 1 commit into
kdheepak:mainfrom
dianila68:feat/urgency-cell-color

Conversation

@dianila68

Copy link
Copy Markdown

What

Adds cell-level style overrides on top of the existing row-wide taskwarrior color rules:

  • table: new Row::CellStyledData variant carrying optional per-cell styles, patched over the row style (and over the highlight style when the row is selected), so an override that only sets a foreground keeps the row background.
  • report_style (new module): the urgency column is colored on a green → yellow → red gradient, scaled proportionally to the most urgent visible task and saturating at a configurable cap so a single outlier cannot compress the scale. Columns adjacent to the description can get a distinct tint.
  • task_report: simplify_table now records visible_columns, so display indices can be mapped back to taskwarrior column names after empty columns are dropped.

Configuration

uda.taskwarrior-tui.urgency.dynamic-color=true   # default: true
uda.taskwarrior-tui.urgency.color-cap=15         # default: 15
uda.taskwarrior-tui.style.report.near-description=   # default: empty (no tint)

Notes

  • Related to the per-column coloring discussion in the issue tracker (task color based on column value).
  • Unit tests included for the gradient, cap behavior and neighbor tinting.
  • cargo fmt, cargo clippy -- -D warnings clean.

🤖 Generated with Claude Code

Adds cell-level style overrides on top of row-wide taskwarrior color rules:

- table: new Row::CellStyledData variant carrying optional per-cell styles,
  patched over the row style (and highlight style when selected)
- report_style: urgency column colored on a green->yellow->red gradient,
  scaled proportionally to the most urgent visible task and saturating at a
  configurable cap so a single outlier cannot compress the scale
- columns adjacent to the description can get a distinct tint
- task_report: simplify_table now records visible_columns so display indices
  map back to taskwarrior column names

New configuration (all optional):

    uda.taskwarrior-tui.urgency.dynamic-color=true
    uda.taskwarrior-tui.urgency.color-cap=15
    uda.taskwarrior-tui.style.report.near-description=

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant