Skip to content

Commit

Permalink
[MA-14]: Update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
SaurabhSharma-884 committed Dec 13, 2024
1 parent 70c5e7f commit ec522d2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function EmojiPickerItem({emoji, rowIndex, isSelected, onClick, onMouseOver}: Pr
let content;

if (isSystemEmoji(emoji)) {
const emojiName = emoji.short_name ? emoji.short_name : emoji.name;
const emojiUnified = emoji.unified ? emoji.unified.toLowerCase() : emoji.name.toLowerCase();

content = (
Expand All @@ -65,15 +64,6 @@ function EmojiPickerItem({emoji, rowIndex, isSelected, onClick, onMouseOver}: Pr
src={imgTrans}
className={`emojisprite emoji-category-${emoji.category} emoji-${emojiUnified}`}
id={`emoji-${emojiUnified}`}
aria-label={formatMessage(
{
id: 'emoji_picker_item.emoji_aria_label',
defaultMessage: '{emojiName} emoji',
},
{
emojiName: (emojiName).replace(/_/g, ' '),
},
)}
/>
);
} else {
Expand All @@ -95,7 +85,16 @@ function EmojiPickerItem({emoji, rowIndex, isSelected, onClick, onMouseOver}: Pr
data-testid='emojiItem'
tabIndex={-1}
type='button'
aria-label={isSystemEmoji(emoji) ? emoji.short_name : emoji.name}
id={emoji.name.toLocaleLowerCase().replaceAll(' ', '_')}
aria-label={formatMessage(
{
id: 'emoji_picker_item.emoji_aria_label',
defaultMessage: '{emojiName} emoji',
},
{
emojiName: (isSystemEmoji(emoji) ? emoji.short_name : emoji.name).replace(/_/g, ' '),
},
)}
>
{content}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ const EmojiPicker = ({
return;
}

searchInputRef.current?.setAttribute('aria-activedescendant', newCursorEmoji.name.toLocaleLowerCase().replaceAll(' ', '_'));
setCursor({
rowIndex: newCursor.rowIndex,
emojiId: newCursor.emojiId,
Expand Down
2 changes: 1 addition & 1 deletion webapp/channels/src/sass/components/_emoticons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ $emoji-footer-height: $emoji-footer-border-width + $emoji-half-height + $emoji-
height: 36px;
align-items: center;
justify-content: center;
border:none;
border: none;
border-radius: 3px;
background-color: transparent;
cursor: pointer;
Expand Down

0 comments on commit ec522d2

Please sign in to comment.