From 65edf96b211f0b3a238161bc7732ee1f99e4004c Mon Sep 17 00:00:00 2001 From: Maciej Dobosz Date: Mon, 21 Aug 2023 11:40:59 +0200 Subject: [PATCH 01/49] English and spanish translations --- src/languages/en.js | 15 +++++++++++---- src/languages/es.js | 16 +++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 19dbd9c63187..c0ed7b27a071 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -353,19 +353,23 @@ export default { }, }, sidebarScreen: { - fabAction: 'New chat', + chat: 'Chat', + room: 'Room', newChat: 'New chat', newGroup: 'New group', newRoom: 'New room', buttonSearch: 'Search', buttonMySettings: 'My settings', - fabNewChat: 'New chat (Floating action)', + fabNewChat: 'Send message', + fabNewChatExplained: 'Send message (Floating action)', chatPinned: 'Chat pinned', draftedMessage: 'Drafted message', listOfChatMessages: 'List of chat messages', listOfChats: 'List of chats', }, tabSelector: { + chat: 'Chat', + room: 'Room', manual: 'Manual', scan: 'Scan', distance: 'Distance', @@ -391,9 +395,10 @@ export default { amount: 'Amount', cash: 'Cash', split: 'Split', + addToSplit: 'Add to split', + splitBill: 'Split bill', request: 'Request', participants: 'Participants', - splitBill: 'Split bill', requestMoney: 'Request money', sendMoney: 'Send money', pay: 'Pay', @@ -862,7 +867,9 @@ export default { localTime: 'Local time', }, newChatPage: { + createChat: 'Create chat', createGroup: 'Create group', + addToGroup: 'Add to group', }, yearPickerPage: { year: 'Year', @@ -1410,7 +1417,7 @@ export default { openShortcutDialog: 'Opens the keyboard shortcuts dialog', escape: 'Escape dialogs', search: 'Open search dialog', - newGroup: 'New group screen', + newChat: 'New chat screen', copy: 'Copy comment', }, }, diff --git a/src/languages/es.js b/src/languages/es.js index bb3306417e17..605e6c3c5760 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -352,19 +352,22 @@ export default { }, }, sidebarScreen: { - fabAction: 'Nuevo chat', - newChat: 'Nuevo chat', + chat: 'Chat', + room: 'Sala', newGroup: 'Nuevo grupo', newRoom: 'Nueva sala de chat', buttonSearch: 'Buscar', buttonMySettings: 'Mi configuración', - fabNewChat: 'Nuevo chat', + fabNewChat: 'Enviar mensaje', + fabNewChatExplained: 'Enviar mensaje', chatPinned: 'Chat fijado', draftedMessage: 'Mensaje borrador', listOfChatMessages: 'Lista de mensajes del chat', listOfChats: 'lista de chats', }, tabSelector: { + chat: 'Chat', + room: 'Sala', manual: 'Manual', scan: 'Escanear', distance: 'Distancia', @@ -390,9 +393,10 @@ export default { amount: 'Importe', cash: 'Efectivo', split: 'Dividir', + addToSplit: 'Añadir para dividir', + splitBill: 'Dividir factura', request: 'Solicitar', participants: 'Participantes', - splitBill: 'Dividir factura', requestMoney: 'Pedir dinero', sendMoney: 'Enviar dinero', pay: 'Pagar', @@ -866,7 +870,9 @@ export default { localTime: 'Hora local', }, newChatPage: { + createChat: 'Crear chat', createGroup: 'Crear grupo', + addToGroup: 'Añadir al grupo', }, yearPickerPage: { year: 'Año', @@ -1437,7 +1443,7 @@ export default { openShortcutDialog: 'Abre el cuadro de diálogo de métodos abreviados de teclado', escape: 'Diálogos de escape', search: 'Abrir diálogo de búsqueda', - newGroup: 'Nueva pantalla de grupo', + newChat: 'Nueva pantalla de chat', copy: 'Copiar comentario', }, }, From d0ef97a5a3354cf25a2629325ba24a679f1b435a Mon Sep 17 00:00:00 2001 From: Maciej Dobosz Date: Mon, 21 Aug 2023 11:45:41 +0200 Subject: [PATCH 02/49] Assign icons to new tabs --- src/components/TabSelector/TabSelector.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/TabSelector/TabSelector.js b/src/components/TabSelector/TabSelector.js index 3e0ff7eb4e99..2d3901a237fe 100644 --- a/src/components/TabSelector/TabSelector.js +++ b/src/components/TabSelector/TabSelector.js @@ -29,12 +29,18 @@ const defaultProps = { const getIcon = (route) => { switch (route) { + case CONST.TAB.MANUAL: + return Expensicons.Pencil; case CONST.TAB.SCAN: return Expensicons.Receipt; + case CONST.TAB.NEW_CHAT: + return Expensicons.User; + case CONST.TAB.NEW_ROOM: + return Expensicons.Hashtag; case CONST.TAB.DISTANCE: return Expensicons.Car; default: - return Expensicons.Pencil; + throw new Error(`Route ${route} has no icon set.`); } }; From 3e61212d2bc8a441dfb872be6c446fbb32cd947d Mon Sep 17 00:00:00 2001 From: Maciej Dobosz Date: Mon, 21 Aug 2023 11:57:31 +0200 Subject: [PATCH 03/49] Checkbox can become a button --- src/components/OptionRow.js | 29 ++++++++++++++++++- src/components/OptionsList/BaseOptionsList.js | 3 ++ .../OptionsSelector/BaseOptionsSelector.js | 3 ++ .../optionsSelectorPropTypes.js | 9 ++++++ 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/components/OptionRow.js b/src/components/OptionRow.js index adaa4457bbd9..e65b2cf5eda8 100644 --- a/src/components/OptionRow.js +++ b/src/components/OptionRow.js @@ -8,6 +8,7 @@ import * as StyleUtils from '../styles/StyleUtils'; import optionPropTypes from './optionPropTypes'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; +import Button from './Button'; import MultipleAvatars from './MultipleAvatars'; import Hoverable from './Hoverable'; import DisplayNames from './DisplayNames'; @@ -39,6 +40,15 @@ const propTypes = { /** Whether we should show the selected state */ showSelectedState: PropTypes.bool, + /** Whether to show a button pill instead of a tickbox */ + shouldShowSelectedStateAsButton: PropTypes.bool, + + /** Text for button pill */ + selectedStateButtonText: PropTypes.string, + + /** Callback to fire when the multiple selector (tickbox or button) is clicked */ + onSelectedStatePressed: PropTypes.func, + /** Whether this item is selected */ isSelected: PropTypes.bool, @@ -65,6 +75,9 @@ const propTypes = { const defaultProps = { hoverStyle: styles.sidebarLinkHover, showSelectedState: false, + shouldShowSelectedStateAsButton: false, + selectedStateButtonText: 'Select', + onSelectedStatePressed: undefined, isSelected: false, boldStyle: false, showTitleTooltip: false, @@ -248,7 +261,21 @@ class OptionRow extends Component { /> )} - {this.props.showSelectedState && } + {this.props.showSelectedState && ( + <> + {this.props.shouldShowSelectedStateAsButton && !this.props.isSelected ? ( +