From 1fc8471d23011ac86a378caf879dbb32a749d779 Mon Sep 17 00:00:00 2001 From: CamilaRivera Date: Tue, 28 Dec 2021 12:08:04 -0300 Subject: [PATCH 1/9] Add autoCapitalize prop Add autoCapitalize value none for WorkspaceNewRoomPage --- src/components/TextInputWithLabel.js | 3 +++ src/components/TextInputWithPrefix/index.android.js | 4 ++++ src/components/TextInputWithPrefix/index.js | 3 +++ src/pages/workspace/WorkspaceNewRoomPage.js | 1 + 4 files changed, 11 insertions(+) diff --git a/src/components/TextInputWithLabel.js b/src/components/TextInputWithLabel.js index 14b0a1bb2ac2..8a963ca69bfe 100644 --- a/src/components/TextInputWithLabel.js +++ b/src/components/TextInputWithLabel.js @@ -34,6 +34,8 @@ const propTypes = { /** Callback to execute when the text input is modified */ onChangeText: PropTypes.func, + + autoCapitalize: PropTypes.string, }; const defaultProps = { @@ -46,6 +48,7 @@ const defaultProps = { disabled: false, placeholder: '', onChangeText: () => {}, + autoCapitalize: 'sentences', // React native default }; const TextInputWithLabel = props => ( diff --git a/src/components/TextInputWithPrefix/index.android.js b/src/components/TextInputWithPrefix/index.android.js index 257f1e592886..9d5ea3b8e053 100644 --- a/src/components/TextInputWithPrefix/index.android.js +++ b/src/components/TextInputWithPrefix/index.android.js @@ -18,6 +18,8 @@ const propTypes = { /** Callback to execute the text input is modified */ onChangeText: PropTypes.func, + + autoCapitalize: PropTypes.string, }; const defaultProps = { @@ -25,6 +27,7 @@ const defaultProps = { prefixCharacter: '', disabled: false, onChangeText: () => {}, + autoCapitalize: 'sentences', // React native default }; const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter) @@ -46,6 +49,7 @@ const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter) styles.noOutline, {height: 40}, ]} + autoCapitalize={props.autoCapitalize} onChangeText={text => props.onChangeText(`${props.prefixCharacter}${text}`)} // eslint-disable-next-line react/jsx-props-no-spreading {..._.omit(props, ['prefixCharacter', 'errorText', 'onChangeText'])} diff --git a/src/components/TextInputWithPrefix/index.js b/src/components/TextInputWithPrefix/index.js index 8ac388083f7a..7a4a59410553 100644 --- a/src/components/TextInputWithPrefix/index.js +++ b/src/components/TextInputWithPrefix/index.js @@ -18,6 +18,8 @@ const propTypes = { /** Callback to execute the text input is modified */ onChangeText: PropTypes.func, + + autoCapitalize: PropTypes.string, }; const defaultProps = { @@ -25,6 +27,7 @@ const defaultProps = { prefixCharacter: '', disabled: false, onChangeText: () => {}, + autoCapitalize: 'sentences', // React native default }; const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter) diff --git a/src/pages/workspace/WorkspaceNewRoomPage.js b/src/pages/workspace/WorkspaceNewRoomPage.js index 7c5d3eeed700..b44ab94cc8ea 100644 --- a/src/pages/workspace/WorkspaceNewRoomPage.js +++ b/src/pages/workspace/WorkspaceNewRoomPage.js @@ -150,6 +150,7 @@ class WorkspaceNewRoomPage extends React.Component { onChangeText={roomName => this.setState({roomName: this.checkAndModifyRoomName(roomName)})} value={this.state.roomName.substr(1)} errorText={this.state.error} + autoCapitalize="none" /> Date: Tue, 28 Dec 2021 20:33:06 -0300 Subject: [PATCH 2/9] Add comments --- src/components/TextInputWithLabel.js | 3 ++- src/components/TextInputWithPrefix/index.android.js | 3 ++- src/components/TextInputWithPrefix/index.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/TextInputWithLabel.js b/src/components/TextInputWithLabel.js index 8a963ca69bfe..096dcf711c8e 100644 --- a/src/components/TextInputWithLabel.js +++ b/src/components/TextInputWithLabel.js @@ -35,6 +35,7 @@ const propTypes = { /** Callback to execute when the text input is modified */ onChangeText: PropTypes.func, + /** Whether to automatically capitalize certain characters */ autoCapitalize: PropTypes.string, }; @@ -48,7 +49,7 @@ const defaultProps = { disabled: false, placeholder: '', onChangeText: () => {}, - autoCapitalize: 'sentences', // React native default + autoCapitalize: 'sentences', // React native TextInput's default }; const TextInputWithLabel = props => ( diff --git a/src/components/TextInputWithPrefix/index.android.js b/src/components/TextInputWithPrefix/index.android.js index 9d5ea3b8e053..be408a0862a3 100644 --- a/src/components/TextInputWithPrefix/index.android.js +++ b/src/components/TextInputWithPrefix/index.android.js @@ -19,6 +19,7 @@ const propTypes = { /** Callback to execute the text input is modified */ onChangeText: PropTypes.func, + /** Whether to automatically capitalize certain characters */ autoCapitalize: PropTypes.string, }; @@ -27,7 +28,7 @@ const defaultProps = { prefixCharacter: '', disabled: false, onChangeText: () => {}, - autoCapitalize: 'sentences', // React native default + autoCapitalize: 'sentences', // React native TextInput's default }; const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter) diff --git a/src/components/TextInputWithPrefix/index.js b/src/components/TextInputWithPrefix/index.js index 7a4a59410553..8946d9e340e9 100644 --- a/src/components/TextInputWithPrefix/index.js +++ b/src/components/TextInputWithPrefix/index.js @@ -19,6 +19,7 @@ const propTypes = { /** Callback to execute the text input is modified */ onChangeText: PropTypes.func, + /** Whether to automatically capitalize certain characters */ autoCapitalize: PropTypes.string, }; @@ -27,7 +28,7 @@ const defaultProps = { prefixCharacter: '', disabled: false, onChangeText: () => {}, - autoCapitalize: 'sentences', // React native default + autoCapitalize: 'sentences', // React native TextInput's default }; const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter) From 537c617c667e22ad311ff673f9275b40f7b732e2 Mon Sep 17 00:00:00 2001 From: CamilaRivera <47149004+CamilaRivera@users.noreply.github.com> Date: Wed, 29 Dec 2021 07:17:24 -0800 Subject: [PATCH 3/9] Update src/components/TextInputWithPrefix/index.android.js Co-authored-by: Rajat Parashar --- src/components/TextInputWithPrefix/index.android.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/TextInputWithPrefix/index.android.js b/src/components/TextInputWithPrefix/index.android.js index be408a0862a3..1d1b04adeb8f 100644 --- a/src/components/TextInputWithPrefix/index.android.js +++ b/src/components/TextInputWithPrefix/index.android.js @@ -50,7 +50,6 @@ const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter) styles.noOutline, {height: 40}, ]} - autoCapitalize={props.autoCapitalize} onChangeText={text => props.onChangeText(`${props.prefixCharacter}${text}`)} // eslint-disable-next-line react/jsx-props-no-spreading {..._.omit(props, ['prefixCharacter', 'errorText', 'onChangeText'])} From 42de69cfa2cb02780add15ec6677dbf170eee4d3 Mon Sep 17 00:00:00 2001 From: CamilaRivera <47149004+CamilaRivera@users.noreply.github.com> Date: Wed, 29 Dec 2021 07:17:57 -0800 Subject: [PATCH 4/9] Remove unnecessary prop Co-authored-by: Rajat Parashar --- src/components/TextInputWithPrefix/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/TextInputWithPrefix/index.js b/src/components/TextInputWithPrefix/index.js index 8946d9e340e9..ed67a57cae36 100644 --- a/src/components/TextInputWithPrefix/index.js +++ b/src/components/TextInputWithPrefix/index.js @@ -18,9 +18,6 @@ const propTypes = { /** Callback to execute the text input is modified */ onChangeText: PropTypes.func, - - /** Whether to automatically capitalize certain characters */ - autoCapitalize: PropTypes.string, }; const defaultProps = { From be4462d66a13f2f2654dfe1bc074b962ccd84af7 Mon Sep 17 00:00:00 2001 From: CamilaRivera <47149004+CamilaRivera@users.noreply.github.com> Date: Wed, 29 Dec 2021 07:18:08 -0800 Subject: [PATCH 5/9] Remove unnecessary prop Co-authored-by: Rajat Parashar --- src/components/TextInputWithLabel.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/TextInputWithLabel.js b/src/components/TextInputWithLabel.js index 096dcf711c8e..4ee36cb2e28a 100644 --- a/src/components/TextInputWithLabel.js +++ b/src/components/TextInputWithLabel.js @@ -34,9 +34,6 @@ const propTypes = { /** Callback to execute when the text input is modified */ onChangeText: PropTypes.func, - - /** Whether to automatically capitalize certain characters */ - autoCapitalize: PropTypes.string, }; const defaultProps = { From dea8e18b448025f1b2fc2e405dbd2af49049973a Mon Sep 17 00:00:00 2001 From: CamilaRivera <47149004+CamilaRivera@users.noreply.github.com> Date: Wed, 29 Dec 2021 07:18:17 -0800 Subject: [PATCH 6/9] Remove unnecessary prop Co-authored-by: Rajat Parashar --- src/components/TextInputWithLabel.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/TextInputWithLabel.js b/src/components/TextInputWithLabel.js index 4ee36cb2e28a..14b0a1bb2ac2 100644 --- a/src/components/TextInputWithLabel.js +++ b/src/components/TextInputWithLabel.js @@ -46,7 +46,6 @@ const defaultProps = { disabled: false, placeholder: '', onChangeText: () => {}, - autoCapitalize: 'sentences', // React native TextInput's default }; const TextInputWithLabel = props => ( From d1f80957ff59db30c4709351eaad196fc73feb77 Mon Sep 17 00:00:00 2001 From: CamilaRivera <47149004+CamilaRivera@users.noreply.github.com> Date: Wed, 29 Dec 2021 07:18:26 -0800 Subject: [PATCH 7/9] Remove unnecessary prop Co-authored-by: Rajat Parashar --- src/components/TextInputWithPrefix/index.android.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/TextInputWithPrefix/index.android.js b/src/components/TextInputWithPrefix/index.android.js index 1d1b04adeb8f..5beede3990a4 100644 --- a/src/components/TextInputWithPrefix/index.android.js +++ b/src/components/TextInputWithPrefix/index.android.js @@ -18,9 +18,6 @@ const propTypes = { /** Callback to execute the text input is modified */ onChangeText: PropTypes.func, - - /** Whether to automatically capitalize certain characters */ - autoCapitalize: PropTypes.string, }; const defaultProps = { From 8864c2c67a56d931f3781c4f76e0de93718c54d7 Mon Sep 17 00:00:00 2001 From: CamilaRivera <47149004+CamilaRivera@users.noreply.github.com> Date: Wed, 29 Dec 2021 07:18:36 -0800 Subject: [PATCH 8/9] Remove unnecessary prop Co-authored-by: Rajat Parashar --- src/components/TextInputWithPrefix/index.android.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/TextInputWithPrefix/index.android.js b/src/components/TextInputWithPrefix/index.android.js index 5beede3990a4..257f1e592886 100644 --- a/src/components/TextInputWithPrefix/index.android.js +++ b/src/components/TextInputWithPrefix/index.android.js @@ -25,7 +25,6 @@ const defaultProps = { prefixCharacter: '', disabled: false, onChangeText: () => {}, - autoCapitalize: 'sentences', // React native TextInput's default }; const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter) From a79ad5b5d46b073ee265b29dab2b198a5d868910 Mon Sep 17 00:00:00 2001 From: CamilaRivera <47149004+CamilaRivera@users.noreply.github.com> Date: Wed, 29 Dec 2021 07:18:43 -0800 Subject: [PATCH 9/9] Remove unnecessary prop Co-authored-by: Rajat Parashar --- src/components/TextInputWithPrefix/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/TextInputWithPrefix/index.js b/src/components/TextInputWithPrefix/index.js index ed67a57cae36..8ac388083f7a 100644 --- a/src/components/TextInputWithPrefix/index.js +++ b/src/components/TextInputWithPrefix/index.js @@ -25,7 +25,6 @@ const defaultProps = { prefixCharacter: '', disabled: false, onChangeText: () => {}, - autoCapitalize: 'sentences', // React native TextInput's default }; const TextInputWithPrefix = props => (_.isEmpty(props.prefixCharacter)