Closed Pasley70 closed 9 years ago
This ist also fixed with the latest git-version.
Are you sure this has been fixed? I don't remember working on anything like this.
nah - this is not my day. You are totally right. My own fix was still in the browser cache while testing your latest Version. I reopen the issue.
Sorry that i commented on this closed issue again. but I still have a complement for automatic scrolling.
Your latest implementation works fine, when you have new messages. But when you open a chat without new messages to write a new message, you still have to scroll down.
So what we need is an initial scrolling of the chat, like:
define(function(require) { var $ = require('jquery'); var elgg = require('elgg'); /* this is a repetition of your scroll-function */ var list = $(".elgg-chat-messages"); list.animate({scrollTop: list[0].scrollHeight}, 1000); [...]
What do you think?
When I use it, I always see all messages immediately. Maybe my messages are just very short? Apparently this happens only if there are very long messages that span multiple rows?
yes - sometimes we have up to 20 messages and we see max. 5 Messages. The div ".elgg-chat-messages.pbm" have a height of 400px. Here is a Screenshot:
The facts:
So yes, it seems the best way is to trigger the automatic scrolling also when the page loads the first time.
Yep, I'm totally with you.
Now I'm in fact wondering whether it should work like this:
I've added a new branch: https://github.com/juho-jaakkola/elgg-chat/tree/messaging_ui
Could you try it out and tell what you think?
This is very interesting! I have not taken into account the logic that the chat-page could be opened for longer time.
Yes, that makes sense! And works great for me! (Tested the branch "messaging_ui" successfully)
(Hmm - Now we might think about to not only receive, but also send messages via ajax :-)
Please do your best for the messaging_ui branch to:
I'll merge it to master branch once I'm sure it won't introduce any bugs and the approach is good UX in every way.
(See #8 for the ajax sending.)
Actually i let my colleagues test the functionality (potentially 50 Persons). I think, we need some days - I'll send you infos asap.
Everything works fine until no. Only one thing is striking: When i opened the Chat-Page and see new incoming messages, the chat-message-notifications (E-Mail) make no sense. Of course, on leaving Elgg the notifications make sense again!
I'm not sure what you mean by the notifications. Perhaps it's best if you open a new issue for it?
See #9
I've merged the messaging_ui branch.
It would be useful to scroll the chat-stream to the buttom of the div, so you can see the latest chat-message. Maybe with a jQuery-Function like