Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP Staging] fix: Make the "@here" mention icon green #33634

Merged
merged 3 commits into from
Dec 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/MentionSuggestions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {useCallback} from 'react';
import {View} from 'react-native';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import getStyledTextArray from '@libs/GetStyledTextArray';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -30,7 +31,7 @@ type MentionSuggestionsProps = {
/** Array of suggested mentions */
mentions: Mention[];

/** Fired when the user selects an mention */
/** Fired when the user selects a mention */
onSelect: () => void;

/** Mention prefix that follows the @ sign */
Expand All @@ -41,7 +42,7 @@ type MentionSuggestionsProps = {
* When this value is false, the suggester will have a height of 2.5 items. When this value is true, the height can be up to 5 items. */
isMentionPickerLarge: boolean;

/** Meaures the parent container's position and dimensions. */
/** Measures the parent container's position and dimensions. */
measureParentContainer: () => void;
};

Expand All @@ -51,6 +52,7 @@ type MentionSuggestionsProps = {
const keyExtractor = (item: Mention) => item.alternateText;

function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSelect, isMentionPickerLarge, measureParentContainer = () => {}}: MentionSuggestionsProps) {
const theme = useTheme();
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
/**
Expand All @@ -70,6 +72,7 @@ function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSe
size={isIcon ? CONST.AVATAR_SIZE.MENTION_ICON : CONST.AVATAR_SIZE.SMALLER}
name={item.icons[0].name}
type={item.icons[0].type}
fill={theme.success}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line addition created problem. More details here: #33657

fallbackIcon={item.icons[0].fallbackIcon}
/>
</View>
Expand Down Expand Up @@ -117,6 +120,7 @@ function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSe
styles.flex1,
styles.mentionSuggestionsDisplayName,
styles.mentionSuggestionsHandle,
theme.success,
StyleUtils,
],
);
Expand Down
Loading