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

Multiline chat input #575

Closed
wants to merge 1 commit into from
Closed

Multiline chat input #575

wants to merge 1 commit into from

Conversation

alwx
Copy link
Contributor

@alwx alwx commented Dec 22, 2016

I've copied some code from drawer to chat to allow users to send messages by tapping Enter on the keyboard (previously it didn't work well on iOS)

@alwx alwx self-assigned this Dec 22, 2016
@alwx alwx added the ready label Dec 22, 2016
@alwx alwx requested a review from rasom December 22, 2016 10:34
@rasom
Copy link
Contributor

rasom commented Dec 22, 2016

This doesn't look like correct behavior

b

@@ -54,9 +51,16 @@
:accessibility-label :input
:on-focus #(do (dispatch [:set :focused true])
(dispatch [:set-chat-ui-props :show-emoji? false]))
:on-blur #(do (dispatch [:set :focused false])
:on-blur #(do (reset! message-text "")
Copy link
Contributor

Choose a reason for hiding this comment

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

WARNING: Use of undeclared Var status-im.chat.views.message-input/message-text at line 54 src/status_im/chat/views/message_input.cljs

@alwx
Copy link
Contributor Author

alwx commented Dec 22, 2016

Sounds crazy, but it's almost 2017 and React Native still doesn't completely support the desired behaviour: facebook/react-native#1882
However I've found the better solution. @rasom please, check.

@alwx alwx force-pushed the fix/multiline-chat-input branch from d499f99 to a58ed1a Compare December 22, 2016 20:02
@alwx alwx requested a review from rasom December 22, 2016 20:02
@rasom
Copy link
Contributor

rasom commented Dec 23, 2016

@alwx, maybe I just don't understand, but why should we send the message when user presses Return? I imagine that users will expect a new line in the result of this action. Or I miss something?

@0xc1c4da
Copy link
Contributor

hmm on return it shouldn't send the message

@alwx
Copy link
Contributor Author

alwx commented Dec 23, 2016

Ok, sorry. I will close the PR.

@alwx alwx closed this Dec 23, 2016
@rasom rasom deleted the fix/multiline-chat-input branch December 23, 2016 11:11
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.

3 participants