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

Option to opt out of CLI emoji via spago.yaml, env var, and/or flag #1183

Open
toastal opened this issue Jan 27, 2024 · 9 comments
Open

Option to opt out of CLI emoji via spago.yaml, env var, and/or flag #1183

toastal opened this issue Jan 27, 2024 · 9 comments

Comments

@toastal
Copy link
Contributor

toastal commented Jan 27, 2024

I appreciate the effort & whimsy put into selecting + supporting emojis, and I like them on websites & in chats, & I can get down with ASCII art or Kaomoji (。•̀ᴗ-)✧ or general Unicode, I however find emoji in terminal output with its bright colors and solid fills distracting in the visual hierarchy for both TUI workflows & reading my logs; it’s too much. Emoji will also appear broken in TTYs, other environments, & cases where the system emoji doesn’t support the chose symbol.

Considering there’s a way to opt out of color, I would like to opt out of emoji.

Yarn v1 (JS) uses yarn --no-emoji or in the RC file { ..., emoji: false }. Homebrew for macOS uses HOMEBREW_NO_EMOJI=1. Babel (JS) & Ember (JS) ended up removing their emoji support from CLI altogether.

@f-f
Copy link
Member

f-f commented Jan 27, 2024

The emojis are not for cuteness, but for clarity of display - I put them there to grab attention in key parts of the build, e.g. see here, they appear (1) when selecting the package to build and (2) when the build is done:

image

So the idea is exactly what you are mentioning, to get your attention while you read logs.
I personally find they look great on my terminal, but YMMV as other OSs have different emoji packs.

This is all to say that while I'm not happy about adding yet another flag, I'm up for swapping them out if we find another way of grabbing attention in the same way.

I guess we could just disable them when --no-color is passed? This would solve the issue of them being broken on TTYs as well, since we default to no-color there.

@toastal
Copy link
Contributor Author

toastal commented Jan 27, 2024 via email

@f-f
Copy link
Member

f-f commented Jan 27, 2024

The screenshot above is from Kitty FWIW

@toastal
Copy link
Contributor Author

toastal commented Jan 27, 2024

Also kitty: Screenshot_20240127_190027

@toastal
Copy link
Contributor Author

toastal commented Jan 27, 2024

Screenshot_20240127_191134

…And moments later I ran into where things no longer line up. It’s supposed to be a single character.

@f-f
Copy link
Member

f-f commented Feb 2, 2024

Ah indeed that doesn't look good. The only emojis that we use are ❌ and ✅ and ⚠️, we can switch them out for equivalent Unicode symbols if we can find ones that approximate these well.

@toastal
Copy link
Contributor Author

toastal commented Feb 2, 2024

To be fair, these specific symbols aren’t half bad as they generally match your text color whereas some CLIs get way too heavy-handed to the point where significant time is spent forcing emoji since everything has to have an emoji now …which Spago isn’t doing. Unicode won’t run in the TTY still since it’s locked to ASCII :(, but an incomplete list of non-emoji Unicode options could be:

Checkmarks:
Warnings: !
Failures: 🕱

@f-f
Copy link
Member

f-f commented Feb 3, 2024

Cool, we can go for , and , and skip them if we are running with no-color (since TTY won't support that either)

@toastal
Copy link
Contributor Author

toastal commented Feb 3, 2024

In the TTY you will get a Unicode tofu block, but usually sans the the hex code inside it. You could argue that it could function as a bullet point of sorts which might make it clearer & then not have to concern yourself with an indentation change for no-color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants