Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Dec 18, 2020

Fixes #1894 and #2394 and adds tests for both cases.

  • Emojis with variants: The twemoji library actually provides logic that handles this in a wrapper function around toCodePoint called grabTheRightIcon, so I just imported that and used that instead.

  • Shortcodes: node-emoji expects underscores instead of dashes, so I did a string replacement.

 - Fix emojis breaking with shortcodes containing dashes
 - Fix emojis breaking with variants
 - Add tests for both cases
@ghost ghost self-requested a review December 18, 2020 02:17
Copy link
Contributor

@akrolsmir akrolsmir left a comment

Choose a reason for hiding this comment

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

Awesome work! Especially great to be leveraging existing code from twemoji, I totally did not realize that was already there 🤦

@akrolsmir akrolsmir merged commit 1ee6b40 into streamlit:develop Dec 18, 2020
@ghost ghost deleted the fix-emojis branch December 18, 2020 16:05
tconkling added a commit to tconkling/streamlit that referenced this pull request Dec 21, 2020
* develop:
  Extract st.container, columns, container out of delta_generator.py (streamlit#2487)
  Remove the unused variables inside protos (streamlit#2486)
  Stop running cypress-flaky-approval for each PR (streamlit#2490)
  Dynamically import git, and fail gracefully if missing (streamlit#2482)
  Bump React to 17.0.1 (streamlit#2453)
  Fix emojis (streamlit#2480)
  Add missing copyright headers (streamlit#2478)
  Stop requiring watchdog when installing Streamlit on Macs (streamlit#2470)
  Minor tweak to PyArrow warning message (streamlit#2472)
  Use a set literal (streamlit#2476)
  Add type annotations to DeltaGenerator mixins (streamlit#2475)
  Update change log
  Up version to 0.73.0
  Don't require pyarrow on 3.9, and show a warning on custom components (streamlit#2452)
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.

Twemoji favicon is not found if the emoji in set_page_config has a variant selector

1 participant