Skip to content

Add Noto Color Emoji back again; use it in message-list reaction chips on Android #436

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

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

chrisbobbe
Copy link
Collaborator

  • Bundle Noto Color Emoji, with a TODO to not bundle it on iOS (I'll file an issue for that TODO)
  • Use Noto Color Emoji on Android (but not iOS) for reaction chips
    • I'll file an issue to use it for text elsewhere (on Android). But using it for reaction chips is easier and more urgent.

Screenshots from the office Android device (Samsung Galaxy S9 running Android 9):

(ignore/pardon the battery-life popup in the "After" screenshot)

Before After
image image

Fixes: #404
Fixes: #435

@chrisbobbe chrisbobbe added a-msglist The message-list screen, except what's label:a-content a-Android Issues specific to Android, or requiring Android-specific work labels Dec 4, 2023
@chrisbobbe chrisbobbe requested a review from gnprice December 4, 2023 19:18
Copy link
Member

@gnprice gnprice left a comment

Choose a reason for hiding this comment

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

Thanks! One comment below. I'll go ahead and fix that and merge.

I'll file an issue to use it for text elsewhere (on Android). But using it for reaction chips is easier and more urgent.

Sure. I'd take #404 to cover using it for emoji in messages too; but happy for this to close that issue if we split out a new one.

with a TODO to not bundle it on iOS (I'll file an issue for that TODO)

(Just copying this here too so it's mentioned alongside the other one.)

pubspec.yaml Outdated
- family: Zulip Icons
# Google's emoji font. (Web uses these emoji for the "Google" emojiset.)
#
# This should always be used under a condition that excludes iOS.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# This should always be used under a condition that excludes iOS.
# This should not be used on iOS.

I kept wanting to read this as being in the direction of saying it should be used, then realized the point was the situations where it shouldn't.

Copy link
Member

Choose a reason for hiding this comment

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

Also tweaked the next line:

-    # This should always be used under a condition that excludes iOS.
-    # iOS doesn't support this font in any of its available formats,
+    # This should not be used on iOS.
+    # iOS doesn't support any of the formats this font is available in,

because it sounded like "its available formats" might refer to iOS rather than the font.

Downloaded from:
  https://github.com/googlefonts/noto-emoji/tree/d79d23e68/fonts

We removed this in a1da95a, but we want to add it back now that
we're more confident that it will work on Android. In the time since
a1da95a, we learned that COLRv1 fonts just never work on
iOS/macOS; they aren't supported:
  flutter/flutter#134897 (comment)

So, when trying to explain why this font wasn't working in a test on
my iPhone, it seems less necessary to consider a possible unknown
factor that might affect some Android installs too. It was likely
explained just by the fact that the format doesn't have iOS support.

This fixes zulip#435, where the "Licenses" page was broken because we
forgot to remove its reference to the Noto Color Emoji license that
we removed in a1da95a.

Fixes: zulip#404
Fixes: zulip#435
We should also use this font for Unicode emojis elsewhere, such as
message content, users' names, and so on. But the proper layout of
these chips is especially sensitive to how these emojis get
rendered, and apparently the system emoji font can vary quite a bit
on Android (same link as removed in the TODO):
  zulip#410 (comment)
So we'd like to converge on one font here (at least for Android) as
soon as possible.
@gnprice gnprice force-pushed the pr-reaction-chips-noto-android branch from af9825f to 1a4f83b Compare December 5, 2023 01:59
@gnprice gnprice merged commit 1a4f83b into zulip:main Dec 5, 2023
@chrisbobbe chrisbobbe deleted the pr-reaction-chips-noto-android branch December 5, 2023 18:00
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request Dec 6, 2023
In zulip#436, we brought back Noto Color Emoji, but just for reaction
chips. This brings it to message content in the message list, and
all the other places where we've been specifying Source Sans 3.

This leaves some edge cases where we'll still fall back to a system
emoji font, like if there's an emoji in a user's name and you're
looking at the profile screen. (Or in the "sender" area of a message
in the message list, for that matter, checking again just now.)
Those will be fixed later in this series, along with a cleanup that
eliminates the repetition of [kDefaultFontFamily] and
[kDefaultFontFamilyFallback] that we see in this commit.

Fixes-partly: zulip#438
gnprice pushed a commit to chrisbobbe/zulip-flutter that referenced this pull request Jan 5, 2024
In zulip#436, we brought back Noto Color Emoji, but just for reaction
chips. This brings it to message content in the message list, and
all the other places where we've been specifying Source Sans 3.

This leaves some edge cases where we'll still fall back to a system
emoji font, like if there's an emoji in a user's name and you're
looking at the profile screen. (Or in the "sender" area of a message
in the message list, for that matter, checking again just now.)
Those will be fixed later in this series, along with a cleanup that
eliminates the repetition of [kDefaultFontFamily] and
[kDefaultFontFamilyFallback] that we see in this commit.

Fixes-partly: zulip#438
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request Jan 5, 2024
In zulip#436, we brought back Noto Color Emoji, but just for reaction
chips. This brings it to message content in the message list, and
all the other places where we've been specifying Source Sans 3.

This leaves some edge cases where we'll still fall back to a system
emoji font, like if there's an emoji in a user's name and you're
looking at the profile screen. (Or in the "sender" area of a message
in the message list, for that matter, checking again just now.)
Those will be fixed later in this series, along with a cleanup that
eliminates the repetition of [kDefaultFontFamily] and
[kDefaultFontFamilyFallback] that we see in this commit.

Fixes-partly: zulip#438
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request Jan 9, 2024
In zulip#436, we brought back Noto Color Emoji, but just for reaction
chips. This brings it to message content in the message list, and
all the other places where we've been specifying Source Sans 3.

This leaves some edge cases where we'll still fall back to a system
emoji font, like if there's an emoji in a user's name and you're
looking at the profile screen. (Or in the "sender" area of a message
in the message list, for that matter, checking again just now.)
Those will be fixed later in this series, along with a cleanup that
eliminates the repetition of [kDefaultFontFamily] and
[kDefaultFontFamilyFallback] that we see in this commit.

Fixes-partly: zulip#438
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request Feb 2, 2024
In zulip#436, we brought back Noto Color Emoji, but just for reaction
chips. This brings it to message content in the message list, and
all the other places where we've been specifying Source Sans 3.

This leaves some edge cases where we'll still fall back to a system
emoji font, like if there's an emoji in a user's name and you're
looking at the profile screen. (Or in the "sender" area of a message
in the message list, for that matter, checking again just now.)
Those will be fixed later in this series, along with a cleanup that
eliminates the repetition of [kDefaultFontFamily] and
[kDefaultFontFamilyFallback] that we see in this commit.

Fixes-partly: zulip#438
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Android Issues specific to Android, or requiring Android-specific work a-msglist The message-list screen, except what's label:a-content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AboutZulipPage: "Licenses" page broken Try bundling an emoji font
2 participants