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

Colorblock in console #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

mruwek
Copy link
Contributor

@mruwek mruwek commented Jul 24, 2016

This fixes (in a bit hacky way) #134

This PR is simply rebase of #126 against master branch. I'm pushing it here to provide a temporary solution and some "food for thougt" about the issue. It probably won't be merged in it's current shape so use at your own risk :)

@codecov-io
Copy link

codecov-io commented Nov 30, 2016

Codecov Report

Merging #135 into master will decrease coverage by 1.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #135      +/-   ##
==========================================
- Coverage   96.86%   95.81%   -1.05%     
==========================================
  Files          51       52       +1     
  Lines        2871     2727     -144     
  Branches      443      430      -13     
==========================================
- Hits         2781     2613     -168     
- Misses         61       86      +25     
+ Partials       29       28       -1
Impacted Files Coverage Δ
topydo/lib/ListFormat.py 100% <ø> (+1%) ⬆️
topydo/lib/Color.py 96.36% <100%> (+0.06%) ⬆️
topydo/lib/ProgressColor.py 100% <100%> (ø) ⬆️
topydo/lib/prettyprinters/Colors.py 95.45% <100%> (+0.71%) ⬆️
topydo/commands/EditCommand.py 80.68% <0%> (-2.28%) ⬇️
topydo/lib/Sorter.py 96.15% <0%> (-1.25%) ⬇️
topydo/commands/ListCommand.py 93.87% <0%> (-0.82%) ⬇️
topydo/lib/Config.py 92.89% <0%> (-0.54%) ⬇️
topydo/lib/TodoParser.py 97.72% <0%> (-0.39%) ⬇️
topydo/commands/PostponeCommand.py 97.61% <0%> (-0.3%) ⬇️
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e276dcd...eaf2b0d. Read the comment docs.

Previously topydo.lib.Color instances were agnostic of their purpose.
Each instance could be used to provide foreground or background color.
From now on this decision should be made at the initialization time by
passing additional boolean argument (True for background, and False for
foreground) to the constructor. Since we use that class mostly for
changing foreground colors, False = foreground is assumed by default
when no such argument is passed.

This changes the way we're using Color.as_ansi() method - it doesn't
accept additional p_background argument now.
ListFormatParser uses now non-printable bell character as a placeholder
for color-block to avoid confusion with normal spaces and conversion to
spaces happens right after applying all the colors by
PrettyPrinterColorFilter. Progress colors are now also calculated by
PrettyPrinterColorFilter and stored in TopydoString along with the other
colors.
@davesteele
Copy link
Contributor

I personally don't do much with column mode. Before diving into this, please let me know if you are interested in pursuing.

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.

None yet

3 participants