Skip to content

Conversation

@sketchydroide
Copy link
Contributor

@sketchydroide sketchydroide commented Sep 22, 2020

fixes: https://github.com/Expensify/Expensify/issues/141643

Problem

the composer text input should have a focused style

Tests

  1. Tap the composer and verify that it becomes Blue
  2. Tap outside the composer and verify that it unfocus and it becomes grey
  3. Make sure to test the native Android and iOS as well.

@sketchydroide sketchydroide self-assigned this Sep 22, 2020
@sketchydroide sketchydroide marked this pull request as draft September 22, 2020 16:52
@sketchydroide sketchydroide changed the title Afonseca focused composer Add a focused style to the composer box Sep 22, 2020
}

componentDidUpdate(prevProps) {
this.focusInput();
Copy link
Contributor Author

@sketchydroide sketchydroide Sep 22, 2020

Choose a reason for hiding this comment

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

I removed this one because whenever the composer is rendered it focus the text input again. I don't think that is the desired behaviour. Specially with the purpose of this PR

tgolen
tgolen previously requested changes Sep 22, 2020
*
* @param {boolean} shouldHighlight
*/
focusTextInput(shouldHighlight) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest renaming this method to setIsFocused since this method doesn't actually focus the text input.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@sketchydroide sketchydroide marked this pull request as ready for review September 25, 2020 09:58
},

chatItemComposeBoxFocusedColour: {
borderColor: colors.blue,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this comment makes it sound like we don't want blue, right @shawnborton?

#114 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, I forgot to update the GH for the expensify one here
it was agreed later that blue was the better option

Copy link
Contributor

Choose a reason for hiding this comment

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

Blue it is!

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah missed that one, thanks!

}

/**
* updates the Highlight state of the composer
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* updates the Highlight state of the composer
* Updates the Highlight state of the composer

display: 'flex',
},

chatItemComposeBoxColour: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
chatItemComposeBoxColour: {
chatItemComposeBoxColor: {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

borderColor: colors.border,
},

chatItemComposeBoxFocusedColour: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
chatItemComposeBoxFocusedColour: {
chatItemComposeBoxFocusedColor: {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@AndrewGable AndrewGable dismissed tgolen’s stale review September 30, 2020 17:52

Stale review, changes were addressed and code looks good now!

@AndrewGable AndrewGable merged commit 9c894c3 into master Sep 30, 2020
@AndrewGable AndrewGable deleted the afonseca_focused_composer branch September 30, 2020 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants