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: Fix some design deviations in the recent DMs page; migrate to Material Design 3 #380

Merged
merged 4 commits into from
Nov 16, 2023

Commits on Nov 16, 2023

  1. recent_dm_conversations: Make rows white, like in Figma

    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
    chrisbobbe committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    b3551e6 View commit details
    Browse the repository at this point in the history
  2. content: Follow web app in using Source Sans 3, size 14, height 17

    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
    chrisbobbe committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    c7be9c3 View commit details
    Browse the repository at this point in the history
  3. ui: Migrate to Material Design 3

    This completes the checklist at zulip#225. I tested the screen-reader
    interface change with VoiceOver on my iPhone.
    
    Fixes: zulip#225
    chrisbobbe committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    2f01c51 View commit details
    Browse the repository at this point in the history
  4. ui: Use 0xfff6f6f6 for ColorScheme.background, following Figma

    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.
    chrisbobbe committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    21dbae1 View commit details
    Browse the repository at this point in the history