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

Switch emojis to log-symbols for terminal compatibility #363

Merged
merged 3 commits into from
Dec 25, 2017

Conversation

shawwn
Copy link
Contributor

@shawwn shawwn commented Dec 21, 2017

Closes #362.

Copy link
Contributor

@brandon93s brandon93s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly what I had in mind. This removes them completely on Windows instead of providing a fallback to a symbol that works.

@shawwn shawwn changed the title Don't show emoji on windows. Switch emojis to log-symbols for terminal compatibility Dec 21, 2017
@shawwn
Copy link
Contributor Author

shawwn commented Dec 21, 2017

@brandon93s Ok, I switched out the emojis with log-symbols. It'll be up to @devongovett whether he's fond of the existing hourglass / star emojis though.

Alternatively, we could use log-symbols on windows, and the current emojis everywhere else.

@brandon93s
Copy link
Contributor

Yep.

Alternatively, just detect Windows and conditionally show the existing ⌛️ ✨ vs other compatible icons.

@devongovett
Copy link
Member

yeah let's keep the emojis by default and fall back

@shawwn
Copy link
Contributor Author

shawwn commented Dec 21, 2017 via email

Copy link
Contributor

@brandon93s brandon93s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend some sort of cli-symbols implementation local to parcel that abstracts away all of the platform checks.

It would export a .info, .success, .error, which internally resolves the platform and returns the emoji or the equivalent from log-symbols.

@shawwn
Copy link
Contributor Author

shawwn commented Dec 22, 2017 via email

@devongovett devongovett force-pushed the fixes/362/windows-cli-icons branch from fdec330 to 76575bb Compare December 24, 2017 23:23
@devongovett
Copy link
Member

Updated to use emoji but have fallback for windows. Apparently VS Code does support emoji though thanks to electron, so we try to detect that.

@brandon93s since you use windows, could you verify? Thanks!

@brandon93s
Copy link
Contributor

@devongovett - great find on the emoji support in VS Code! Windows test outputs below:

PowerShell:

image

CMD:

image

VSCode (PowerShell):

image

I've tested failures as well. All three states (processing, success, failure) look good.

@@ -0,0 +1,6 @@
const supportsEmoji = process.platform !== 'win32' || process.env.VSCODE_PID;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I like the dedicated utility; should make maintenance easier!

@devongovett devongovett merged commit 0eb4487 into parcel-bundler:master Dec 25, 2017
@devongovett
Copy link
Member

Awesome, thanks for testing @brandon93s! Merry Christmas. 🎄

@brandon93s
Copy link
Contributor

Same to you! 🎄🎅🏼

devongovett pushed a commit that referenced this pull request Oct 15, 2018
* Don't show emoji on windows.

* Use log-symbols

* Emoji with fallback for windows
devongovett pushed a commit that referenced this pull request Oct 15, 2018
* Don't show emoji on windows.

* Use log-symbols

* Emoji with fallback for windows
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.

3 participants