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 message #422

Merged
merged 2 commits into from
Dec 16, 2016
Merged

Multiline message #422

merged 2 commits into from
Dec 16, 2016

Conversation

sualko
Copy link
Member

@sualko sualko commented Dec 13, 2016

@ChristianTacke @thfree please test and verify if possible

screenshot from 2016-12-13 13-45-22

Line breaks are possible with shift+enter.

  • When starting a new chat by clicking on a buddy from the buddy list, the textarea is "large".
  • Test mobil

@ChristianTacke
Copy link
Contributor

I hope to patch my version and let people test it the next days.

Copy link
Contributor

@ChristianTacke ChristianTacke left a comment

Choose a reason for hiding this comment

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

As always, javascript is not my primary language. So consider this just comments.

@@ -51,7 +51,7 @@
</div>
</div>
<div class="jsxc_transfer jsxc_otr jsxc_disabled" />
<input type="text" class="jsxc_textinput" data-i18n="[placeholder]Message" />
<textarea class="jsxc_textinput" data-i18n="[placeholder]Message"></textarea>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why a full </textarea> instead of just a … />?

Copy link
Member Author

Choose a reason for hiding this comment

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

Textarea is not allowed to be self closing, because it can contain text. Probably jquery would take care of this, but I am used to it.

$(this).height($(this).data('originalHeight') * 1.5);
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a good place for a helper function? In between two win.find() setup calls?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a subject for debate 😆, but it is absolute valid javascript. As you can see at the top of the outer function, the complete function needs to be rewritten. The reason why I defined this helper function at this place was, that it is not used elsewhere in the code and therefore it is easier to read.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay. Maybe this would be a good start to slowly rewrite it now?

Copy link
Member Author

Choose a reason for hiding this comment

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

4.0 will transfer jsxc to typescript, so I would like to wait after 3.1 with bigger changes 😉 .

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, let's wait with some fun for 3.1.

@ChristianTacke
Copy link
Contributor

For testing I applied the changes to 3.0.1, I hope the changes do not require any intermediate updates?

In testing, I noticed one interesting behaviour on Chromium 55.0.2883.75:
When starting a new chat by clicking on a buddy from the buddy list, the textarea is "large". When clicking anywhere in the whole window (even outside any jsxc content), the textarea shrinks to "small".

Also:
So it is intended, that there are two sizes? small and large? It's not intended to grow further for even more input?

@sualko
Copy link
Member Author

sualko commented Dec 14, 2016

I hope the changes do not require any intermediate updates?

Nope.

When starting a new chat by clicking on a buddy from the buddy list, the textarea is "large".

That is not the intended behavior.

So it is intended, that there are two sizes? small and large? It's not intended to grow further for even more input?

Yes this is intended. I is similar to the behavior of mobil chat clients like signal. If you need more space you can enlarge the complete chat window, so that the textarea has more width.

One thing which I didn't check it the behavior on small devices.

Thank you for testing this new feature.

@ChristianTacke
Copy link
Contributor

ChristianTacke commented Dec 14, 2016

That is not the intended behavior.

Okay,
One further note: I have to do the following steps to reproduce it:

  • Start chat, login (using showloginbox)
  • Click on one buddy (input area is normal)
  • Close buddy window
  • Press F5 (restart jsxc)
  • Open buddy again. Now the input area is large.

Yes this is intended. I is similar to the behavior of mobil chat clients like signal. If you need more space you can enlarge the complete chat window, so that the textarea has more width.

Just as a note: The mobile app Conversations increases the input area line by line, as you type. It increases it to the point, where your old chat is completely hidden and all your screen space is used for the input area.

Thank you for testing this new feature.

Thanks for working on this! My users are already happier with this.

@sualko
Copy link
Member Author

sualko commented Dec 15, 2016

What do you think, can we merge it?

@ChristianTacke
Copy link
Contributor

Yes, go ahead.

@sualko sualko merged commit 575cd4a into master Dec 16, 2016
@sualko sualko deleted the multiline-message branch December 16, 2016 08:32
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.

None yet

2 participants