@@ -42,6 +42,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
4242 return ContentTheme ._(
4343 colorCodeBlockBackground: const HSLColor .fromAHSL (0.04 , 0 , 0 , 0 ).toColor (),
4444 colorDirectMentionBackground: const HSLColor .fromAHSL (0.2 , 240 , 0.7 , 0.7 ).toColor (),
45+ colorGroupMentionBackground: const HSLColor .fromAHSL (0.18 , 183 , 0.6 , 0.45 ).toColor (),
4546 colorGlobalTimeBackground: const HSLColor .fromAHSL (1 , 0 , 0 , 0.93 ).toColor (),
4647 colorGlobalTimeBorder: const HSLColor .fromAHSL (1 , 0 , 0 , 0.8 ).toColor (),
4748 colorLink: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor (),
@@ -76,6 +77,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
7677 return ContentTheme ._(
7778 colorCodeBlockBackground: const HSLColor .fromAHSL (0.04 , 0 , 0 , 1 ).toColor (),
7879 colorDirectMentionBackground: const HSLColor .fromAHSL (0.25 , 240 , 0.52 , 0.6 ).toColor (),
80+ colorGroupMentionBackground: const HSLColor .fromAHSL (0.20 , 183 , 0.52 , 0.4 ).toColor (),
7981 colorGlobalTimeBackground: const HSLColor .fromAHSL (0.2 , 0 , 0 , 0 ).toColor (),
8082 colorGlobalTimeBorder: const HSLColor .fromAHSL (0.4 , 0 , 0 , 0 ).toColor (),
8183 colorLink: const HSLColor .fromAHSL (1 , 200 , 1 , 0.4 ).toColor (), // the same as light in Web
@@ -109,6 +111,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
109111 ContentTheme ._({
110112 required this .colorCodeBlockBackground,
111113 required this .colorDirectMentionBackground,
114+ required this .colorGroupMentionBackground,
112115 required this .colorGlobalTimeBackground,
113116 required this .colorGlobalTimeBorder,
114117 required this .colorLink,
@@ -142,6 +145,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
142145
143146 final Color colorCodeBlockBackground;
144147 final Color colorDirectMentionBackground;
148+ final Color colorGroupMentionBackground;
145149 final Color colorGlobalTimeBackground;
146150 final Color colorGlobalTimeBorder;
147151 final Color colorLink;
@@ -203,6 +207,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
203207 ContentTheme copyWith ({
204208 Color ? colorCodeBlockBackground,
205209 Color ? colorDirectMentionBackground,
210+ Color ? colorGroupMentionBackground,
206211 Color ? colorGlobalTimeBackground,
207212 Color ? colorGlobalTimeBorder,
208213 Color ? colorLink,
@@ -226,6 +231,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
226231 return ContentTheme ._(
227232 colorCodeBlockBackground: colorCodeBlockBackground ?? this .colorCodeBlockBackground,
228233 colorDirectMentionBackground: colorDirectMentionBackground ?? this .colorDirectMentionBackground,
234+ colorGroupMentionBackground: colorGroupMentionBackground ?? this .colorGroupMentionBackground,
229235 colorGlobalTimeBackground: colorGlobalTimeBackground ?? this .colorGlobalTimeBackground,
230236 colorGlobalTimeBorder: colorGlobalTimeBorder ?? this .colorGlobalTimeBorder,
231237 colorLink: colorLink ?? this .colorLink,
@@ -256,6 +262,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
256262 return ContentTheme ._(
257263 colorCodeBlockBackground: Color .lerp (colorCodeBlockBackground, other.colorCodeBlockBackground, t)! ,
258264 colorDirectMentionBackground: Color .lerp (colorDirectMentionBackground, other.colorDirectMentionBackground, t)! ,
265+ colorGroupMentionBackground: Color .lerp (colorGroupMentionBackground, other.colorGroupMentionBackground, t)! ,
259266 colorGlobalTimeBackground: Color .lerp (colorGlobalTimeBackground, other.colorGlobalTimeBackground, t)! ,
260267 colorGlobalTimeBorder: Color .lerp (colorGlobalTimeBorder, other.colorGlobalTimeBorder, t)! ,
261268 colorLink: Color .lerp (colorLink, other.colorLink, t)! ,
@@ -1213,10 +1220,15 @@ class Mention extends StatelessWidget {
12131220 case WildcardMentionNode ():
12141221 }
12151222
1223+ final backgroundPillColor = switch (node) {
1224+ UserMentionNode () => contentTheme.colorDirectMentionBackground,
1225+ UserGroupMentionNode () || WildcardMentionNode ()
1226+ => contentTheme.colorGroupMentionBackground,
1227+ };
1228+
12161229 return Container (
12171230 decoration: BoxDecoration (
1218- // TODO(#646) different for wildcard mentions
1219- color: contentTheme.colorDirectMentionBackground,
1231+ color: backgroundPillColor,
12201232 borderRadius: const BorderRadius .all (Radius .circular (3 ))),
12211233 padding: const EdgeInsets .symmetric (horizontal: 0.2 * kBaseFontSize),
12221234 child: InlineContent (
0 commit comments