Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Use UTF-8 triangle for question prompt #26718

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

Closed
wants to merge 2 commits into from
Closed

[Console] Use UTF-8 triangle for question prompt #26718

wants to merge 2 commits into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Mar 30, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes/no
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

Now inspired by #26698, this updates the prompt icon :) Havent looked at tests/windows yet... but i find it very pretty :}

Before

image

After

image

Move forward?

ref https://www.utf8icons.com/character/9205/black-medium-right-pointing-triangle

Copy link
Contributor

@ostrolucky ostrolucky left a comment

Choose a reason for hiding this comment

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

Tested, doesn't work on windows. Use these https://github.com/sindresorhus/figures

@Simperfit
Copy link
Contributor

@ro0NL did you test it on mac ? doesn't seem to work on mine neither

@rugabarbo
Copy link

It displays as a square (Mac OS X).

@ro0NL
Copy link
Contributor Author

ro0NL commented Mar 31, 2018

Sorry.. linux-developer here :) Anyway i just got aware of #11326 also.. which seems competing and is a different approach overall.

In general something like Console\Figure::render('⏡', '>'); would be nice.

Status: needs work

@javiereguiluz
Copy link
Member

@ro0NL
Copy link
Contributor Author

ro0NL commented Mar 31, 2018

Ok. lets see, if we can ship this little enhancement before #11326 that's nice i guess.

New icon works for me :)

@ostrolucky
Copy link
Contributor

ostrolucky commented Mar 31, 2018

Works on windows as well. But wouldn't it be better to use the one from #11326? Or is this one going to replace the one there?

@javiereguiluz
Copy link
Member

I'd say the new small triangle looks worse than the existing > char 😒

@ogizanagi
Copy link
Contributor

ogizanagi commented Mar 31, 2018

I find it a bit too much subtil. Output on OS X (iTerm with 12pt Monaco font):

original:

screenshot 2018-03-31 a 12 26 19

new (https://www.utf8icons.com/character/9656/black-right-pointing-small-triangle):

screenshot 2018-03-31 a 12 21 14

What about using the same as in #11326, i.e https://www.utf8icons.com/character/10095/heavy-right-pointing-angle-quotation-mark-ornament:

screenshot 2018-03-31 a 12 21 26

?

But anyway it may depends too much on the font used. We won't find a perfect fit.

@ro0NL
Copy link
Contributor Author

ro0NL commented Mar 31, 2018

Last triangle on my side:
image

Proposed chevron on my side:
image

Hence i chose a smaller triangle ;-) but im willing to settle, no problem. In PHPStorm it looks better.

@ostrolucky
Copy link
Contributor

I like ❯ most, even on your screenshot. But it does not work on windows. We could really use Figure helper

@nicolas-grekas
Copy link
Member

lets keep it as is, > is really fine, and prevents from adding code for dealing with non-UTF-8 consoles.

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone Mar 31, 2018
@fabpot
Copy link
Member

fabpot commented Apr 1, 2018

I think @nicolas-grekas is right. After all, that's not like it's much better and could introduce some bugs on some platforms. For that reason, I'm going to revert #26698, so that we get more time to evaluate the impacts and have only one PR that does all the changes.

@ro0NL
Copy link
Contributor Author

ro0NL commented Apr 1, 2018

Fair. I see the hassle it brings..

What amazes me is this concept of "partial UTF" support accros platforms, totally defeating UTF :D

@ro0NL ro0NL closed this Apr 1, 2018
@ro0NL ro0NL deleted the console-question-prompt branch April 1, 2018 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants