diff options
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/post_info.jsx | 2 | ||||
-rw-r--r-- | web/react/components/post_list.jsx | 5 | ||||
-rw-r--r-- | web/react/components/search_bar.jsx | 1 | ||||
-rw-r--r-- | web/react/components/team_signup_display_name_page.jsx | 3 | ||||
-rw-r--r-- | web/react/components/team_signup_url_page.jsx | 4 |
5 files changed, 12 insertions, 3 deletions
diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx index 6937ec216..ddda48e06 100644 --- a/web/react/components/post_info.jsx +++ b/web/react/components/post_info.jsx @@ -126,7 +126,7 @@ export default class PostInfo extends React.Component { lastCommentClass = ' comment-icon__container__show'; } - if (this.props.commentCount >= 1 && post.state !== Constants.POST_FAILED && post.state !== Constants.POST_LOADING) { + if (this.props.commentCount >= 1 && post.state !== Constants.POST_FAILED && post.state !== Constants.POST_LOADING && post.state !== Constants.POST_DELETED) { comments = ( <a href='#' diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index b9741bac4..444736db5 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -556,6 +556,11 @@ export default class PostList extends React.Component { var post = posts[order[i]]; var parentPost = posts[post.parent_id]; + // If the post is a comment whose parent has been deleted, don't add it to the list. + if (parentPost && parentPost.state === Constants.POST_DELETED) { + continue; + } + var sameUser = false; var sameRoot = false; var hideProfilePic = false; diff --git a/web/react/components/search_bar.jsx b/web/react/components/search_bar.jsx index 83c10494a..1b81a5ee0 100644 --- a/web/react/components/search_bar.jsx +++ b/web/react/components/search_bar.jsx @@ -185,6 +185,7 @@ export default class SearchBar extends React.Component { className='search__form relative-div' onSubmit={this.handleSubmit} style={{overflow: 'visible'}} + autoComplete='off' > <span className='glyphicon glyphicon-search sidebar__search-icon' /> <input diff --git a/web/react/components/team_signup_display_name_page.jsx b/web/react/components/team_signup_display_name_page.jsx index 4d08274e4..2005ecc31 100644 --- a/web/react/components/team_signup_display_name_page.jsx +++ b/web/react/components/team_signup_display_name_page.jsx @@ -25,6 +25,9 @@ export default class TeamSignupDisplayNamePage extends React.Component { if (!displayName) { this.setState({nameError: 'This field is required'}); return; + } else if (displayName.length < 4 || displayName.length > 15) { + this.setState({nameError: 'Name must be 4 or more characters up to a maximum of 15'}); + return; } this.props.state.wizard = 'team_url'; diff --git a/web/react/components/team_signup_url_page.jsx b/web/react/components/team_signup_url_page.jsx index 02d5cab8e..8972fda1a 100644 --- a/web/react/components/team_signup_url_page.jsx +++ b/web/react/components/team_signup_url_page.jsx @@ -35,8 +35,8 @@ export default class TeamSignupUrlPage extends React.Component { if (cleanedName !== name || !urlRegex.test(name)) { this.setState({nameError: "Use only lower case letters, numbers and dashes. Must start with a letter and can't end in a dash."}); return; - } else if (cleanedName.length <= 2 || cleanedName.length > 15) { - this.setState({nameError: 'Name must be 3 or more characters up to a maximum of 15'}); + } else if (cleanedName.length < 4 || cleanedName.length > 15) { + this.setState({nameError: 'Name must be 4 or more characters up to a maximum of 15'}); return; } |