-
-
Notifications
You must be signed in to change notification settings - Fork 663
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
Keep compose box scrolled to bottom, not top, as you type a long message #3614
Comments
Thanks @jainkuniya ! Just to make things explicit:
I believe you're saying this issue doesn't reproduce on Android. The original user report of the issue was on iOS, so that's consistent too. |
This compose box issue is only issue on screen when there are multiple input on the screen, like stream narrow (not topic or PM narrow). Root cause is: Topic input always try to remain in the window/screen, even when message input expands. So only way left for message input to expand is to expand at bottom, instead of top. |
Ah interesting. Are there particular experiments you've done, or things you've observed, that lead to this diagnosis? |
…eachable." This reverts commit 3574b12. This was not a right fix, it introduced zulip#3614. So reverting it. Also see futher commit for right fix.
Add `justifyContent` as `flex-end` in `composeText`, which is a wrapper style of inputs (topic and msg). Default value is `flex-start`. Which indicates that place components at the start of the parent and grow in the other direction if required. With `flex-end`, it means place component at the end of the parent and grow at the start if required. Fixes: zulip#3614
There were a couple of different attempted fixes in the PR #3690, but they didn't 100% work, and it seems like we don't yet understand the cause of this issue. Let's focus first on investigating the issue, so we can understand what's going on; then once we understand it, we can fix it. Copying here a version of some of my comments there, as well as more summary of our conversation just now: For the investigation let's focus on iPhone models without a notch -- so e.g. an iPhone 8 but not an iPhone X. The notch pulls in an unrelated bug (#3066) that causes overlapping symptoms, which confuses the issue. It looks like the core issue here is that the content input is too tall. In the extreme case the input is too tall for the whole input to be shown at all; in other cases it's itself shown in full, but it crowds out the topic input, or the unreads banner. The normal way the layout should work is:
Evidently that's breaking down somewhere. So a key part of the task is to figure out where. You'll want to investigate the layout of the React components in the app. Try the React debugger; there's documentation in the RN docs on debugging. |
…eachable." This reverts commit 3574b12. This was not a right fix, it introduced zulip#3614. So reverting it. Also see futher commit for right fix.
Now max height is set to composeBox, so when msg input expands it takes all the space available in the parent and pushes topic input outside. The workaround of this is to set position of topic input absolute and adjust position of msg input accordingly with the help of marginTop. Fixes: zulip#3614
…eachable." This reverts commit 3574b12. This was not a right fix, it introduced zulip#3614. So reverting it. Also see futher commit for right fix.
Now max height is set to composeBox, so when msg input expands it takes all the space available in the parent and pushes topic input outside. The workaround of this is to set position of topic input absolute and adjust position of msg input accordingly with the help of marginTop. Fixes: zulip#3614
…eachable." This reverts commit 3574b12. This was not a right fix, it introduced zulip#3614. So reverting it. Also see futher commit for right fix.
Add flex-shrink: 1 to msg input, compose box and compose box wrapper. This will prevent it to overflow parent on huge multiline text msg input. This style needs to be applied for msg input hierarchy to get affected. Fixes: zulip#3614
(For cross-reference: we had a very informative chat thread about this here.) |
Add flex-shrink: 1 to msg input, compose box and compose box wrapper. This will prevent it to overflow parent on huge multiline text msg input. This style needs to be applied for msg input hierarchy to get affected. Fixes: zulip#3614
…eachable." This reverts commit 3574b12. This was not a right fix, it introduced zulip#3614. So reverting it. Also see futher commit for right fix.
Add flex-shrink: 1 to msg input, compose box and compose box wrapper. This will prevent it to overflow parent on huge multiline text msg input. This style needs to be applied for msg input hierarchy to get affected. Fixes: zulip#3614
…eachable." This reverts commit 3574b12. This was not a right fix, it introduced zulip#3614. So reverting it. Also see futher commit for right fix.
Add flex-shrink: 1 to msg input, compose box and compose box wrapper. This will prevent it to overflow parent on huge multiline text msg input. This style needs to be applied for msg input hierarchy to get affected. Fixes: zulip#3614
…eachable." This reverts commit 3574b12. This was not a right fix, it introduced zulip#3614. So reverting it. Also see futher commit for right fix.
Add flex-shrink: 1 to msg input, compose box and compose box wrapper. This will prevent it to overflow parent on huge multiline text msg input. This style needs to be applied for msg input hierarchy to get affected. Fixes: zulip#3614
Remove scroll view from input wrapper (which was added in zulip#3595). This fixed zulip#3614. Also just checked it works fine on Android as well. So basically zulip#3595 was not a completely right solution for zulip#3369. Now inputs are wrapped with simple view, which is self aligned as vertically center. ComposeMenu and SendButton are self aligned as vertically end. And wrapper of all this three has justifyContent as space-between, which makes them spread whole over horizontal space available. This removes alignItems: 'flex-end' from `composeBox`, which was pushing input to vertically bottom, idealy it should be at vertically center. Fixes: zulip#3614
Since we fixed #3369 with #3595 , the compose box is now scrollable so you can see what you're typing even in the later part of a long message.
But it doesn't automatically scroll itself that way; by default it sticks at the top, and you have to scroll it yourself. See report in chat, with a video.
I'm not sure what the right logic might be for a complicated case where the user is moving to and fro in the message and editing different parts of it. Let's declare the problem of getting that exactly right to be out of scope for this issue.
The most common case is that the user mostly types additional text at the end, and perhaps occasionally scrolls up to edit an earlier part of the message. Let's make that case work such that as long as you're at the end, there's no manual scrolling needed.
The text was updated successfully, but these errors were encountered: