Skip to content

Commit

Permalink
[native] fix emoji keyboard theme colors
Browse files Browse the repository at this point in the history
Summary:
Small follow up diff to address comments in D8310.

In this diff I removed all the instances of the panel color family and the emoji keyboard specific colors and committed to using the modal color family. Please note I tried really hard to reuse existing color variables and to not introduce any new variables for this; however, this did lead me to using some variables that didn't "fit" the proper description even though it was the best fitting color. I will highlight this using inline comments and offer an alternate solution if we think the current variable name is not fitting well.

Test Plan:
Please see the screenshots below to confirm that the color themes for both dark and light mode okay. Also had @ted take a look irl

{F623989}

{F623988}

Reviewers: atul, kamil, ashoat

Reviewed By: kamil

Subscribers: ashoat, tomek, ted

Differential Revision: https://phab.comm.dev/D8433
  • Loading branch information
ginsueddy committed Jul 11, 2023
1 parent fae8e66 commit 1d7297d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
36 changes: 18 additions & 18 deletions native/components/emoji-keyboard.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,35 +92,35 @@ function EmojiKeyboard(props: Props): React.Node {

const theme = React.useMemo(
() => ({
knob: colors.emojiKeyboardKnob,
knob: colors.modalKnob,
container: colors.modalForeground,
header: colors.modalBackgroundLabel,
category: {
icon: colors.emojiKeyboardCategoryIcon,
iconActive: colors.panelForegroundLabel,
container: colors.panelInputBackground,
containerActive: colors.emojiKeyboardContainerActive,
icon: colors.modalButtonLabel,
iconActive: colors.modalButtonLabel,
container: colors.modalInputBackground,
containerActive: colors.modalInputForeground,
},
search: {
text: colors.panelForegroundLabel,
placeholder: colors.panelInputSecondaryForeground,
icon: colors.panelInputSecondaryForeground,
background: colors.panelInputBackground,
text: colors.modalForegroundLabel,
placeholder: colors.modalForegroundSecondaryLabel,
icon: colors.modalForegroundSecondaryLabel,
background: colors.modalInputBackground,
},
emoji: {
selected: colors.panelSecondaryForegroundBorder,
selected: colors.modalButton,
},
}),
[
colors.emojiKeyboardCategoryIcon,
colors.emojiKeyboardKnob,
colors.emojiKeyboardContainerActive,
colors.modalBackgroundLabel,
colors.modalKnob,
colors.modalForeground,
colors.panelForegroundLabel,
colors.panelInputBackground,
colors.panelInputSecondaryForeground,
colors.panelSecondaryForegroundBorder,
colors.modalBackgroundLabel,
colors.modalButtonLabel,
colors.modalInputBackground,
colors.modalInputForeground,
colors.modalForegroundLabel,
colors.modalForegroundSecondaryLabel,
colors.modalButton,
],
);

Expand Down
12 changes: 6 additions & 6 deletions native/themes/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const light = Object.freeze({
modalIosHighlightUnderlay: '#CCCCCCDD',
modalSubtext: designSystemColors.shadesWhite60,
modalSubtextLabel: designSystemColors.shadesBlack70,
modalInputBackground: designSystemColors.shadesWhite60,
modalInputForeground: designSystemColors.shadesWhite90,
modalKnob: designSystemColors.shadesWhite90,
navigationCard: designSystemColors.shadesWhite100,
navigationChevron: designSystemColors.shadesWhite60,
panelBackground: designSystemColors.shadesWhite90,
Expand Down Expand Up @@ -141,9 +144,6 @@ const light = Object.freeze({
secondaryButtonBorder: designSystemColors.shadesWhite100,
inviteLinkLinkColor: designSystemColors.shadesBlack100,
inviteLinkButtonBackground: designSystemColors.shadesWhite60,
emojiKeyboardKnob: designSystemColors.shadesWhite90,
emojiKeyboardCategoryIcon: designSystemColors.shadesBlack70,
emojiKeyboardContainerActive: designSystemColors.shadesWhite90,
});
export type Colors = $Exact<typeof light>;

Expand Down Expand Up @@ -192,6 +192,9 @@ const dark: Colors = Object.freeze({
modalIosHighlightUnderlay: '#AAAAAA88',
modalSubtext: designSystemColors.shadesBlack80,
modalSubtextLabel: '#AAAAAA',
modalInputBackground: designSystemColors.shadesBlack80,
modalInputForeground: designSystemColors.shadesBlack60,
modalKnob: designSystemColors.shadesWhite90,
navigationCard: '#2A2A2A',
navigationChevron: designSystemColors.shadesBlack70,
panelBackground: designSystemColors.shadesBlack100,
Expand Down Expand Up @@ -241,9 +244,6 @@ const dark: Colors = Object.freeze({
secondaryButtonBorder: designSystemColors.shadesWhite100,
inviteLinkLinkColor: designSystemColors.shadesWhite80,
inviteLinkButtonBackground: designSystemColors.shadesBlack80,
emojiKeyboardKnob: designSystemColors.shadesWhite100,
emojiKeyboardCategoryIcon: designSystemColors.shadesWhite70,
emojiKeyboardContainerActive: designSystemColors.shadesBlack60,
});
const colors = { light, dark };

Expand Down

0 comments on commit 1d7297d

Please sign in to comment.