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

Disabling spell check on multiple pages #23447

Merged
merged 2 commits into from
Aug 2, 2023
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
1 change: 1 addition & 0 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ function AddressSearch(props) {
}
},
maxLength: props.maxInputLength,
spellCheck: false,
}}
styles={{
textInputContainer: [styles.flexColumn],
Expand Down
1 change: 1 addition & 0 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ class BaseOptionsSelector extends Component {
}}
selectTextOnFocus
blurOnSubmit={Boolean(this.state.allOptions.length)}
spellCheck={false}
/>
);
const optionsList = (
Expand Down
1 change: 1 addition & 0 deletions src/components/RoomNameInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function RoomNameInput({autoFocus, disabled, errorText, forwardedRef, value, onB
onBlur={onBlur}
autoFocus={autoFocus}
maxLength={CONST.REPORT.MAX_ROOM_NAME_LENGTH}
spellCheck={false}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ function BaseSelectionListRadio(props) {
onChangeText={props.onChangeText}
keyboardType={props.keyboardType}
selectTextOnFocus
spellCheck={false}
/>
</View>
)}
Expand Down
1 change: 1 addition & 0 deletions src/pages/settings/Payments/AddDebitCardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function DebitCardPage(props) {
accessibilityLabel={translate('addDebitCardPage.nameOnCard')}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
ref={(ref) => (nameOnCardRef.current = ref)}
spellCheck={false}
/>
<TextInput
inputID="cardNumber"
Expand Down
2 changes: 2 additions & 0 deletions src/pages/settings/Profile/DisplayNamePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function DisplayNamePage(props) {
defaultValue={lodashGet(currentUserDetails, 'firstName', '')}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
autoCapitalize="words"
spellCheck={false}
/>
</View>
<View>
Expand All @@ -105,6 +106,7 @@ function DisplayNamePage(props) {
defaultValue={lodashGet(currentUserDetails, 'lastName', '')}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
autoCapitalize="words"
spellCheck={false}
/>
</View>
</Form>
Expand Down
3 changes: 3 additions & 0 deletions src/pages/settings/Profile/PersonalDetails/AddressPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ function AddressPage({privatePersonalDetails}) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={street2 || ''}
maxLength={CONST.FORM_CHARACTER_LIMIT}
spellCheck={false}
/>
<View style={styles.formSpaceVertical} />
<View style={styles.mhn5}>
Expand All @@ -192,6 +193,7 @@ function AddressPage({privatePersonalDetails}) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={address.state || ''}
maxLength={CONST.FORM_CHARACTER_LIMIT}
spellCheck={false}
/>
)}
<View style={styles.formSpaceVertical} />
Expand All @@ -202,6 +204,7 @@ function AddressPage({privatePersonalDetails}) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={address.city || ''}
maxLength={CONST.FORM_CHARACTER_LIMIT}
spellCheck={false}
/>
<View style={styles.formSpaceVertical} />
<TextInput
Expand Down
2 changes: 2 additions & 0 deletions src/pages/settings/Profile/PersonalDetails/LegalNamePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function LegalNamePage(props) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={legalFirstName}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
spellCheck={false}
/>
</View>
<View>
Expand All @@ -107,6 +108,7 @@ function LegalNamePage(props) {
accessibilityRole={CONST.ACCESSIBILITY_ROLE.TEXT}
defaultValue={legalLastName}
maxLength={CONST.DISPLAY_NAME.MAX_LENGTH}
spellCheck={false}
/>
</View>
</Form>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/tasks/NewTaskDetailsPage.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please rename the component name in this file to be NewTaskDetailsPage?

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const defaultProps = {
task: {},
};

function NewTaskPage(props) {
function NewTaskDetailsPage(props) {
const inputRef = useRef();
const [taskTitle, setTaskTitle] = useState(props.task.title);
const [taskDescription, setTaskDescription] = useState(props.task.description || '');
Expand Down Expand Up @@ -121,9 +121,9 @@ function NewTaskPage(props) {
);
}

NewTaskPage.displayName = 'NewTaskPage';
NewTaskPage.propTypes = propTypes;
NewTaskPage.defaultProps = defaultProps;
NewTaskDetailsPage.displayName = 'NewTaskDetailsPage';
NewTaskDetailsPage.propTypes = propTypes;
NewTaskDetailsPage.defaultProps = defaultProps;

export default compose(
withOnyx({
Expand All @@ -135,4 +135,4 @@ export default compose(
},
}),
withLocalize,
)(NewTaskPage);
)(NewTaskDetailsPage);
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ function WorkspaceMembersPage(props) {
onChangeText={setSearchValue}
label={props.translate('optionsSelector.findMember')}
accessibilityLabel={props.translate('optionsSelector.findMember')}
spellCheck={false}
/>
</View>
{data.length > 0 ? (
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function WorkspaceSettingsPage(props) {
containerStyles={[styles.mt4]}
defaultValue={props.policy.name}
maxLength={CONST.WORKSPACE_NAME_CHARACTER_LIMIT}
spellCheck={false}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
spellCheck={false}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for workspaces's name, here too? I think for any kind of name spell check should be off, I can remove it if its supposed to, just asking again for confirmation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, we should keep spell check on this. because this does not come under

  1. Person Name.
  2. Place name.
  3. Entity Name.
  4. Fixed terms.
  5. Preselection list.
  6. filter.
  7. Search.

What do you say?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can be proper words too so it is better so show spell errors on mistype.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in most cases they will have names of some organizations which usually aren't proper english words

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, then its fine. We can turn off spellcheck here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you mentioned disabled it.

/>
<View style={[styles.mt4]}>
<Picker
Expand Down
Loading