Skip to content
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
4 changes: 3 additions & 1 deletion src/components/Feed/NewPost.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class NewPost extends React.Component {
}

render() {
const {currentUser, allMembers, titlePlaceholder, contentPlaceholder, isCreating, hasError} = this.props
const {currentUser, allMembers, titlePlaceholder, contentPlaceholder, isCreating, hasError, expandedTitlePlaceholder} = this.props
let authorName = currentUser.firstName
if (authorName && currentUser.lastName) {
authorName += ' ' + currentUser.lastName
Expand All @@ -29,6 +29,7 @@ class NewPost extends React.Component {
<RichTextArea
className={composerClasses}
titlePlaceholder={titlePlaceholder || 'Title of the post'}
expandedTitlePlaceholder={expandedTitlePlaceholder || titlePlaceholder || 'Title of the post'}
contentPlaceholder={contentPlaceholder || 'New reply...'}
onPost={this.props.onPost}
onPostChange={this.props.onNewPostChange}
Expand All @@ -44,6 +45,7 @@ class NewPost extends React.Component {


NewPost.propTypes = {
expandedTitlePlaceholder: PropTypes.string,
currentUser: PropTypes.object.isRequired,
allMembers: PropTypes.object.isRequired,
onPost: PropTypes.func.isRequired,
Expand Down
5 changes: 3 additions & 2 deletions src/components/RichTextArea/RichTextArea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class RichTextArea extends React.Component {
render() {
const {MentionSuggestions} = this.mentionPlugin
const {className, avatarUrl, authorName, titlePlaceholder, contentPlaceholder, editMode, isCreating,
isGettingComment, disableTitle, disableContent} = this.props
isGettingComment, disableTitle, disableContent, expandedTitlePlaceholder} = this.props
const {editorExpanded, editorState, titleValue, oldMDContent, currentMDContent, uploading} = this.state
let canSubmit = (disableTitle || titleValue.trim())
&& (disableContent || editorState.getCurrentContent().hasText())
Expand Down Expand Up @@ -311,7 +311,7 @@ class RichTextArea extends React.Component {
className={cn('new-post-title', {'hide-title': disableTitle})}
type="text"
onChange={this.onTitleChange}
placeholder={titlePlaceholder || 'Title of the post'}
placeholder={editorExpanded ? expandedTitlePlaceholder : titlePlaceholder || 'Title of the post'}
/>
<div className="draftjs-editor tc-textarea">
{!disableContent && !isGettingComment &&
Expand Down Expand Up @@ -415,6 +415,7 @@ class RichTextArea extends React.Component {
}

RichTextArea.propTypes = {
expandedTitlePlaceholder: PropTypes.string,
onPost: PropTypes.func.isRequired,
onPostChange: PropTypes.func.isRequired,
cancelEdit: PropTypes.func,
Expand Down
1 change: 1 addition & 0 deletions src/projects/detail/containers/FeedContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ class FeedView extends React.Component {
heading="NEW STATUS POST"
onNewPostChange={this.onNewPostChange}
titlePlaceholder="Start a new discussion"
expandedTitlePlaceholder="Add your discussion title"
contentPlaceholder="Add your first post"
/>
</MediaQuery>
Expand Down