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

ui: Make some dark-theme adjustments from Greg's feedback #955

Merged
merged 4 commits into from
Oct 12, 2024

Conversation

chrisbobbe
Copy link
Collaborator

This addresses all the remaining items in the CZO thread at https://chat.zulip.org/#narrow/stream/48-mobile/topic/dark.20theme/near/1936853 .

Screenshots coming soon.

@chrisbobbe chrisbobbe added the integration review Added by maintainers when PR may be ready for integration label Sep 19, 2024
@chrisbobbe chrisbobbe requested a review from gnprice September 19, 2024 02:36
@chrisbobbe
Copy link
Collaborator Author

chrisbobbe commented Sep 19, 2024

Home page (light theme affected too because it was convenient to just plug in a light/dark pair of colors that comes from Material):

Before After
image image
image image

Error style (light theme unchanged):

Before After
image image

Dot for muted unreads (light theme unchanged):

The way this looks, I think it might not be an improvement, actually. The color matches what gets used on web, but it ends up with pretty low contrast because the background color differs between mobile and web. But also, like many UI elements that currently follow web, this is something we'll revisit once we have a design from Vlad.

Before After
image image

@chrisbobbe
Copy link
Collaborator Author

cc @alya in case you'd like to take a look.

@alya
Copy link
Collaborator

alya commented Sep 20, 2024

Works for me, thanks!

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 for taking care of these! Two small comments.

Comment on lines 320 to 321
])),
));
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
])),
));
]))));

@@ -158,6 +159,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
groupDmConversationIconBg: const Color(0x33cccccc),
loginOrDivider: const Color(0xff424242),
loginOrDividerText: const Color(0xffa8a8a8),
mutedUnreadBadge: const HSLColor.fromAHSL(0.5, 0, 0, 0.3).toColor(),
Copy link
Member

Choose a reason for hiding this comment

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

This is pretty low-contrast in dark mode, but as with many of our UI
elements, we'll adjust as necessary when we have a design from Vlad.

From the screenshot, this gets pretty hard to see. It's good to have this properly wired up into DesignVariables, but I think the existing value that's the same as in light theme actually works out better.

Let's maybe just make this the same value (with 0.8 lightness) as for the light theme, and leave a // TODO(design-dark) for it. Or spend a minute or two trying values in between like 0.6, and pick something that looks clear.

@chrisbobbe
Copy link
Collaborator Author

Thanks! Revision pushed.

Here's the before-and-after for MutedUnreadBadge in dark theme (main vs. the tip of the branch), with 0.6 for the lightness:

Before After
image image

This seems like the preferred way to use the API.
An improvement that Greg pointed out:
  https://chat.zulip.org/#narrow/stream/48-mobile/topic/dark.20theme/near/1936853

This makes them the same color as the third-party login buttons, in
7c9c894.
Thanks to Greg for the reminder that this needed attention:
  https://chat.zulip.org/#narrow/stream/48-mobile/topic/dark.20theme/near/1936853

Web, in `main`, uses hsl(0, 0%, 30%) with 50% opacity. We tried
using that, but it ended up with pretty low contrast, given the
different background it's on here in mobile. So, this ad hoc value,
until we have a design from Vlad.

Web's light and dark colors might both actually change soon, with
the in-flight PR zulip/zulip#31847 that's test-deployed on CZO. But
not by much, and not enough to fix the low-contrast issue for us in
dark theme. I think the intended change is just to bump the opacity
from 50% to 55%. So we might refresh the light variant after that PR
is merged, and in any case will refresh both once we have Vlad's
design.
@gnprice
Copy link
Member

gnprice commented Oct 12, 2024

Thanks! Looks good; merging.

@gnprice gnprice force-pushed the pr-dark-theme-stragglers branch from ace3e99 to 69ac00c Compare October 12, 2024 00:41
@gnprice gnprice merged commit 69ac00c into zulip:main Oct 12, 2024
1 check passed
@chrisbobbe chrisbobbe deleted the pr-dark-theme-stragglers branch October 12, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration review Added by maintainers when PR may be ready for integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants