Skip to content
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

Long messages are not truncated upon display #280

Open
joker314 opened this issue Mar 3, 2018 · 14 comments
Open

Long messages are not truncated upon display #280

joker314 opened this issue Mar 3, 2018 · 14 comments
Labels
design Like, CSS and stuff. discuss We should discuss this.

Comments

@joker314
Copy link
Contributor

joker314 commented Mar 3, 2018

Expected Behaviour

When you receive a really long message, it shouldn't take up the whole screen, because that's annoying

Actual behaviour

The full message is displayed

Steps to reproduce

  1. Go to a server where you can write messages
  2. Send a message which is very very long
  3. Observe that it takes up all the space

Suggested fix

This needs discussion. We want to be able to allow paragraphed and mature discussion; but we don't want people to be able to spam. Options from other sites:

  • [Discord] Character limit + Message rate limiting (not effective, but it works for them)
  • [YouTube] "Read More" button when height of message exceeds certain value (very effective - as it allows mature discussion; drawback is that once you open a message you have to scroll to the bottom to close it)
  • [My own] Use Youtube's method, but have "Read more" open a sort-of pop-up which can be closed with an "X". The pop-up has a scrollbar, but the "X" is always in view
  • [My own] Mix Youtube's and Discord's methods. Have messages be restricted in length, yet still shorten them when displayed unless the user wants to do something else. This also may prevent people taking up the entire server memory, etc.
@towerofnix towerofnix added the discuss We should discuss this. label Mar 3, 2018
@towerofnix
Copy link
Member

Ping @PullJosh especially for design input.

@towerofnix
Copy link
Member

Taking up server memory is unfortunately not something we've dealt with at all, yet... it's very easy to quickly send tons of long, space-taking messages. (Or, more directly, to upload many images, but that's another topic.)

Would a combination of your third and fourth suggestions work? I love the third idea for its UI but I wonder if it makes sense to have a (very long) character limit as well.

@bates64
Copy link
Collaborator

bates64 commented Mar 3, 2018

We can make the character limit a server setting? (Alongside Delete messages after (n) years etc.)

@bates64 bates64 added the design Like, CSS and stuff. label Mar 3, 2018
@bates64
Copy link
Collaborator

bates64 commented Mar 3, 2018

We should also truncate message length in the pins and mentions tabs in the right sidebar. Because there's so little space for the message even not-too-long ones end up taking loads of vertical space.

@joker314
Copy link
Contributor Author

joker314 commented Mar 3, 2018

I like the server setting idea, but as Flo said, we'll need to have a hard think about how to ensure people can't crash the server.

I agree that we should definitely cut the messages off in pins and mentions, but we should be careful about languages where different characters are used depending on where a letter appears in a word.

@bates64
Copy link
Collaborator

bates64 commented Mar 3, 2018

we'll need to have a hard think about how to ensure people can't crash the server

If a server admin sets the limit to 9000000, it's not our problem. I want to allow server owners to have as much freedom as possible; but we could default the limit to 500.

@joker314
Copy link
Contributor Author

joker314 commented Mar 3, 2018

Okay, but what about writing several messages successively, does Decent have adequate rate limiting?

@bates64
Copy link
Collaborator

bates64 commented Mar 3, 2018

Decent has no rate-limiting as of yet. (We should include this into 1.0.0 @towerofnix!)

@joker314
Copy link
Contributor Author

joker314 commented Mar 3, 2018

Right, this should probably change at some point. Has a separate issue been filed?

@towerofnix
Copy link
Member

Rate limiting is almost a separate topic (though related). I don't think there's an issue for it yet. One thought on how it should be implemented is how to prevent users from simply signing up another account and spamming with that one (if we limit per-account). Except for on authorized servers / servers where users have no write permission by default, anybody can post data simply by registering.

@bates64
Copy link
Collaborator

bates64 commented Mar 3, 2018

We could rate-limit the register endpoint at 2 successful requests/day or something?

@joker314
Copy link
Contributor Author

joker314 commented Mar 3, 2018

Per IP? People can use proxy scripts and such, it's not too likely to work. You could try and place a CAPTCHA restriction?

@towerofnix
Copy link
Member

@joker314 I extremely am not going to depend on Google for the sake of captcha. I'd much sooner default servers to simply not give users write permissions without an admin adding a "chat" role.

@bates64
Copy link
Collaborator

bates64 commented Mar 3, 2018

@towerofnix note that there are other CAPTCHA providers than Google, although theirs is objectively the best. Regardless, I want registers to be open so bots can register themselves on a server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Like, CSS and stuff. discuss We should discuss this.
Projects
None yet
Development

No branches or pull requests

3 participants