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

composeBox: Limit maxHeight to 110. #3049

Closed
wants to merge 1 commit into from

Conversation

jainkuniya
Copy link
Member

Most chat apps limit the height of composeBox, and then text box
becomes scrollable on further entering text. FB messenger and WhatsApp
limit to 6 lines of text. Following the same pattern, limit the max
height of message input.

Fixes: #3048

screen shot 2018-10-13 at 1 04 07 pm

image

Most chat apps limit the height of composeBox, and then text box
becomes scrollable on further entering text. FB messenger and WhatsApp
limit to 6 lines of text. Following the same pattern, limit the max
height of message input.

Fixes: zulip#3048
@borisyankov
Copy link
Contributor

I am a bit suspicious that 110 equal 6 lines (would be true only if the line-height is 18.3333333 😄 )

Regardless, we used to have this exact limit, but as I vaguely recall @timabbott wanted to be able to enter more text in the mobile app compared with other mobile apps (consistently with a tendency to write longer text on the web app).

I don't think the 'unlimited height' behavior is ideal, but neither is limiting it to 6-ish lines. Extra points for tracking the commit that did the change or the issue that it resolved to remind us of what was the reason to remove the limit,

@armaanahluwalia
Copy link
Collaborator

I agree with @borisyankov. I don't think setting a max height really solves anything and takes away the ability to effectively use the ComposeBox as a space for drafting long messages. I've also made a small tweak to this code in #2887

I just filed #3052 #3053 in case you're in the mood for text input stuff which to me are bigger problems while composing.

@timabbott
Copy link
Member

timabbott commented Oct 14, 2018

I've definitely composed messages longer than 6 lines of text in the current Zulip app (and I think copying Messenger and WhatsApp isn't right for our context, because Zulip, being a work tool, is generally going to have more reason to send long messages explaining complex ideas). I do think we need to have a reasonably scrolling situation for this, but I think limiting to 6 lines is counterproductive.

@borisyankov
Copy link
Contributor

Then we want to grow the compose box up to the height of the whole screen when the keyboard is popped up. (height = screen.height - keyboard.height).
If the user wants to see what was written, they can hide the keyboard.
I'll do the change, as there are few more changes around this that I am working on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-compose/send Compose box, autocomplete, camera/upload, outbox, sending a-layout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants