Skip to content

Commit

Permalink
msglist: Follow web's change making dark mode's --color-text-default …
Browse files Browse the repository at this point in the history
…opaque

In zulip/zulip@8741c9e43, web changed --color-text-default from
`hsl(0deg 0% 100% / 75%)` to `hsl(0deg 0% 85%)`, to fix some bugs:
- literal Unicode emoji were not fully opaque
- strikethroughs appeared uneven; opacity was compounded where
  letters and strikethroughs overlapped.

The change also made message text a little bit higher contrast, and
that seems like an improvement. Discussion:
  https://chat.zulip.org/#narrow/stream/101-design/topic/Message.20text.20color.20in.20dark.20theme/near/1936707

To carry over this change, this commit updates
ContentTheme.textStylePlainParagraph, and also all our other colors
that were following web where the web counterpart was based on
--color-text-default. I believe that turns out to just be
MessageListTheme.messageTimestamp, added in beee77e; see that
commit message.

Before this, emoji in messages were not fully opaque in dark mode
(zulip#953), as Greg reported:
  https://chat.zulip.org/#narrow/stream/48-mobile/topic/dark.20theme/near/1924392
and that's fixed now.

Fixes: zulip#953
  • Loading branch information
chrisbobbe committed Sep 19, 2024
1 parent cdbe141 commit 28ca324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/widgets/content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
colorMessageMediaContainerBackground: const HSLColor.fromAHSL(0.03, 0, 0, 1).toColor(),
colorThematicBreak: const HSLColor.fromAHSL(1, 0, 0, .87).toColor().withValues(alpha: 0.2),
textStylePlainParagraph: _plainParagraphCommon(context).copyWith(
color: const HSLColor.fromAHSL(0.75, 0, 0, 1).toColor(),
color: const HSLColor.fromAHSL(1, 0, 0, 0.85).toColor(),
debugLabel: 'ContentTheme.textStylePlainParagraph'),
codeBlockTextStyles: CodeBlockTextStyles.dark(context),
textStyleError: TextStyle(fontSize: kBaseFontSize, color: Colors.red.shade900)
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
dateSeparator: Colors.white,
dateSeparatorText: const HSLColor.fromAHSL(0.75, 0, 0, 1).toColor(),
dmRecipientHeaderBg: const HSLColor.fromAHSL(1, 46, 0.15, 0.2).toColor(),
messageTimestamp: const HSLColor.fromAHSL(0.6, 0, 0, 1).toColor(),
messageTimestamp: const HSLColor.fromAHSL(0.8, 0, 0, 0.85).toColor(),
recipientHeaderText: const HSLColor.fromAHSL(0.8, 0, 0, 1).toColor(),
senderBotIcon: const HSLColor.fromAHSL(1, 180, 0.05, 0.5).toColor(),
senderName: const HSLColor.fromAHSL(0.85, 0, 0, 1).toColor(),
Expand Down

0 comments on commit 28ca324

Please sign in to comment.