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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
keepContentOffsetAtBottomOnBatchUpdates add tolerance range #9
Comments
@mschonvogel hi I was thinking about it but I think iMessage behaves differently. It seems to be controlled by the host during the sending or receiving the new message. Can you please describe the behavior with that tolerance? |
@mschonvogel |
@ekazaev The left screen should automatically scroll to the latest message here |
Or do you mean that it should scroll fully to the bottom if the new message arrived? |
@mschonvogel I see. Thanks. It seems to me like its an app responsibility tbh. And it seems that it is kinda easy to implement? |
Yes, I can implement that in the host app of course. But I thought that somehow makes sense since the layout already takes care of setting the content offset automatically |
I expect the collectionview to scroll if I'm like max 20points away from the bottom @ekazaev |
It just sounds like it has logic inside. If new message -> Scroll, If typing indicator appears -> Dont, If we inserted "read" cell -> dont scroll. I understand you, but it is something that should be implemented in the host app. Or a framework built around ChatLayout. But not a layout itself. |
Okay, all right, I'll implement this myself 馃檪 |
Sorry about that. |
I understand what you mean but I still disagree, which is not a problem 馃檪. The case I want to cover here is: The user thinks they are at the end of the chat history, but they're not, because 10pt away. So I would expect scrolling for all inserts. typing indicator, state update etc. |
I am just trying to find the right balance here :) |
Yes, I understand the thinking of your QA department, but in that case, if you are only a few pixels off the bottom, I would still scroll automatically 鈽濓笍馃榾 |
Something like this will solve the issue in the example 馃槀:
|
Let me sleep with that thought. @mschonvogel |
test.mov |
That looks good! I'd probably utilize an enum for that, maybe like so: enum KeepContentOffsetAtBottomBehavior {
case disabled
case enabled(tolerance: CGFloat)
} |
Ill think about it. I promise. But for now everything that comes into my head tells me against it. |
I think it actually has sense to scroll to the bottom before anything appears if user within that tolerance to the bottom. |
Hello @ekazaev 馃憢 Currently, the layout only scrolls automatically when you have scrolled all the way down. Can you add a configuration for a tolerance range? So that even if you are for example 100pt from the bottom of the Scrollview and a new message comes in, it still scrolls automatically?
The text was updated successfully, but these errors were encountered: