-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Make testing more robust on wide term size #114
Conversation
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
==========================================
+ Coverage 94.12% 95.01% +0.89%
==========================================
Files 33 33
Lines 1905 1907 +2
==========================================
+ Hits 1793 1812 +19
+ Misses 112 95 -17
Continue to review full report at Codecov.
|
Hey, Finally had time to look into this. It looks good! Also, I think you've seen it but look at UnicodePlots and Term working together! https://twitter.com/mdcatchen/status/1537915624575209475?s=20&t=1Zl9bveIZlUyS7OF4FiJDQ |
I was reworking the grid slightly to accept a |
I have a question regarding the colors used in E.g. using a Also where did you get |
Hey, The colors lists for 8/16 bits colors are fairly standard: wikipedia, but I got the ones used here from rich: https://github.com/Textualize/rich/blob/master/rich/color.py
In part to have fewer dependencies for packages that seem to do a lot more. In part because functions like: Line 135 in 72f1d23
would still need to be there (e.g. to deal with background colors). I'm guessing the main advantage would be the hex -> rgb conversion? But that's just a few lines I don't think it warrants having an additional dependency.
It doesn't because the colors in |
FedeClaudi/MyterialColors.jl#7 I'm confused about how this helps? You've improved how the codes are defined and removed some exported colors, but I don't see why `style="red_darker" would work after that? |
I guess we're talking about 8-bit colors and 24-bit colors (true color, 1 byte = 8 bits per channel, for
I see.
Thanks.
No, they are still exported using
It's hidden in this PR: https://github.com/FedeClaudi/Term.jl/pull/114/files#diff-b29208680d97c8a77bc9060b3377d8d0ee4180f2a48bbe1a8210292504128a1cR146. |
I see, got it thanks. Good addition with directly parsing the MyterialColors colors. I don't think users would take advantage of this (I suspect they'll use their own favourite colors/names), but it can be convenient internally so that we don't have to have variables holding the color names. |
I can remove that, and use more standard color names.
I think copying this table is not a good idea: I doubt anyone will use Did you consider using
Better use a |
@FedeClaudi, let's merge this PR when green, and discuss colors in another PR, so that it doesn't block #115. |
Okay. I didn't look into |
For reference, I did the transition The |
it should be the same colors listed in Term? Just as RGB instead of the ANSI code for the named color. |
It seems the names differ. Also, you loose information when using ansi color codes (8 bit) over true You can merge this PR now and I'll open another one. |
Okay, if you think that it;s worth it we can look into adding Crayons. |
Well at least it unifies a bit It also depends if you are ready to drop That being said, it's going to be a mess, and breaking. But I can do that now before |
I'll be honest, I think what you're saying makes a lot of sense, and it would be great to have. |
I started something in https://github.com/t-bltg/Term.jl/tree/cols, but it requires a lot more thinking to support What I really like about
I don't know if we can integrate this in |
I'm not sure either! I'd have to look into If there's an easy way to use it to go from strings to ANSI codes it should be fine. The |
testpanel
andtesttree
function to macros, for better stacktrace when erroring;truncate
tostr_trunc
(since it shadows a builtin function, not a good idea);(w, h)
in tests;Fixes #112.
I've changed the
"."^500
to"°"^500
instead in the panel tests because it initially got me confused with the added trailing dots...
when truncating the panel content.@FedeClaudi, good to merge when green.