Skip to content

Commit

Permalink
theme[nfc]: Remove colorMessageHeaderIconInteractive
Browse files Browse the repository at this point in the history
Removed `colorMessageHeaderIconInteractive` from
`DesignVariables` and used `title` in place of it
as per the design guidelines.
discussion: zulip#1213 (comment)
  • Loading branch information
Gaurav-Kushwaha-1225 committed Jan 15, 2025
1 parent c6aca86 commit 4b70f9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class MessageListAppBarTitle extends StatelessWidget {
padding: const EdgeInsetsDirectional.only(start: 4),
child: Icon(icon,
// TODO(design) copies the recipient header in web; is there a better color?
color: designVariables.colorMessageHeaderIconInteractive, size: 14)),
color: designVariables.title, size: 14)),
]);
}

Expand Down Expand Up @@ -1091,7 +1091,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
style: recipientHeaderTextStyle(context))),
const SizedBox(width: 4),
// TODO(design) copies the recipient header in web; is there a better color?
Icon(size: 14, color: designVariables.colorMessageHeaderIconInteractive,
Icon(size: 14, color: designVariables.title,
// A null [Icon.icon] makes a blank space.
iconDataForTopicVisibilityPolicy(
store.topicVisibilityPolicy(message.streamId, topic))),
Expand Down
7 changes: 0 additions & 7 deletions lib/widgets/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
bgSearchInput: const Color(0xffe3e3e3),
textMessage: const Color(0xff262626),
channelColorSwatches: ChannelColorSwatches.light,
colorMessageHeaderIconInteractive: Colors.black.withValues(alpha: 0.2),
contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15),
contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20),
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.35, 0.93).toColor(),
Expand Down Expand Up @@ -199,7 +198,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
contextMenuCancelBg: const Color(0xff797986).withValues(alpha: 0.15), // the same as the light mode in Figma
contextMenuCancelPressedBg: const Color(0xff797986).withValues(alpha: 0.20), // the same as the light mode in Figma
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
colorMessageHeaderIconInteractive: Colors.white.withValues(alpha: 0.2),
dmHeaderBg: const HSLColor.fromAHSL(1, 46, 0.15, 0.2).toColor(),
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
groupDmConversationIcon: Colors.white.withValues(alpha: 0.5),
Expand Down Expand Up @@ -253,7 +251,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
required this.bgSearchInput,
required this.textMessage,
required this.channelColorSwatches,
required this.colorMessageHeaderIconInteractive,
required this.contextMenuCancelBg,
required this.contextMenuCancelPressedBg,
required this.dmHeaderBg,
Expand Down Expand Up @@ -315,7 +312,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
final ChannelColorSwatches channelColorSwatches;

// Not named variables in Figma; taken from older Figma drafts, or elsewhere.
final Color colorMessageHeaderIconInteractive;
final Color contextMenuCancelBg; // In Figma, but unnamed.
final Color contextMenuCancelPressedBg; // In Figma, but unnamed.
final Color dmHeaderBg;
Expand Down Expand Up @@ -364,7 +360,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
Color? bgSearchInput,
Color? textMessage,
ChannelColorSwatches? channelColorSwatches,
Color? colorMessageHeaderIconInteractive,
Color? contextMenuCancelBg,
Color? contextMenuCancelPressedBg,
Color? dmHeaderBg,
Expand Down Expand Up @@ -412,7 +407,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
bgSearchInput: bgSearchInput ?? this.bgSearchInput,
textMessage: textMessage ?? this.textMessage,
channelColorSwatches: channelColorSwatches ?? this.channelColorSwatches,
colorMessageHeaderIconInteractive: colorMessageHeaderIconInteractive ?? this.colorMessageHeaderIconInteractive,
contextMenuCancelBg: contextMenuCancelBg ?? this.contextMenuCancelBg,
contextMenuCancelPressedBg: contextMenuCancelPressedBg ?? this.contextMenuCancelPressedBg,
dmHeaderBg: dmHeaderBg ?? this.dmHeaderBg,
Expand Down Expand Up @@ -467,7 +461,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
bgSearchInput: Color.lerp(bgSearchInput, other.bgSearchInput, t)!,
textMessage: Color.lerp(textMessage, other.textMessage, t)!,
channelColorSwatches: ChannelColorSwatches.lerp(channelColorSwatches, other.channelColorSwatches, t),
colorMessageHeaderIconInteractive: Color.lerp(colorMessageHeaderIconInteractive, other.colorMessageHeaderIconInteractive, t)!,
contextMenuCancelBg: Color.lerp(contextMenuCancelBg, other.contextMenuCancelBg, t)!,
contextMenuCancelPressedBg: Color.lerp(contextMenuCancelPressedBg, other.contextMenuCancelPressedBg, t)!,
dmHeaderBg: Color.lerp(dmHeaderBg, other.dmHeaderBg, t)!,
Expand Down

0 comments on commit 4b70f9f

Please sign in to comment.