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

Fix display of report typing indicator and participant local time #4020

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export default {
notifications: 'Notifications',
noResultsFound: 'No results found',
deletedCommentMessage: 'Comment deleted',
timePrefix: 'It\'s',
conjunctionFor: 'for',
},
attachmentPicker: {
cameraPermissionRequired: 'Camera Permission Required',
Expand Down Expand Up @@ -106,7 +108,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}`,
},
contextMenuItem: {
copyToClipboard: 'Copy to Clipboard',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default {
notifications: 'Notificaciones',
noResultsFound: 'No se han encontrado resultados',
deletedCommentMessage: 'Comentario borrado',
timePrefix: 'Son las',
conjunctionFor: 'para',
},
attachmentPicker: {
cameraPermissionRequired: 'Se necesita permiso para usar la cámara',
Expand Down Expand Up @@ -101,7 +103,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