-
Notifications
You must be signed in to change notification settings - Fork 230
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
Additional Theme Features #925
Conversation
Maybe background should say "background - color (shown as foreground here)" or something to that affect? |
Maybe, but it really seems we're overcomplicating it. I mean, the background color itself (the color representation) is pretty clearly visible as the background of the whole screen. Our only quandary is how to display the textual representation of the color. We've gone through all three possibilities, I believe:
After looking at the inverted form for a day, I'm thinking that the second was the most clear, and really didn't need explanation since "background" is such an obvious concept. I can add "explanation" text, but I'd honestly rather not, as (a) it's unwieldy no matter how we word it, (b) the "special-casing" then extends to the text itself in addition to the foreground/background colors. Mind if I go back to scheme 2 and punt on explanation? I think users will understand ;-) Edit: Also a possibility - Special-case it so that we have something like |
Also about to put in a change on For types without a corresponding shape, I'll pick something and we'll see how it looks. |
Just pick one. I'll go with your recommendation. |
ok. |
one last thing. have you checked to make sure that is the current complete list of shapes and data types? I think there may be some shapes missing. |
here's the flat shapes that are missing
|
Ah, nope - Those were all added and yet the themes never updated. That's not really a bug in the preview, but in Dang - Gotta pick colors for those now ... Someone needs to manually update the existing "custom" themes, too. |
here's a list for the types that are missing glob i'm not sure if it works if these are added or not. it may also be a good idea to put the types in alphabetical order except for the ones in the 3rd column. the 3rd columns ones should also probably be singular instead of plural. sorry to nit-pick so much. |
Yeah, thought about that (as a future feature) - Would be best/nice if they were defined in Edit: |
Sure, no worries at all. We can land this when you're ready and keep working on it. Just ping me when you're ready. |
Is there really not a |
I'm not exactly sure how it's styled. It must be in the parsing or there's some ad-hoc thing like |
Additional changes pushed to
|
Note: Still not ready to land even if you are okay with these updates. Still need to push the changes to the themes themselves (update with new |
Oh, and I keep forgetting to cc @amtoine since you've done so much on the themes as well. |
marking this as DRAFT as per the PR description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the theme preview is more @fdncred 's territory, but the rest looks fine to me, thanks @NotTheDr01ds for thinking about pinging me 🙏
A couple of more changes coming in the latest (not yet pushed). A sampling of some light and dark themes below: If you're good with this, I can push the updated themes and screenshots. Note: Custom themes have not yet been modified to include the missing types and shapes. |
Looks great. Love the multi-color types. Nice work on all this! |
Something important to note that I hadn't yet - I chose an underline attribute for Also:
Maybe I'm missing something, but I don't see any style applied when I'm on matching brackets in the REPL. |
matching brackets are supposed to be highlighted as you're typing. maybe it's broken? |
Agreed |
Should be ready to land. New screenshot method using asciinema, agg (converts asciinema to animated gif), and ffmpeg (to get a single frame from the animated gif). Big advantage is that you don't have to keep focus on the terminal while it's running - It can generate everything in the background. |
let's go! |
Changes to
make.nu
:int
andfloat
values to be distinct. In most themes, the colors should be complementary.bool: false
andhints
colors - They were hardcoded todark_grey
and wouldn't show up on some themes. Now uses a theme color that should correspond to a theme-appropriate grey in most cases.3024
theme to3024r
since module names can't be anint
Changes to
theme preview small
:Result is a much more compact, but also more readable, table.
Comparison:
Before
After
Changes to
preview_generate_screenshots.nu
:Additional Notes:
Some Lemnos themes use color values that are the same (or nearly the same) as the background in places. These are "broken" themes and always have been as some elements will simply not be visible.
There's a longstanding (I believe) bug that special-cased
record
for the key rather than the value. I've fixed it so that the key is now handled properly (same as other types), but I haven't implemented any changes for color values that use a record (e.g.,{ fg: "#80a1a1", attr: "b" }
) as this would make the table less compact. I'll look at doing this for the longer formpreview theme
later.Closures other than for
string
,bool
,date
, andfilesize
are currently only displayed as a summary. There aren't any themes currently that this impacts, but if you create one manually, the display results were pretty bad. This is primarily due to bad indentation fromconfig.nu
(and/or defaults). A propernu-indent
would help fix this, or maybe we could just remove all whitespace and display any closure as a one-liner.I probably won't regenerate screenshots until we figure out what to do about the "monotone" type colors.