Add placeholderTextColor when using placeholders (#2976)
This commit is contained in:
parent
6063ad825a
commit
55964d2fda
9 changed files with 22 additions and 20 deletions
|
|
@ -12,6 +12,8 @@ import {
|
|||
} from 'react-native';
|
||||
import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
|
||||
|
||||
import {General} from 'mattermost-redux/constants';
|
||||
|
||||
import ErrorText from 'app/components/error_text';
|
||||
import FormattedText from 'app/components/formatted_text';
|
||||
import Loading from 'app/components/loading';
|
||||
|
|
@ -19,7 +21,6 @@ import StatusBar from 'app/components/status_bar';
|
|||
import TextInputWithLocalizedPlaceholder from 'app/components/text_input_with_localized_placeholder';
|
||||
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
|
||||
import {General} from 'mattermost-redux/constants';
|
||||
import {getShortenedURL} from 'app/utils/url';
|
||||
import {t} from 'app/utils/i18n';
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import {t} from 'app/utils/i18n';
|
|||
import {confirmOutOfOfficeDisabled} from 'app/utils/status';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
|
||||
|
||||
const PLACEHOLDER_COLOR = changeOpacity('#000', 0.5);
|
||||
const {RNTextInputReset} = NativeModules;
|
||||
|
||||
export default class PostTextBoxBase extends PureComponent {
|
||||
|
|
@ -617,7 +616,7 @@ export default class PostTextBoxBase extends PureComponent {
|
|||
onChangeText={this.handleTextChange}
|
||||
onSelectionChange={this.handlePostDraftSelectionChanged}
|
||||
placeholder={intl.formatMessage(placeholder, {channelDisplayName})}
|
||||
placeholderTextColor={PLACEHOLDER_COLOR}
|
||||
placeholderTextColor={changeOpacity('#000', 0.5)}
|
||||
multiline={true}
|
||||
blurOnSubmit={false}
|
||||
underlineColorAndroid='transparent'
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import PropTypes from 'prop-types';
|
|||
import {intlShape} from 'react-intl';
|
||||
import {TextInput} from 'react-native';
|
||||
|
||||
import {changeOpacity} from 'app/utils/theme';
|
||||
|
||||
export default class TextInputWithLocalizedPlaceholder extends PureComponent {
|
||||
static propTypes = {
|
||||
...TextInput.propTypes,
|
||||
|
|
@ -37,6 +39,7 @@ export default class TextInputWithLocalizedPlaceholder extends PureComponent {
|
|||
ref='input'
|
||||
{...otherProps}
|
||||
placeholder={placeholderString}
|
||||
placeholderTextColor={changeOpacity('#000', 0.5)}
|
||||
disableFullscreenUI={true}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ export default class TextSetting extends PureComponent {
|
|||
<TextInput
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
placeholderTextColor={changeOpacity(theme.centerChannelColor, 0.5)}
|
||||
onChangeText={this.onChangeText}
|
||||
style={inputStyle}
|
||||
autoCapitalize='none'
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ exports[`ForgotPassword should match snapshot 1`] = `
|
|||
disableFullscreenUI={true}
|
||||
keyboardType="email-address"
|
||||
onChangeText={[Function]}
|
||||
placeholderTextColor="rgba(0,0,0,0.5)"
|
||||
rejectResponderTermination={true}
|
||||
style={
|
||||
Object {
|
||||
|
|
@ -253,6 +254,7 @@ exports[`ForgotPassword snapshot for error on failure of email regex 1`] = `
|
|||
disableFullscreenUI={true}
|
||||
keyboardType="email-address"
|
||||
onChangeText={[Function]}
|
||||
placeholderTextColor="rgba(0,0,0,0.5)"
|
||||
rejectResponderTermination={true}
|
||||
style={
|
||||
Object {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ import ErrorText from 'app/components/error_text';
|
|||
import FormattedText from 'app/components/formatted_text';
|
||||
import StatusBar from 'app/components/status_bar';
|
||||
|
||||
import {changeOpacity} from 'app/utils/theme';
|
||||
|
||||
export default class ForgotPassword extends PureComponent {
|
||||
static propTypes = {
|
||||
actions: PropTypes.shape({
|
||||
|
|
@ -124,6 +126,7 @@ export default class ForgotPassword extends PureComponent {
|
|||
style={GlobalStyles.inputBox}
|
||||
onChangeText={this.changeEmail}
|
||||
placeholder={formatMessage({id: 'login.email', defaultMessage: 'Email'})}
|
||||
placeholderTextColor={changeOpacity('#000', 0.5)}
|
||||
autoCorrect={false}
|
||||
autoCapitalize='none'
|
||||
keyboardType='email-address'
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ import {
|
|||
import Button from 'react-native-button';
|
||||
import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
|
||||
|
||||
import {RequestStatus} from 'mattermost-redux/constants';
|
||||
|
||||
import ErrorText from 'app/components/error_text';
|
||||
import FormattedText from 'app/components/formatted_text';
|
||||
import StatusBar from 'app/components/status_bar';
|
||||
|
|
@ -27,11 +29,10 @@ import {preventDoubleTap} from 'app/utils/tap';
|
|||
import tracker from 'app/utils/time_tracker';
|
||||
import {t} from 'app/utils/i18n';
|
||||
import {setMfaPreflightDone, getMfaPreflightDone} from 'app/utils/security';
|
||||
import {changeOpacity} from 'app/utils/theme';
|
||||
|
||||
import telemetry from 'app/telemetry';
|
||||
|
||||
import {RequestStatus} from 'mattermost-redux/constants';
|
||||
|
||||
export const mfaExpectedErrors = ['mfa.validate_token.authenticate.app_error', 'ent.mfa.validate_token.authenticate.app_error'];
|
||||
|
||||
export default class Login extends PureComponent {
|
||||
|
|
@ -380,6 +381,7 @@ export default class Login extends PureComponent {
|
|||
onChangeText={this.props.actions.handleLoginIdChanged}
|
||||
style={GlobalStyles.inputBox}
|
||||
placeholder={this.createLoginPlaceholder()}
|
||||
placeholderTextColor={changeOpacity('#000', 0.5)}
|
||||
autoCorrect={false}
|
||||
autoCapitalize='none'
|
||||
keyboardType='email-address'
|
||||
|
|
@ -395,6 +397,7 @@ export default class Login extends PureComponent {
|
|||
onChangeText={this.props.actions.handlePasswordChanged}
|
||||
style={GlobalStyles.inputBox}
|
||||
placeholder={this.context.intl.formatMessage({id: 'login.password', defaultMessage: 'Password'})}
|
||||
placeholderTextColor={changeOpacity('#000', 0.5)}
|
||||
secureTextEntry={true}
|
||||
autoCorrect={false}
|
||||
autoCapitalize='none'
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import {isValidUrl, stripTrailingSlashes} from 'app/utils/url';
|
|||
import {preventDoubleTap} from 'app/utils/tap';
|
||||
import tracker from 'app/utils/time_tracker';
|
||||
import {t} from 'app/utils/i18n';
|
||||
import {changeOpacity} from 'app/utils/theme';
|
||||
|
||||
import telemetry from 'app/telemetry';
|
||||
|
||||
|
|
@ -448,6 +449,7 @@ export default class SelectServer extends PureComponent {
|
|||
id: 'mobile.components.select_server_view.siteUrlPlaceholder',
|
||||
defaultMessage: 'https://mattermost.example.com',
|
||||
})}
|
||||
placeholderTextColor={changeOpacity('#000', 0.5)}
|
||||
returnKeyType='go'
|
||||
underlineColorAndroid='transparent'
|
||||
disableFullscreenUI={true}
|
||||
|
|
|
|||
18
package-lock.json
generated
18
package-lock.json
generated
|
|
@ -5238,7 +5238,6 @@
|
|||
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
|
||||
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"is-extendable": "^0.1.0"
|
||||
}
|
||||
|
|
@ -5283,8 +5282,7 @@
|
|||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"is-glob": {
|
||||
"version": "4.0.1",
|
||||
|
|
@ -7705,7 +7703,6 @@
|
|||
"version": "1.1.11",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
|
@ -7863,7 +7860,6 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
|
@ -7878,7 +7874,6 @@
|
|||
"version": "3.0.4",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
|
|
@ -7893,7 +7888,6 @@
|
|||
"version": "2.3.5",
|
||||
"resolved": false,
|
||||
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
|
|
@ -7912,7 +7906,6 @@
|
|||
"version": "0.5.1",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
|
|
@ -8006,7 +7999,6 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
|
@ -8129,7 +8121,6 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
|
@ -8149,7 +8140,6 @@
|
|||
"version": "3.0.1",
|
||||
"resolved": false,
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
|
@ -16051,8 +16041,7 @@
|
|||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
|
||||
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"braces": {
|
||||
"version": "2.3.2",
|
||||
|
|
@ -16315,8 +16304,7 @@
|
|||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
|
||||
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "3.1.10",
|
||||
|
|
|
|||
Loading…
Reference in a new issue