Skip to content

Conversation

@chrisbobbe
Copy link
Collaborator

Screenshots coming soon.

After this, there's still more to do for #548:

  • letter spacing of 1% (i.e., 0.01 times fontSize) in buttons
  • perhaps audit for UI code that's meant to follow Figma already,
    but where we failed to set a non-zero letter spacing that was
    specified in Figma

Fixes: #545
Fixes-partly: #548

@chrisbobbe chrisbobbe added the a-design Visual and UX design label Mar 7, 2024
@chrisbobbe chrisbobbe requested a review from gnprice March 7, 2024 02:17
@chrisbobbe
Copy link
Collaborator Author

Before After
image image
@gnprice
Copy link
Member

gnprice commented Mar 8, 2024

Thanks! This looks good; merging.

From the commit message:

It's worth mentioning that letter spacing is one of the parameters that are carefully chosen for the 15 TextThemes that make up the default Typography in Material 3: {display,headline,title,label,body} × {small,medium,large} So this might be considered a regression...if the Material spec were our primary or only source of truth for text styles. But it isn't: we have a designer (Vlad), and this change brings us closer to his specified design. See #545 and #548. 

Yeah. I also navigated around the app a bit and looked at various screens, and there wasn't a lot of text that was affected that wasn't similar in character to what's in your screenshots above of the message list. Stream names in the streams screen; the miscellaneous text at top of HomeScreen (which we should probably cut anyway — it's from literally when I was demonstrating to myself that registerQueue was working, before there was even a message list); things like that.

In particular the titles in app bars seem unaffected, like in your screenshots.

FTR, here's the Material default font styles that we're overriding:
https://m3.material.io/styles/typography/type-scale-tokens#a734c6ed-634c-4abb-adb2-35daf0aed06a
Bit annoying to click through and find (it's not a nice presentation like a table), but the information is there, called "font tracking".

After this, there's still more to do for #548: - letter spacing of 1% (i.e., 0.01 times `fontSize`) in buttons - perhaps audit for UI code that's meant to follow Figma already, but where we failed to set a non-zero letter spacing that was specified in Figma 

I don't know a reasonable way to do that audit, unfortunately. If we could get an export of everything in such a way that we could search through for "letter-spacing" and scan for matches that are in UI we've already implemented from Figma, then it'd be pretty manageable — but I definitely don't want to try clicking through opening a bunch of nodes across the Figma design to look for letter spacing. So I take #548 as being about the buttons, and the places where a letter-spacing isn't specified, and if there are any other discrepancies then we can just file and fix those as and when we notice them.

(I'll adjust this last part of the commit message accordingly before merge.)

We'll add another across-the-board geometry conversion soon.
This zeroes out the letter spacing in message content (zulip#545), and also everywhere else that uses styles from zulipTypography without overriding the letter spacing. It's worth mentioning that letter spacing is one of the parameters that are carefully chosen for the 15 TextThemes that make up the default Typography in Material 3: {display,headline,title,label,body} × {small,medium,large} So this might be considered a regression...if the Material spec were our primary or only source of truth for text styles. But it isn't: we have a designer (Vlad), and this change brings us closer to his specified design. See zulip#545 and zulip#548. I also checked to see if the Material 3 default varies the letter spacing among the three [ScriptCategory]ies (englishLike, dense, and tall), which might be a reason to ask Vlad if we want to do the same. But the letter-spacing values are the same across the [ScriptCategory]ies, so no need for that. After this, there's still more to do for zulip#548: letter spacing of 1% (i.e., 0.01 times `fontSize`) in buttons. Fixes: zulip#545 Fixes-partly: zulip#548
@gnprice gnprice force-pushed the pr-zulip-typography-zero-letter-spacing branch from 05e7c54 to 0065954 Compare March 8, 2024 01:35
@gnprice gnprice merged commit 0065954 into zulip:main Mar 8, 2024
@chrisbobbe chrisbobbe deleted the pr-zulip-typography-zero-letter-spacing branch March 8, 2024 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-design Visual and UX design

2 participants