-
Notifications
You must be signed in to change notification settings - Fork 308
ui: Fix some design deviations in the recent DMs page; migrate to Material Design 3 #380
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: Fix some design deviations in the recent DMs page; migrate to Material Design 3 #380
Conversation
Thanks for taking care of this! In the message list, it looks like this increases the line-height of all the text in message content. Let's adjust to keep that unchanged. Everything else LGTM. |
I believe:
(In Flutter's lib/src/material/typography.dart, see Do you know a good way to clobber the 1.43 with |
Hmm, I guess (This is the problem that Drift solves with the Well… these values aren't going to change upstream, unless there's some kind of bug in them. (Based on the pattern to date, they'll keep compatibility and make new names for the next Material version.) So we could just copy them from upstream, and delete that one bit. Ugly and certainly wants a comment saying where the values are copied from, but it'll work. |
Alternatively, for any given font there is a numeric value equivalent to
So since we're using a particular font, we could determine that value and use it. |
Hmm yeah, that seems right. We're not yet using a particular font; we have #294 for that. But we plan to. |
From looking at the "Computed" tab in the Chrome DevTools element inspector, on CZO at 8.0-dev-2850-gef1c1ce05f. Technically the web app has a computed `line-height` of 16.996px, but that seems like a rounding error. One reason for doing this now is to opt out of a default that would take effect with the upcoming migration to Material 3. The text would otherwise get a line height of 1.43 times the font size, and we want it to be denser than that. We briefly explored how to preserve the line height exactly, across the M3 migration, but the solutions we found seemed more awkward than just taking care of this: zulip#380 (comment) Fixes-partly: zulip#294
2e72a32
to
8863fda
Compare
Values obtained by looking at the "Computed" tab in the Chrome DevTools element inspector, on CZO at 8.0-dev-2850-gef1c1ce05f. Technically the web app has a computed `line-height` of 16.996px, but that seems like a rounding error. One reason for doing this now is to opt out of a default that would take effect with the upcoming migration to Material 3. The text would otherwise get a line height of 1.43 times the font size, and we want it to be denser than that. We briefly explored how to preserve the line height exactly, across the M3 migration, but the solutions we found seemed more awkward than just taking care of this now: zulip#380 (comment) Fixes-partly: zulip#157 Fixes-partly: zulip#294
8863fda
to
0ad5005
Compare
Cool, that solution SGTM. Would you rebase this onto main? I kind of think I like that "before" text better than the "after". But we'll see how we feel after using the new for a bit, and in any case that's a discussion to have separately. |
I missed this in zulip#249 and made the rows transparent, oops. So they were taking on the scaffold background color, 0xfffafafa a.k.a. ThemeData.canvasColor. (If we were using Material 3, the scaffold background color would be 0xfffefbff a.k.a. ThemeData.colorScheme.background. Neither color is correct for what the Figma actually specifies for the surface underneath this screen's scrollable content. That's 0xfff6f6f6, and we'll start using it soon.) The ink effect on touch was being enabled by the scaffold's underlying Material. To preserve the ink effect, use a Material here instead of e.g. a ColoredBox. See the design in Figma: https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=341%3A12378&mode=dev
Values obtained by looking at the "Computed" tab in the Chrome DevTools element inspector, on CZO at 8.0-dev-2850-gef1c1ce05f. Technically the web app has a computed `line-height` of 16.996px, but that seems like a rounding error. One reason for doing this now is to opt out of a default that would take effect with the upcoming migration to Material 3. The text would otherwise get a line height of 1.43 times the font size, and we want it to be denser than that. We briefly explored how to preserve the line height exactly, across the M3 migration, but the solutions we found seemed more awkward than just taking care of this now: zulip#380 (comment) Fixes-partly: zulip#157 Fixes-partly: zulip#294
From logging, this would otherwise be 0xfffefbff. See the Flutter doc on ColorScheme.background: https://api.flutter.dev/flutter/material/ColorScheme/background.html It simply says: > A color that typically appears behind scrollable content. This change is definitely the boldest we've been in perceiving a pattern in the Figma spec and organizing our code to fit it. We should cheerfully do something else if it turns out to make it harder instead of easier to follow the spec. Prompted by noticing that the surface underneath the scrollable content in RecentDmConversationsPage wasn't colored according to the Figma. And that the Figma's design for the Inbox page (zulip#117) had the same color for the surface underneath *its* scrollable content. This change fixes the RecentDmConversationsPage and makes it easy and natural for the Inbox page to get the right color too.
0ad5005
to
21dbae1
Compare
Sure; done. |
Thanks! Looks good; merging. |
Doing our planned M3 migration (#225) gives us a convenient pattern that I'm hoping will make it easier to follow the Figma spec in a certain way. Details in the last commit.
Fixes: #225