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

Color the whole column width #354

Open
MaciejWieczor opened this issue Apr 28, 2024 · 5 comments
Open

Color the whole column width #354

MaciejWieczor opened this issue Apr 28, 2024 · 5 comments

Comments

@MaciejWieczor
Copy link

Hi, I've been using vit for a while and wanted to contribute something. I wanted to implement an optional function to apply a given color to the whole column width. (I guess just color both the text and the padding?)

I've been looking at the code for a few hours but I'm not sure where to even start.

Could someone point me in vaguely the right direction?

@thehunmonkgroup
Copy link
Member

Are you trying to accomplish the same kind of coloring strategy that Taskwarrior uses?

@MaciejWieczor
Copy link
Author

Taskwarrior colors whole rows
I was thinking about still coloring only the element in a column. Just make the colored background as wide as the column (since right now it's as wide as the text string)

An option for the Taskwarrior strategy of row coloring might also be fun to implement. But I understand that urwid is not very compatible with that?

@thehunmonkgroup
Copy link
Member

One of the foundational UI decisions for VIT was a re-thinking of how colors are used.

Have you read https://github.com/vit-project/vit/blob/2.x/COLOR.md#vit-task-coloring ?

I'd be generally resistant to implementing the Taskwarrior coloring scheme for the reasons given in that writeup.

It's possible that a flag could be added to introduce this feature, but I suspect it would make the code harder to maintain, so any PR for this kind of feature would have to be carefully considered.

If you're generally wanting to contribute to VIT, there are a couple of stalled PRs that could use some attention:

#292
#290

@MaciejWieczor
Copy link
Author

I've read it and I agree with that design, to drop the row based coloring in favor of column based. And if you're saying it would make the code harder to maintain then maybe indeed it's not worth the trouble to try that.

I understand #292 needs some debugging? I guess I should start a new PR if there are any changes to be made?

And is #290 just stuck on the naming of the new action or do you see more to be done there?

@thehunmonkgroup
Copy link
Member

#292 needs a test case so I can see the behavior work correctly, and possibly debug why it's not working in my setup.

#290 Needs to decide on a default keybinding (if any), and a good name for the action token -- I think ACTION_TASK_MODIFY_CURRENTLY_FILTERED_TASKS or ACTION_TASK_MODIFY_BY_CURRENTLY_FILTERED_TASKS or ACTION_TASK_MODIFY_BY_FILTERED_TASKS, probably the last one.

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

No branches or pull requests

2 participants