-
Notifications
You must be signed in to change notification settings - Fork 309
content: Use 17 for base font size, and fix code/mentions/times in headings #540
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
Conversation
Inline code, user mentions, and global times are failing to match the font size of an outer span when the outer span's font size is different. This is zulip#538. Pass that style to the code responsible for rendering those elements, without actually using it. We'll do that next.
…citly kBaseFontSize is currently 14. Before this, the text was sized by Theme.of(context).textTheme.bodyMedium.fontSize, thanks to an AnimatedDefaultTextStyle in the Material widget. That value is 14 when the app's localization state is set to render text as "English-like" (see [Typography]), which at this point I think it always is. We want to increase the content font size soon, for zulip#512, and for that it'll be helpful if everything uses kBaseFontSize or some multiple of it. From scrolling through a bunch of content with kBaseFontSize increased dramatically, I think these were the only pieces of content that weren't doing so.
Thanks for cleaning these up! The code changes all look good to me. A couple of tests are failing, though. |
Those tests are helpful indeed! Hmm. So the problem starts here:
The problem is that we're trying to apply the 0.825 The test failure is on this content: <p><a href="https://a/">two <strong><em><code>words</code></em></strong></a></p> Here's that content replicated in a CZO message with this Markdown:
The error is:
The code span is expecting to find a font size on the |
To fix, we could maybe:
|
I like the second direction, and I think we can simplify it: So instead of |
Interesting; thank you! I'll go for that. |
Doesn't |
Yeah, that seems right. So then that approach comes down to taking |
Fixes: #512
Fixes: #538