zulip-flutter
zulip-flutter copied to clipboard
content: Consolidate message-content base style and apply it more accurately
I have four main goals for this PR:
- Stop applying the Zulip-message text color to things that aren't Zulip-message text (and refactor to make these errors easy to avoid)
- Don't regress on performance in the message list (for example by making a
DefaultTextStyle
for every message) - Define and use a consolidated "base message text style" for content widgets to inherit from (which I do by lumping together the text color and the
Paragraph
styles) - Add a
ThemeExtension
to our app'sThemeData
, as a home for certain content styles (that we don't want to recompute for each message, or that differ between light and dark theme and will need to belerp
ed for the fade animation)
Along the way, I make some small changes/fixes:
- Message sender name was
hsl(0deg 0% 15%)
; it now matches web athsl(0deg 0% 20%)
- #697 (which I filed just now)
-
<br>
in a block context, a.k.a.LineBreakNode
, has the proper/expected font size and line height, instead of values from a Material default. (Inconspicuous and not worth filing an issue for; I don't know how to make one of these except with help from the server bug that causes #641.) - Code blocks, and our basic math-block implementation, now have 1.4x line height instead of 1.43x. (This is to match web instead of a Material default, and is inconspicuous.)
Before | After |
---|---|
Fixes: #697 Related: #95