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

[ECO-2530] Fix emojis not showing up on most devices; add jest setup for frontend #433

Merged
merged 30 commits into from
Jan 23, 2025

Conversation

xbtmatt
Copy link
Collaborator

@xbtmatt xbtmatt commented Nov 30, 2024

Description

This means all smart-contract supported emojis will show up on the website for everyone now!

The client will deliver a fairly large font package now, but it's worth it for non-Apple devices. Apple devices get special treatment because the Apple emoji font is gorgeous and obviously lightweight for those users.

  • Add noto color emoji font for non apple users by checking user agent headers in the layout.tsx file
  • Remove the em-emoji element since it's somewhat heavy and needlessly increases the overall DOM size since we use so many emojis everywhere
  • Now we just use noto-color-emoji but it falls back to the others if they exist
  • Add jest setup for the frontend. Yay finally!
  • Fix the emoji loading circle not showing them (likely a css issue)
  • Fix the sizing of different emojis (like in wallet adapter lightning bolt connected emojis)
  • Change all emoji picker emojis to match the noto emojis
  • Use noto emojis in the noto picker textbox
  • Ensure the rocket emoji on market metadata looks correct
  • Remove console.logs from output

Testing

- [ ] Ensure users don't download the font if they're on an iOS/Mac device

This is actually possible if we don't force a preload by including it in an element in the top layout.tsx, but it causes flashing on non-Apple devices, so it's better to include it and have NextJS preload the font.

  • Ensure the font is used if the user has it (Windows, Linux, various browsers, etc)
  • Make sure nothing else breaks

Checklist

  • Did you update relevant documentation?
  • Did you add tests to cover new code or a fixed issue?
  • Did you update the changelog?
  • Did you check all checkboxes from the linked Linear task?

Copy link

vercel bot commented Nov 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
emojicoin-dot-fun ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 5:22am
emojicoin-dot-fun-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 5:22am

@xbtmatt xbtmatt marked this pull request as draft November 30, 2024 10:22
@xbtmatt xbtmatt added urgency-high Please check first size-big A big PR. This will take a while to be reviewed and merged. labels Dec 2, 2024
@xbtmatt xbtmatt added urgency-medium Check after high urgency and removed urgency-high Please check first labels Dec 19, 2024
@MoonShiesty
Copy link

because the Apple emoji font is gorgeous and obviously lightweight for those users

i think its worth weighting whether its better to have a single canonical emoji image, that matches the FA uri, vs reducing the package size on devices with good native emoji fonts

noto-color-emoji

i dont like the noto font, twitter's is far better

noto doesn't have emojis for many code points, ive noticed missing skin tones, flags etc

the noto US flag emoji looks like dogshit, as do many others. twemoji-15.0.3 font is open-source and much better

https://emojipedia.org/twitter/twemoji-15.0.3

image image

Remove font from table card styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-big A big PR. This will take a while to be reviewed and merged. urgency-high Please check first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants