-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Enlarge emojis in other contexts than just single character messages #47547
Changes from 43 commits
8d93e58
8fdd879
1a776ab
957737a
18997d9
27fb058
3ab61f4
2b0caa2
e750501
3175d40
8b0828b
776aacd
6981d7c
41ffb05
2007c58
9250cd9
46ddde2
2dd7773
cc8e8b1
435e777
d8a3fd2
6ef2595
25a4ee9
7cf9b77
3af678f
272a32d
87e41e5
dda7fdf
0705fee
8ecc202
3e2f369
4f4ca61
9c30d73
528c08f
eb3a958
1befeeb
ba756a5
4713c7e
35af453
70190a4
743d3c2
bce816d
9a4883b
cde40ee
8e703d2
592dc56
8010e02
b2fe231
0c14e87
8241ac7
4c584f0
9d4a4e2
8457803
471c98e
8d036e7
921b364
582d4ba
068a496
5301fe8
fb197bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2643,8 +2643,8 @@ const CONST = { | |
|
||
// eslint-disable-next-line max-len, no-misleading-character-class | ||
EMOJI: /[\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, | ||
// eslint-disable-next-line max-len, no-misleading-character-class | ||
EMOJIS: /[\p{Extended_Pictographic}](\u200D[\p{Extended_Pictographic}]|[\u{1F3FB}-\u{1F3FF}]|[\u{E0020}-\u{E007F}]|\uFE0F|\u20E3)*|[\u{1F1E6}-\u{1F1FF}]{2}|[#*0-9]\uFE0F?\u20E3/gu, | ||
// eslint-disable-next-line max-len, no-misleading-character-class, no-empty-character-class | ||
EMOJIS: /[\p{Extended_Pictographic}](\u200D[\p{Extended_Pictographic}]|[\u{1F3FB}-\u{1F3FF}]|[\u{E0020}-\u{E007F}]|\uFE0F|\u20E3)*|[\u{1F1E6}-\u{1F1FF}]{2}|[#*0-9]\uFE0F?\u20E3/du, | ||
// eslint-disable-next-line max-len, no-misleading-character-class | ||
EMOJI_SKIN_TONES: /[\u{1f3fb}-\u{1f3ff}]/gu, | ||
|
||
|
@@ -2681,6 +2681,10 @@ const CONST = { | |
return new RegExp(`[\\n\\s]|${this.SPECIAL_CHAR.source}|${this.EMOJI.source}`, 'gu'); | ||
}, | ||
|
||
get ALL_EMOJIS() { | ||
return new RegExp(this.EMOJIS, this.EMOJIS.flags.concat('g')); | ||
Comment on lines
+3010
to
+3011
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we even need this, or could we directly add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @francoisl I think the answer to your question is here: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, thanks. |
||
}, | ||
|
||
MERGED_ACCOUNT_PREFIX: /^(MERGED_\d+@)/, | ||
ROUTES: { | ||
VALIDATE_LOGIN: /\/v($|(\/\/*))/, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import Text from '@components/Text'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import * as EmojiUtils from '@libs/EmojiUtils'; | ||
import type WorkspacesListRowDisplayNameProps from './types'; | ||
|
||
function WorkspacesListRowDisplayName({isDeleted, ownerName}: WorkspacesListRowDisplayNameProps) { | ||
const styles = useThemeStyles(); | ||
const processedOwnerName = EmojiUtils.splitTextWithEmojis(ownerName); | ||
|
||
return ( | ||
<Text | ||
numberOfLines={1} | ||
style={[styles.labelStrong, isDeleted ? styles.offlineFeedback.deleted : {}]} | ||
> | ||
{processedOwnerName.length !== 0 | ||
? processedOwnerName.map(({text, isEmoji}) => | ||
isEmoji ? <Text style={[styles.labelStrong, isDeleted ? styles.offlineFeedback.deleted : {}, styles.emojisWithTextFontFamily]}>{text}</Text> : text, | ||
) | ||
: ownerName} | ||
</Text> | ||
); | ||
} | ||
|
||
WorkspacesListRowDisplayName.displayName = 'WorkspacesListRowDisplayName'; | ||
|
||
export default WorkspacesListRowDisplayName; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import Text from '@components/Text'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import type WorkspacesListRowDisplayNameProps from './types'; | ||
|
||
function WorkspacesListRowDisplayName({isDeleted, ownerName}: WorkspacesListRowDisplayNameProps) { | ||
const styles = useThemeStyles(); | ||
|
||
return ( | ||
<Text | ||
numberOfLines={1} | ||
style={[styles.labelStrong, isDeleted ? styles.offlineFeedback.deleted : {}]} | ||
> | ||
{ownerName} | ||
</Text> | ||
); | ||
} | ||
|
||
WorkspacesListRowDisplayName.displayName = 'WorkspacesListRowDisplayName'; | ||
|
||
export default WorkspacesListRowDisplayName; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type WorkspacesListRowDisplayNameProps = { | ||
/** Should the deleted style be applied */ | ||
isDeleted: boolean; | ||
|
||
/** Workspace owner name */ | ||
ownerName: string; | ||
}; | ||
|
||
export default WorkspacesListRowDisplayNameProps; |
pecanoro marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the inline images were added in version
0.1.145,
you can only bump it to0.1.144
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I need at least
0.1.146
cause it has web fixes for this pr...