Skip to content

Commit bafd99f

Browse files
committed
msglist: Update chevron design in StreamMessageRecipientHeader
Switch from colored background with chevron shaped border to inline chevron icon. Also reset font and color styling from headers, but subsequent commits will reintroduce these to match the updated design.
1 parent 9a1b491 commit bafd99f

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

lib/widgets/message_list.dart

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -549,23 +549,23 @@ class StreamMessageRecipientHeader extends StatelessWidget {
549549
final stream = store.streams[message.streamId];
550550
final topic = message.subject;
551551

552-
final subscription = store.subscriptions[message.streamId];
553-
final streamColor = Color(subscription?.color ?? 0x00c2c2c2);
554-
final contrastingColor =
555-
ThemeData.estimateBrightnessForColor(streamColor) == Brightness.dark
556-
? Colors.white
557-
: Colors.black;
558-
559552
final streamWidget = (showStream)
560553
? GestureDetector(
561554
onTap: () => Navigator.push(context,
562555
MessageListPage.buildRoute(context: context,
563556
narrow: StreamNarrow(message.streamId))),
564-
child: RecipientHeaderChevronContainer(
565-
color: streamColor,
557+
child: Row(children: [
558+
const SizedBox(width: 16),
566559
// TODO globe/lock icons for web-public and private streams
567-
child: Text(stream?.name ?? message.displayRecipient, // TODO(log) if missing
568-
style: TextStyle(color: contrastingColor))))
560+
Text(stream?.name ?? message.displayRecipient), // TODO(log) if missing
561+
Padding(
562+
// Figma has 5px horizontal padding around an 8px wide icon.
563+
// Icon is 16px wide here so horizontal padding is 1px.
564+
padding: const EdgeInsets.symmetric(horizontal: 1),
565+
child: Icon(size: 16,
566+
color: const HSLColor.fromAHSL(0.60, 0, 0, 0).toColor(),
567+
ZulipIcons.chevron_right)),
568+
]))
569569
: const SizedBox(width: 16);
570570

571571
return GestureDetector(
@@ -584,8 +584,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
584584
child: Text(topic,
585585
// TODO: Give a way to see the whole topic (maybe a
586586
// long-press interaction?)
587-
overflow: TextOverflow.ellipsis,
588-
style: const TextStyle(fontWeight: FontWeight.w600)))),
587+
overflow: TextOverflow.ellipsis))),
589588
// TODO topic links?
590589
// Then web also has edit/resolve/mute buttons. Skip those for mobile.
591590
RecipientHeaderDate(message: message,

0 commit comments

Comments
 (0)