Skip to content

Commit 51d8bfa

Browse files
committed
Highlight message author name and Session id in dark themes.
1 parent 30d8e95 commit 51d8bfa

File tree

7 files changed

+27
-0
lines changed

7 files changed

+27
-0
lines changed

stylesheets/_modules.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@
275275
}
276276
}
277277

278+
.module-message__author {
279+
color: var(--text-author-color);
280+
}
281+
278282
.module-conversation__user__profile-name,
279283
.module-message__author__profile-name {
280284
font-style: italic;

ts/themes/classicDark.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export const classicDark: ThemeColorVariables = {
2525
'--message-bubbles-sent-text-color': 'var(--background-primary-color)',
2626
'--message-bubbles-received-text-color': 'var(--text-primary-color)',
2727

28+
'--text-author-color': THEMES.CLASSIC_DARK.HIGHLIGHT,
29+
2830
'--menu-button-background-color': 'var(--primary-color)',
2931
'--menu-button-background-hover-color': THEMES.CLASSIC_DARK.COLOR4,
3032
'--menu-button-icon-color': THEMES.CLASSIC_DARK.COLOR6,

ts/themes/classicLight.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export const classicLight: ThemeColorVariables = {
2525
'--message-bubbles-sent-text-color': 'var(--text-primary-color)',
2626
'--message-bubbles-received-text-color': 'var(--text-primary-color)',
2727

28+
'--text-author-color': THEMES.CLASSIC_LIGHT.HIGHLIGHT,
29+
2830
'--menu-button-background-color': THEMES.CLASSIC_LIGHT.COLOR0,
2931
'--menu-button-background-hover-color': THEMES.CLASSIC_LIGHT.COLOR1,
3032
'--menu-button-icon-color': THEMES.CLASSIC_LIGHT.COLOR6,

ts/themes/constants/colors.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ type ThemeColors = {
119119
PRIMARY: string;
120120
DANGER: string;
121121
DISABLED: string;
122+
HIGHLIGHT: string;
122123
COLOR0: string;
123124
COLOR1: string;
124125
COLOR2: string;
@@ -134,6 +135,7 @@ type Themes = Record<ThemeNames, ThemeColors>;
134135
const classicLightPrimary = primaryGreen;
135136
const classicLightDanger = dangerLight;
136137
const classicLightDisabled = disabledLight;
138+
const classicLightHighlight = '#FFFFFF';
137139
const classicLight0 = '#000000';
138140
const classicLight1 = '#6D6D6D';
139141
const classicLight2 = '#A1A2A1';
@@ -146,6 +148,7 @@ const classicLight6 = '#FFFFFF';
146148
const classicDarkPrimary = primaryGreen;
147149
const classicDarkDanger = dangerDark;
148150
const classicDarkDisabled = disabledDark;
151+
const classicDarkHighlight = 'LightYellow';
149152
const classicDark0 = '#000000';
150153
const classicDark1 = '#1B1B1B';
151154
const classicDark2 = '#2D2D2D';
@@ -158,6 +161,7 @@ const classicDark6 = '#FFFFFF';
158161
const oceanLightPrimary = primaryBlue;
159162
const oceanLightDanger = dangerLight;
160163
const oceanLightDisabled = disabledLight;
164+
const oceanLightHighlight = '#FCFFFF';
161165
const oceanLight0 = '#000000';
162166
const oceanLight1 = '#19345D';
163167
const oceanLight2 = '#6A6E90';
@@ -171,6 +175,7 @@ const oceanLight7 = '#FCFFFF';
171175
const oceanDarkPrimary = primaryBlue;
172176
const oceanDarkDanger = dangerDark;
173177
const oceanDarkDisabled = disabledDark;
178+
const oceanDarkHighlight = 'LightYellow';
174179
const oceanDark0 = '#000000';
175180
const oceanDark1 = '#1A1C28';
176181
const oceanDark2 = '#252735';
@@ -185,6 +190,7 @@ const THEMES: Themes = {
185190
PRIMARY: classicLightPrimary,
186191
DANGER: classicLightDanger,
187192
DISABLED: classicLightDisabled,
193+
HIGHLIGHT: classicLightHighlight,
188194
COLOR0: classicLight0,
189195
COLOR1: classicLight1,
190196
COLOR2: classicLight2,
@@ -197,6 +203,7 @@ const THEMES: Themes = {
197203
PRIMARY: classicDarkPrimary,
198204
DANGER: classicDarkDanger,
199205
DISABLED: classicDarkDisabled,
206+
HIGHLIGHT: classicDarkHighlight,
200207
COLOR0: classicDark0,
201208
COLOR1: classicDark1,
202209
COLOR2: classicDark2,
@@ -209,6 +216,7 @@ const THEMES: Themes = {
209216
PRIMARY: oceanLightPrimary,
210217
DANGER: oceanLightDanger,
211218
DISABLED: oceanLightDisabled,
219+
HIGHLIGHT: oceanLightHighlight,
212220
COLOR0: oceanLight0,
213221
COLOR1: oceanLight1,
214222
COLOR2: oceanLight2,
@@ -222,6 +230,7 @@ const THEMES: Themes = {
222230
PRIMARY: oceanDarkPrimary,
223231
DANGER: oceanDarkDanger,
224232
DISABLED: oceanDarkDisabled,
233+
HIGHLIGHT: oceanDarkHighlight,
225234
COLOR0: oceanDark0,
226235
COLOR1: oceanDark1,
227236
COLOR2: oceanDark2,
@@ -244,6 +253,7 @@ export type StyleSessionSwitcher = {
244253
border: string;
245254
receivedBackground: string;
246255
sentBackground: string;
256+
highlight: string;
247257
};
248258

249259
export const getThemeColors = (): Array<ThemeType> => [
@@ -255,6 +265,7 @@ export const getThemeColors = (): Array<ThemeType> => [
255265
border: THEMES.CLASSIC_DARK.COLOR3,
256266
receivedBackground: THEMES.CLASSIC_DARK.COLOR2,
257267
sentBackground: THEMES.CLASSIC_DARK.PRIMARY,
268+
highlight: THEMES.CLASSIC_DARK.HIGHLIGHT,
258269
},
259270
},
260271
{
@@ -265,6 +276,7 @@ export const getThemeColors = (): Array<ThemeType> => [
265276
border: THEMES.CLASSIC_LIGHT.COLOR3,
266277
receivedBackground: THEMES.CLASSIC_LIGHT.COLOR4,
267278
sentBackground: THEMES.CLASSIC_LIGHT.PRIMARY,
279+
highlight: THEMES.CLASSIC_LIGHT.HIGHLIGHT,
268280
},
269281
},
270282
{
@@ -275,6 +287,7 @@ export const getThemeColors = (): Array<ThemeType> => [
275287
border: THEMES.OCEAN_DARK.COLOR4,
276288
receivedBackground: THEMES.OCEAN_DARK.COLOR4,
277289
sentBackground: THEMES.OCEAN_DARK.PRIMARY,
290+
highlight: THEMES.OCEAN_DARK.HIGHLIGHT,
278291
},
279292
},
280293
{
@@ -286,6 +299,7 @@ export const getThemeColors = (): Array<ThemeType> => [
286299
border: THEMES.OCEAN_LIGHT.COLOR3,
287300
receivedBackground: THEMES.OCEAN_LIGHT.COLOR1,
288301
sentBackground: THEMES.OCEAN_LIGHT.PRIMARY,
302+
highlight: THEMES.OCEAN_LIGHT.HIGHLIGHT,
289303
},
290304
},
291305
];

ts/themes/oceanDark.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export const oceanDark: ThemeColorVariables = {
2626
'--message-bubbles-sent-text-color': THEMES.OCEAN_DARK.COLOR0,
2727
'--message-bubbles-received-text-color': 'var(--text-primary-color)',
2828

29+
'--text-author-color': THEMES.OCEAN_DARK.HIGHLIGHT,
30+
2931
'--menu-button-background-color': 'var(--primary-color)',
3032
'--menu-button-background-hover-color': THEMES.OCEAN_DARK.COLOR6,
3133
'--menu-button-icon-color': THEMES.OCEAN_DARK.COLOR7!,

ts/themes/oceanLight.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export const oceanLight: ThemeColorVariables = {
2626
'--message-bubbles-sent-text-color': 'var(--text-primary-color)',
2727
'--message-bubbles-received-text-color': 'var(--text-primary-color)',
2828

29+
'--text-author-color': THEMES.OCEAN_LIGHT.HIGHLIGHT,
30+
2931
'--menu-button-background-color': 'var(--primary-color)',
3032
'--menu-button-background-hover-color': THEMES.OCEAN_LIGHT.COLOR3,
3133
'--menu-button-icon-color': THEMES.OCEAN_LIGHT.COLOR1,

ts/themes/variableColors.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type ThemeColorVariables = {
1111
'--text-primary-color': string;
1212
'--text-secondary-color': string;
1313
'--text-selection-color': string;
14+
'--text-author-color': string;
1415

1516
/* Borders */
1617
'--border-color': string;

0 commit comments

Comments
 (0)