From 2b27cfbf50b8b6d7d0f5edb297d61279e8113ee3 Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Mon, 17 Aug 2020 23:23:15 -0700 Subject: [PATCH 1/4] keep keyboard open on submit on ios/android --- src/page/HomePage/Report/ReportHistoryCompose.js | 16 ++++++++++------ src/style/StyleSheet.js | 13 +++++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/page/HomePage/Report/ReportHistoryCompose.js b/src/page/HomePage/Report/ReportHistoryCompose.js index 9777c0a592dc..95cfa573f9e7 100644 --- a/src/page/HomePage/Report/ReportHistoryCompose.js +++ b/src/page/HomePage/Report/ReportHistoryCompose.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {View} from 'react-native'; +import {View, Text, TouchableOpacity} from 'react-native'; import styles from '../../../style/StyleSheet'; import TextInputFocusable from '../../../components/TextInputFocusable'; @@ -74,10 +74,9 @@ class ReportHistoryCompose extends React.Component { render() { return ( - + + + Send + ); } diff --git a/src/style/StyleSheet.js b/src/style/StyleSheet.js index 3311f27a7b07..4d9db2d57965 100644 --- a/src/style/StyleSheet.js +++ b/src/style/StyleSheet.js @@ -140,6 +140,7 @@ const styles = { color: colors.text, fontFamily: 'GTAmericaExp-Regular', padding: 12, + marginRight: 12, }, textInputReversed: { @@ -457,6 +458,18 @@ const styles = { paddingBottom: 20, paddingLeft: 20, paddingRight: 20, + display: 'flex', + justifyContent: 'flex-start', + }, + + chatItemSubmitButton: { + borderColor: colors.border, + borderRadius: 8, + borderWidth: 1, + minHeight: 40, + maxHeight: 60, + width: 60, + justifyContent: 'center', }, hamburgerOpenAbsolute: { From 12b142b4b433fc9297e1efdff0145107ee2ff409 Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Mon, 17 Aug 2020 23:53:32 -0700 Subject: [PATCH 2/4] remove unnecessary style --- src/style/StyleSheet.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/style/StyleSheet.js b/src/style/StyleSheet.js index 4d9db2d57965..a1d0b5a96b38 100644 --- a/src/style/StyleSheet.js +++ b/src/style/StyleSheet.js @@ -459,7 +459,6 @@ const styles = { paddingLeft: 20, paddingRight: 20, display: 'flex', - justifyContent: 'flex-start', }, chatItemSubmitButton: { From 11d06e6f0d2ab5953c557367ae5f427373b62fb2 Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Tue, 18 Aug 2020 10:10:13 -0700 Subject: [PATCH 3/4] clean up styles --- src/page/HomePage/Report/ReportHistoryCompose.js | 2 +- src/style/StyleSheet.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/page/HomePage/Report/ReportHistoryCompose.js b/src/page/HomePage/Report/ReportHistoryCompose.js index 95cfa573f9e7..52a9e1f1c746 100644 --- a/src/page/HomePage/Report/ReportHistoryCompose.js +++ b/src/page/HomePage/Report/ReportHistoryCompose.js @@ -85,7 +85,7 @@ class ReportHistoryCompose extends React.Component { placeholderTextColor="#7D8B8F" onChangeText={this.updateComment} onKeyPress={this.triggerSubmitShortcut} - style={[styles.textInput, styles.flex4]} + style={[styles.textInput, styles.flex4, styles.mr3]} value={this.state.comment} /> Date: Tue, 18 Aug 2020 13:13:06 -0700 Subject: [PATCH 4/4] updating the compose styles --- assets/images/icon-send.png | Bin 0 -> 678 bytes .../HomePage/Report/ReportHistoryCompose.js | 48 ++++++++++-------- src/style/StyleSheet.js | 32 ++++++++++-- 3 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 assets/images/icon-send.png diff --git a/assets/images/icon-send.png b/assets/images/icon-send.png new file mode 100644 index 0000000000000000000000000000000000000000..d943835597efd525c1477e3a3ab3dd35ad6b2af0 GIT binary patch literal 678 zcmV;X0$KfuP)R zF2px0%vYQ56ibhO;+hrRtj2t5zMy=t6~)G}P26oD$|s(KM)fD+*0)`(WapS3F?1JN zvghdjkbAGJ%xUQh(z2(x67DLJC1w;`irTULYjkI(KXQ+05H)(H^&{$b?a^MSdkrZ- zIkdN`lfH<1G{*f!H0VeAGph)Rf1s*YBiRM|vw~a%CN9p2Yv?BHV^S@{Yy&+K|D9hg z?PnM^?Tum^XiL0PuUZ=sJ|?B#GmTmKVkF+FSM9nGlWG~?0lP}PKJZ(pNwwrNtG-~k zNwu&$U=KB^79I!e0t`1PUEOh*l?y2M(tSu`Rws~-8v5}BoIrVy&}TT;zzzD-j~E6Y zv(gDvnU`6a1gOmZ)dgRb`K+uC;h{25voi5enWtIVa8Q}IS(!MfoW-nCuC)H3j#t-5 zF5$JZa^Z-|(=aO=mRc6cKEPB_D(_UHBDRxNR|n;>(6rxkE)>%91FLWx1Ic!)#Q*>R M07*qoM6N<$f*PqQbN~PV literal 0 HcmV?d00001 diff --git a/src/page/HomePage/Report/ReportHistoryCompose.js b/src/page/HomePage/Report/ReportHistoryCompose.js index 52a9e1f1c746..71e2c90051b0 100644 --- a/src/page/HomePage/Report/ReportHistoryCompose.js +++ b/src/page/HomePage/Report/ReportHistoryCompose.js @@ -1,8 +1,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {View, Text, TouchableOpacity} from 'react-native'; +import {View, Image, TouchableOpacity} from 'react-native'; import styles from '../../../style/StyleSheet'; import TextInputFocusable from '../../../components/TextInputFocusable'; +import sendIcon from '../../../../assets/images/icon-send.png'; const propTypes = { // A method to call when the form is submitted @@ -74,27 +75,30 @@ class ReportHistoryCompose extends React.Component { render() { return ( - - - - Send - + + + + + + + ); } diff --git a/src/style/StyleSheet.js b/src/style/StyleSheet.js index c1002f3c2a1a..dbc5248c07fb 100644 --- a/src/style/StyleSheet.js +++ b/src/style/StyleSheet.js @@ -138,6 +138,7 @@ const styles = { textInput: { backgroundColor: colors.componentBG, borderRadius: 8, + height: 40, borderColor: colors.border, borderWidth: 1, color: colors.text, @@ -464,16 +465,39 @@ const styles = { display: 'flex', }, - chatItemSubmitButton: { + chatItemComposeBox: { + backgroundColor: '#FFFFFF', + borderWidth: 1, borderColor: colors.border, borderRadius: 8, - borderWidth: 1, minHeight: 40, - maxHeight: 60, - width: 60, + }, + + textInputCompose: { + borderWidth: 0, + outline: 0, + height: 'auto', + minHeight: 38, + padding: 10, + }, + + chatItemSubmitButton: { + alignSelf: 'flex-end', + borderRadius: 6, + height: 32, + paddingTop: 8, + paddingRight: 6, + paddingBottom: 8, + paddingLeft: 6, + margin: 3, justifyContent: 'center', }, + chatItemSubmitButtonIcon: { + height: 20, + width: 20, + }, + hamburgerOpenAbsolute: { position: 'absolute', left: 0,