Skip to content

On windows, show emojis only if latest windows terminal#1490

Merged
karriebear merged 1 commit intostreamlit:developfrom
karriebear:bug/1451-emojis-on-windows-terminal
May 26, 2020
Merged

On windows, show emojis only if latest windows terminal#1490
karriebear merged 1 commit intostreamlit:developfrom
karriebear:bug/1451-emojis-on-windows-terminal

Conversation

@karriebear
Copy link
Copy Markdown
Contributor

@karriebear karriebear commented May 22, 2020

Issue: #1451

Description:
Windows Terminal was the only terminal tested that supports emojis natively.

If windows machine, check for WT_SESSION, a windows terminal specific environment variable, to determine if emoji should be displayed

Terminals for windows tested for emoji support:

  • Windows Terminal ✅
  • Cmder ❌
  • ConEmu ❌
  • Terminus ❌
  • Hyper.is ❌
  • Alacritty ❌
  • Fluent Terminal ❌

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@karriebear karriebear force-pushed the bug/1451-emojis-on-windows-terminal branch from 8dfc3bb to b430f1e Compare May 22, 2020 05:32
@karriebear karriebear force-pushed the bug/1451-emojis-on-windows-terminal branch from b430f1e to aba00c6 Compare May 22, 2020 16:45

# WT_SESSION is a Windows Terminal specific environment variable. If it exists,
# we are on the latest Windows Terminal that supports emojis
SHOW_EMOJIS = platform.system() != "Windows" or os.environ.get("WT_SESSION")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's currently only used for EMAIL_PROMPT but thought it'd be nice to have for other messages

@karriebear karriebear marked this pull request as ready for review May 22, 2020 16:50
@karriebear karriebear requested a review from a team as a code owner May 22, 2020 16:50
@karriebear karriebear requested a review from nthmost May 22, 2020 17:17
Copy link
Copy Markdown
Contributor

@nthmost nthmost left a comment

Choose a reason for hiding this comment

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

Tested on Windows 10 in Conda and Powershell. Seems to be working as intended!

@karriebear karriebear merged commit c6a12ad into streamlit:develop May 26, 2020
@karriebear karriebear deleted the bug/1451-emojis-on-windows-terminal branch May 26, 2020 19:25
tconkling added a commit that referenced this pull request May 26, 2020
* develop:
  If it is a windows machine, check if terminal is latest version that supports emojis (#1490)
  Remove Python 2 check in 'hello' df demo (#1486)
  Update README (#1493)
  Fix broken link by removing unnecessary 'd' (#1492)
  Update doc references for RTD (#1485)
  Remove excess parenthesis from selectbox example (#1488)
  Upgrade patch versions (#1463)
  Update date_input to accept a range for a ranged datepicker (#1483)
  radio docstring consistency in format_func param (#1480)
  Hash func for Tensorflow saved model (#1468)
  Figure out which env we are in for RTD (#1473)
  Version 0.60.0 (#1460)
  Remove extra start_time parameter (#1470)
  Fix spelling mistake in hello demo (#1469)
tconkling added a commit to tconkling/streamlit that referenced this pull request May 26, 2020
* feature/plugins: (26 commits)
  revert accidentally-committed datframe serialization breakage
  Example PyPI package (streamlit#1462)
  If it is a windows machine, check if terminal is latest version that supports emojis (streamlit#1490)
  Remove Python 2 check in 'hello' df demo (streamlit#1486)
  Update README (streamlit#1493)
  Fix broken link by removing unnecessary 'd' (streamlit#1492)
  Update doc references for RTD (streamlit#1485)
  Remove excess parenthesis from selectbox example (streamlit#1488)
  Upgrade patch versions (streamlit#1463)
  Update date_input to accept a range for a ranged datepicker (streamlit#1483)
  radio docstring consistency in format_func param (streamlit#1480)
  Hash func for Tensorflow saved model (streamlit#1468)
  Figure out which env we are in for RTD (streamlit#1473)
  Fix component examples
  Version 0.60.0 (streamlit#1460)
  Remove extra start_time parameter (streamlit#1470)
  Fix spelling mistake in hello demo (streamlit#1469)
  Keras model hash func (streamlit#1450)
  Add support for st.echo("below") to print echoed text below the Streamlit output (streamlit#1452)
  Update 3.5 references to 3.6 (streamlit#1444)
  ...
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.

2 participants