Skip to content

Commit

Permalink
Merge pull request #4020 from Expensify/Rory-FixUserTypingIndicator
Browse files Browse the repository at this point in the history
Fix display of report typing indicator and participant local time

(cherry picked from commit 0639c67)
  • Loading branch information
Beamanator authored and OSBotify committed Jul 14, 2021
1 parent ef752cd commit 53fd87c
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 20 deletions.
7 changes: 6 additions & 1 deletion src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export default {
send: 'Send',
notifications: 'Notifications',
noResultsFound: 'No results found',
<<<<<<< HEAD
=======
deletedCommentMessage: 'Comment deleted',
timePrefix: 'It\'s',
conjunctionFor: 'for',
>>>>>>> 0639c6771 (Merge pull request #4020 from Expensify/Rory-FixUserTypingIndicator)
},
attachmentPicker: {
cameraPermissionRequired: 'Camera Permission Required',
Expand Down Expand Up @@ -105,7 +111,6 @@ export default {
blockedFromConcierge: 'Communication is barred',
youAppearToBeOffline: 'You appear to be offline.',
fileUploadFailed: 'Upload Failed. File is not supported.',
localTime: ({user, time}) => `It's ${time} for ${user}`,
},
reportActionContextMenu: {
copyToClipboard: 'Copy to Clipboard',
Expand Down
7 changes: 6 additions & 1 deletion src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export default {
send: 'Enviar',
notifications: 'Notificaciones',
noResultsFound: 'No se han encontrado resultados',
<<<<<<< HEAD
=======
deletedCommentMessage: 'Comentario borrado',
timePrefix: 'Son las',
conjunctionFor: 'para',
>>>>>>> 0639c6771 (Merge pull request #4020 from Expensify/Rory-FixUserTypingIndicator)
},
attachmentPicker: {
cameraPermissionRequired: 'Se necesita permiso para usar la cámara',
Expand Down Expand Up @@ -100,7 +106,6 @@ export default {
writeSomething: 'Escribe algo...',
blockedFromConcierge: 'Comunicación no permitida',
youAppearToBeOffline: 'Parece que estás desconectado.',
localTime: ({user, time}) => `Son las ${time} para ${user}`,
},
reportActionContextMenu: {
copyToClipboard: 'Copiar al Portapapeles',
Expand Down
31 changes: 17 additions & 14 deletions src/pages/home/report/ParticipantLocalTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,24 @@ class ParticipantLocalTime extends React.Component {
return (
isReportRecipientLocalTimeReady ? (
<View style={[styles.chatItemComposeSecondaryRow]}>
<ExpensiText
style={[
styles.chatItemComposeSecondaryRowSubText,
styles.chatItemComposeSecondaryRowOffset,
]}
numberOfLines={1}
<View style={[
styles.chatItemComposeSecondaryRowOffset,
styles.flexRow,
styles.alignItemsCenter]}
>
{this.props.translate(
'reportActionCompose.localTime',
{
user: reportRecipientDisplayName,
time: this.state.localTime,
},
)}
</ExpensiText>
<ExpensiText style={[styles.chatItemComposeSecondaryRowSubText, styles.mr1]}>
{this.props.translate('common.timePrefix')}
</ExpensiText>
<ExpensiText style={[styles.textMicroSupportingBold, styles.mr1]}>
{this.state.localTime}
</ExpensiText>
<ExpensiText style={[styles.chatItemComposeSecondaryRowSubText, styles.mr1]}>
{this.props.translate('common.conjunctionFor')}
</ExpensiText>
<ExpensiText style={[styles.textMicroSupportingBold]}>
{reportRecipientDisplayName}
</ExpensiText>
</View>
</View>
)
: <View style={[styles.chatItemComposeSecondaryRow]} />
Expand Down
14 changes: 10 additions & 4 deletions src/pages/home/report/ReportTypingIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class ReportTypingIndicator extends React.Component {
styles.chatItemComposeSecondaryRowOffset,
]}
>
<Text style={[styles.textStrong]}>{getDisplayName(this.state.usersTyping[0])}</Text>
<Text style={[styles.textMicroSupportingBold]}>
{getDisplayName(this.state.usersTyping[0])}
</Text>
{` ${this.props.translate('reportTypingIndicator.isTyping')}`}
</Text>
</View>
Expand All @@ -72,9 +74,13 @@ class ReportTypingIndicator extends React.Component {
styles.chatItemComposeSecondaryRowOffset,
]}
>
<Text style={[styles.textStrong]}>{getDisplayName(this.state.usersTyping[0])}</Text>
<Text style={[styles.textMicroSupportingBold]}>
{getDisplayName(this.state.usersTyping[0])}
</Text>
{` ${this.props.translate('common.and')} `}
<Text style={[styles.textStrong]}>{getDisplayName(this.state.usersTyping[1])}</Text>
<Text style={[styles.textMicroSupportingBold]}>
{getDisplayName(this.state.usersTyping[1])}
</Text>
{` ${this.props.translate('reportTypingIndicator.areTyping')}`}
</Text>
</View>
Expand All @@ -87,7 +93,7 @@ class ReportTypingIndicator extends React.Component {
styles.chatItemComposeSecondaryRowOffset,
]}
>
<Text style={[styles.textStrong]}>
<Text style={[styles.textMicroSupportingBold]}>
{this.props.translate('reportTypingIndicator.multipleUsers')}
</Text>
{` ${this.props.translate('reportTypingIndicator.areTyping')}`}
Expand Down
8 changes: 8 additions & 0 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ const styles = {
lineHeight: 14,
},

textMicroSupportingBold: {
color: themeColors.textSupporting,
fontFamily: fontFamily.GTA_BOLD,
fontWeight: fontWeightBold,
fontSize: variables.fontSizeSmall,
lineHeight: 14,
},

textLarge: {
fontSize: variables.fontSizeLarge,
},
Expand Down

0 comments on commit 53fd87c

Please sign in to comment.