hirosystems / clarinet

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.
https://hiro.so/clarinet
GNU General Public License v3.0
302 stars 137 forks source link

Status indicators not working in `clarinet integrate`, always grey #903

Open jbencin opened 1 year ago

jbencin commented 1 year ago

In the TUI interface for clarinet integrate, all of the status indicators are grey, instead of the red/yellow/green that they are supposed to be. Other colors display fine, like those for the logs and block height. Here's a screenshot:

no-colors

I suspect I'm seeing this problem because I'm using a different environment than most people (Linux with KDE). Full details of my setup:

hugocaillard commented 11 months ago

@jbencin Do you still experience this issue?

jbencin commented 11 months ago

Yes. This is what I see as of commit 5fa90e46:

image

hugocaillard commented 11 months ago

@jbencin It's trying to display the following emojis 🟥 🟨 🟩 Is it possible that your terminal or OS doesn't support those emojis?

jbencin commented 11 months ago

I see them fine in my browser (Brave). If I paste them into vim I see:

image

So it does display something different for each one, but it's just drawing it like regular text, not displaying an image. I get the same thing in both terminals I have installed (Konsole and Alacritty), and I'm just using the default settings for both, so I imagine this would affect a lot of developers.

I'm not sure we can rely on terminals to display emoji correctly. It works fine in OS X, which is what most people at Hiro use, but I'm not sure if this is well supported on Windows or Linux. See here for an alternative way to do colors in tui-rs (now ratatui)

hugocaillard commented 11 months ago

Ok thank you. We'll figure something out 👌

jbencin commented 11 months ago

I have this working now. In Konsole, if you open settings and go "Appearance" -> "Complex Text Layout" you can select an "Emoji font" (the only one available for me was "Noto Color Emoji"). Then it will use that font only to display emoji.

I think this issue should stay open however, because emoji support (particularly with colors/images) in the terminal is probably not something we can rely on

erickcestari commented 1 month ago

We could replace emojis with colored letters or use colored brackets like [].

Alternatively:

In the images, I used the first letter of each color:

Image

Image

Image