Skip to content
3 changes: 2 additions & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,8 @@ class ReportActionCompose extends React.Component {
displayFileInModal(file);
this.setState({isDraggingOver: false});
}}
style={[styles.textInputCompose, this.props.isComposerFullSize ? styles.textInputFullCompose : styles.flex4]}
style={[styles.textInputCompose, this.props.isComposerFullSize ? styles.textInputFullCompose : styles.inputComposerPadding]}
defaultValue={this.props.comment}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Apart from flex4, I had to add more styling and so styles.inputComposerPadding

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm asking about why defaultValue prop was added here?

maxLines={this.state.maxLines}
onFocus={() => this.setIsFocused(true)}
onBlur={() => this.setIsFocused(false)}
Expand Down
8 changes: 7 additions & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1417,11 +1417,17 @@ const styles = {
},

textInputComposeSpacing: {
paddingVertical: 6,
paddingVertical: 1,
Comment thread
liyamahendra marked this conversation as resolved.
alignSelf: 'center',
Comment on lines -1420 to +1421

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Again adding paddingVertical with alignSelf: 'center'?

Are we sure it won't break anything on other platforms?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we could move code to StyleUtils and define platform-specific styles.

cc: @Julesssss What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Are we sure it won't break anything on other platforms?

Yes, I did test out on other platforms!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we could move code to StyleUtils and define platform-specific styles.

Depends on whether the styling works for all platforms or not... Would prefer to have a single consistent style, if possible

...flex.flexRow,
flex: 1,
},

inputComposerPadding: {
flex: 4,
paddingVertical: 4,
},

chatItemSubmitButton: {
alignSelf: 'flex-end',
borderRadius: 6,
Expand Down