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

Evaluate rich for use with our CLI #1331

Closed
ossareh opened this issue Oct 11, 2021 · 2 comments
Closed

Evaluate rich for use with our CLI #1331

ossareh opened this issue Oct 11, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ossareh
Copy link
Contributor

ossareh commented Oct 11, 2021

As discussed here: #1321 (comment)

tldr:

  • Emoji's do not work by default on Windows
  • https://github.com/willmcgugan/rich provides a cross platform way of interacting with terminals
  • Eval it, see if it helps with emoji on windows

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@BryceBeagle BryceBeagle added the enhancement New feature or request label Oct 12, 2021
@mtskillman
Copy link
Contributor

using rich will not allow for emoji usage on Windows as the shell(s) on Windows do not support emojis: https://stackoverflow.com/questions/64940181/cannot-display-emojis-in-windows-powershell-or-wsl-linux-terminal-using-python

I have tried this in the strawberry/cli/commands/server.py

from rich import print
...
def server(schema, host, port, log_level, app_dir):
    ...
    print(f"Running strawberry on http://{host}:{port}/graphql :Strawberry:\n")

this results in this output in the Windows terminal:
image

@patrick91
Copy link
Member

we use rich now 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants