Open acostarelli opened 8 years ago
Does it even have to start deleting old messages at all? What about scrolling?
That's a good idea. However, if a user were to leave the chat open for a while, would the amount of messages start to slow down their client? (I'm not sure).
If it would start slowing down the client then we should of either detecting it some way or let the user clear the chat. (BTW the send button is not aligned)
It would slow down if you collected messages infinitely, but it would take a long time. If that's a concern you can always do what SE does with chat - it pages it after X period of time and you have to explicitly request for the past Y messages
I like @danpantry 's idea, however that would probably require we store chat messages on the server; is this something we should do?
or just trim it at a certain length past visibility, and don't page the messages. like web IRC clients do
@Phrancis We could make it an option on that the server can store the message. When the client connect it checks if the server store message and store it somewhere. So if it's enabled the option of @danpantry would query the server and if not it does nothing. This will make it the chat system more elaborate though and I'm not sure it's worth it at the moment.
Maybe we could combine some ideas. We can have the chat trim at a certain length past visibility, and if the user wants to see older messages, they can press a button to get older messages stored on the server.
That's a good compromise, @marcandregirard. Perhaps have it so that the individual "version" of Cardshifter (based on the card sets given by users) can specify the URL to post/receive chat from. If not specified it just stays in localStorage
or similar
We have way too many better things to focus on than having the client query the server for old chat messages.
We should investigate what users prefer (or what they are okay with) before wasting time on adding a feature that potentially no one would even want.
@Zomis Should anything be done in the meantime, or should we just ignore this until later?
I think we should use a scrollbar for the chatmessages until that becomes a problem for game clients.
@Zomis +1. overflow-y: scroll
This is implemented in vanilla-js-rewrite
branch using CSS grids, commit 71ad9f81.
Confirmed this is continuing to be an issue in Vue.js client, will address while working on #136.
Right now, in chat, old messages are deleted when 10 messages are reached. However, due to the size of the chat box, this looks really weird:
The chat should continue to fill up until it is full before it starts deleting old messages.