Cardshifter / HTML-Client

HTML/CSS/JS-based client for Cardshifter
http://cardshifter.zomis.net
Apache License 2.0
13 stars 5 forks source link

Fill chat box #121

Open acostarelli opened 8 years ago

acostarelli commented 8 years ago

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.

Zomis commented 8 years ago

Does it even have to start deleting old messages at all? What about scrolling?

acostarelli commented 8 years ago

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).

marcandregirard commented 8 years ago

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)

punmechanic commented 8 years ago

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

Phrancis commented 8 years ago

I like @danpantry 's idea, however that would probably require we store chat messages on the server; is this something we should do?

The-Quill commented 8 years ago

or just trim it at a certain length past visibility, and don't page the messages. like web IRC clients do

marcandregirard commented 8 years ago

@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.

acostarelli commented 8 years ago

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.

punmechanic commented 8 years ago

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

Zomis commented 8 years ago

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.

acostarelli commented 8 years ago

@Zomis Should anything be done in the meantime, or should we just ignore this until later?

Zomis commented 8 years ago

I think we should use a scrollbar for the chatmessages until that becomes a problem for game clients.

punmechanic commented 8 years ago

@Zomis +1. overflow-y: scroll

Phrancis commented 6 years ago

This is implemented in vanilla-js-rewrite branch using CSS grids, commit 71ad9f81.

Phrancis commented 6 years ago

Confirmed this is continuing to be an issue in Vue.js client, will address while working on #136.