Skip to content

Commit bf88a68

Browse files
committed
ui [nfc]: Comment with TODO(#95) where we need dark-theme colors
Related: #95 In these places, I was unable to find a specific dark-theme color by consulting web or the Figma (as it is now).
1 parent 756add3 commit bf88a68

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

lib/widgets/inbox.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ abstract class _HeaderItem extends StatelessWidget {
245245
@override
246246
Widget build(BuildContext context) {
247247
return Material(
248+
// TODO(#95) need dark-theme color
248249
color: collapsed ? Colors.white : uncollapsedBackgroundColor,
249250
child: InkWell(
250251
// TODO use onRowTap to handle taps that are not on the collapse button.
@@ -256,6 +257,7 @@ abstract class _HeaderItem extends StatelessWidget {
256257
onTap: onCollapseButtonTap,
257258
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
258259
Padding(padding: const EdgeInsets.all(10),
260+
// TODO(#95) need dark-theme color
259261
child: Icon(size: 20, color: const Color(0x7F1D2E48),
260262
collapsed ? ZulipIcons.arrow_right : ZulipIcons.arrow_down)),
261263
Icon(size: 18, color: collapsed ? collapsedIconColor : uncollapsedIconColor,
@@ -267,6 +269,7 @@ abstract class _HeaderItem extends StatelessWidget {
267269
style: const TextStyle(
268270
fontSize: 17,
269271
height: (20 / 17),
272+
// TODO(#95) need dark-theme color
270273
color: Color(0xFF222222),
271274
).merge(weightVariableTextStyle(context, wght: 600)),
272275
maxLines: 1,
@@ -292,8 +295,11 @@ class _AllDmsHeaderItem extends _HeaderItem {
292295

293296
@override get title => 'Direct messages'; // TODO(i18n)
294297
@override get icon => ZulipIcons.user;
298+
299+
// TODO(#95) need dark-theme colors
295300
@override get collapsedIconColor => const Color(0xFF222222);
296301
@override get uncollapsedIconColor => const Color(0xFF222222);
302+
297303
@override get uncollapsedBackgroundColor => const Color(0xFFF3F0E7);
298304
@override get unreadCountBadgeBackgroundColor => null;
299305

@@ -367,6 +373,7 @@ class _DmItem extends StatelessWidget {
367373
};
368374

369375
return Material(
376+
// TODO(#95) need dark-theme color
370377
color: Colors.white,
371378
child: InkWell(
372379
onTap: () {
@@ -382,6 +389,7 @@ class _DmItem extends StatelessWidget {
382389
style: const TextStyle(
383390
fontSize: 17,
384391
height: (20 / 17),
392+
// TODO(#95) need dark-theme color
385393
color: Color(0xFF222222),
386394
),
387395
maxLines: 2,
@@ -486,6 +494,7 @@ class _TopicItem extends StatelessWidget {
486494
final subscription = store.subscriptions[streamId]!;
487495

488496
return Material(
497+
// TODO(#95) need dark-theme color
489498
color: Colors.white,
490499
child: InkWell(
491500
onTap: () {
@@ -502,6 +511,7 @@ class _TopicItem extends StatelessWidget {
502511
style: const TextStyle(
503512
fontSize: 17,
504513
height: (20 / 17),
514+
// TODO(#95) need dark-theme color
505515
color: Color(0xFF222222),
506516
),
507517
maxLines: 2,
@@ -519,6 +529,7 @@ class _TopicItem extends StatelessWidget {
519529
class _AtMentionMarker extends StatelessWidget {
520530
const _AtMentionMarker();
521531

532+
// TODO(#95) need dark-theme color
522533
static final markerColor = const HSLColor.fromAHSL(0.5, 0, 0, 0.2).toColor();
523534

524535
@override

lib/widgets/login.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ class _UsernamePasswordFormState extends State<_UsernamePasswordForm> {
621621
}
622622

623623
// Loosely based on the corresponding element in the web app.
624+
// TODO(#95) need dark-theme colors
624625
class OrDivider extends StatelessWidget {
625626
const OrDivider({super.key});
626627

lib/widgets/recent_dm_conversations.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,15 @@ class RecentDmConversationsItem extends StatelessWidget {
109109
// new Intl.ListFormat('ja').format(['Chris', 'Greg', 'Alya'])
110110
// // 'Chris、Greg、Alya'
111111
title = narrow.otherRecipientIds.map((id) => store.users[id]?.fullName ?? '(unknown user)').join(', ');
112+
// TODO(#95) need dark-theme color
112113
avatar = ColoredBox(color: const Color(0x33808080),
113114
child: Center(
115+
// TODO(#95) need dark-theme color
114116
child: Icon(ZulipIcons.group_dm, color: Colors.black.withOpacity(0.5))));
115117
}
116118

117119
return Material(
120+
// TODO(#95) need dark-theme color
118121
color: Colors.white,
119122
child: InkWell(
120123
onTap: () {
@@ -132,6 +135,7 @@ class RecentDmConversationsItem extends StatelessWidget {
132135
style: const TextStyle(
133136
fontSize: 17,
134137
height: (20 / 17),
138+
// TODO(#95) need dark-theme color
135139
color: Color(0xFF222222),
136140
),
137141
maxLines: 2,

lib/widgets/subscription_list.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ class _NoSubscriptionsItem extends StatelessWidget {
118118
child: Text("No streams found",
119119
textAlign: TextAlign.center,
120120
style: TextStyle(
121+
// TODO(#95) need dark-theme color
121122
color: const HSLColor.fromAHSL(1.0, 240, 0.1, 0.5).toColor(),
122123
fontSize: 18,
123124
height: (20 / 18),
@@ -133,9 +134,11 @@ class _SubscriptionListHeader extends StatelessWidget {
133134
@override
134135
Widget build(BuildContext context) {
135136
final line = Expanded(child: Divider(
137+
// TODO(#95) need dark-theme color
136138
color: const HSLColor.fromAHSL(0.2, 240, 0.1, 0.5).toColor()));
137139
return SliverToBoxAdapter(
138140
child: ColoredBox(
141+
// TODO(#95) need dark-theme color
139142
color: Colors.white,
140143
child: Row(crossAxisAlignment: CrossAxisAlignment.center,
141144
children: [
@@ -147,6 +150,7 @@ class _SubscriptionListHeader extends StatelessWidget {
147150
child: Text(label,
148151
textAlign: TextAlign.center,
149152
style: TextStyle(
153+
// TODO(#95) need dark-theme color
150154
color: const HSLColor.fromAHSL(1.0, 240, 0.1, 0.5).toColor(),
151155
fontSize: 14,
152156
letterSpacing: proportionalLetterSpacing(context, 0.04, baseFontSize: 14),
@@ -197,6 +201,7 @@ class SubscriptionItem extends StatelessWidget {
197201
final swatch = subscription.colorSwatch();
198202
final hasUnreads = (unreadCount > 0);
199203
return Material(
204+
// TODO(#95) need dark-theme color
200205
color: Colors.white,
201206
child: InkWell(
202207
onTap: () {
@@ -221,6 +226,7 @@ class SubscriptionItem extends StatelessWidget {
221226
style: const TextStyle(
222227
fontSize: 18,
223228
height: (20 / 18),
229+
// TODO(#95) need dark-theme color
224230
color: Color(0xFF262626),
225231
).merge(weightVariableTextStyle(context,
226232
wght: hasUnreads ? 600 : null)),

lib/widgets/unread_count_badge.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class UnreadCountBadge extends StatelessWidget {
3232
final effectiveBackgroundColor = switch (backgroundColor) {
3333
StreamColorSwatch(unreadCountBadgeBackground: var color) => color,
3434
Color() => backgroundColor,
35+
// TODO(#95) need dark-theme color
3536
null => const Color.fromRGBO(102, 102, 153, 0.15),
3637
};
3738

@@ -57,6 +58,7 @@ class UnreadCountBadge extends StatelessWidget {
5758
// - in dark mode use `Color.fromRGBO(255, 255, 255, 0.9)`
5859
// The web app doesn't (yet?) use stream-colored unread markers
5960
// so we can't take direction from there.
61+
// TODO(#95) need dark-theme color
6062
color: Color(0xFF222222),
6163
).merge(weightVariableTextStyle(context,
6264
wght: bold ? 600 : null)),

0 commit comments

Comments
 (0)