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

Make character limit configurable #5697

Closed
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
@lambadalambda
Copy link

lambadalambda commented Nov 14, 2017

This adds a character limit configurable by setting and environment variable. It also adds the character limit to the initial state and instance endpoint, so clients can use it to set the correct limit.

Default is still 500 characters if no other value is set.

This relates to #5693 and #4915.

@ThibG
Copy link
Collaborator

ThibG left a comment

Looks good to me, except for the minor config naming issue.

@@ -134,3 +134,6 @@ STREAMING_CLUSTER_NUM=1
# If you use Docker, you may want to assign UID/GID manually.
# UID=1000
# GID=1000

# Maximum allowed character count
# MAX_CHARS=500

This comment has been minimized.

@ThibG

ThibG Nov 14, 2017

Collaborator

I'd suggest MAX_TOOT_CHARS or something similar, as one may want custom maximum length for other things (such as bios).

This comment has been minimized.

@lambadalambda

lambadalambda Nov 14, 2017

Author

Makes sense, i made that change.

@@ -134,3 +134,6 @@ STREAMING_CLUSTER_NUM=1
# If you use Docker, you may want to assign UID/GID manually.
# UID=1000
# GID=1000

# Maximum allowed character count
# MAX_TOOT_CHARS=500

This comment has been minimized.

@m4sk1n

m4sk1n Nov 14, 2017

Contributor

afaik, toots are called statuses in code…

This comment has been minimized.

@lambadalambda

lambadalambda Nov 15, 2017

Author

You think it's worth to rename it again?

This comment has been minimized.

@ThibG

ThibG Nov 15, 2017

Collaborator

I'm personally fine either ways. MAX_STATUS_CHARS would be more consistent with the source code, but the configuration option is intended for admins, not for developers.

@ThibG ThibG requested a review from Gargron Nov 15, 2017

@ThibG

ThibG approved these changes Nov 15, 2017

@Gargron

This comment has been minimized.

Copy link
Member

Gargron commented Nov 16, 2017

I have denied such patches in the past. If somebody wants to hack it in, they may do so, but I don't want to encourage it. I feel like the UX is designed, visually and behaviourally, around a certain number of characters, and deviations have a negative impact on it. For example, I want people to pick their Mastodon based on, for example, the policies, or the theme, but I want the base level of functionality to be the same so it doesn't go into the choice.

The same thing as here is with the file size limits. Some people want to make them bigger. Well, great, but if your users make use of those higher limits their attachments/avatars will not show up on other instances which have to cache that stuff. You can do that, but I'm not going to make that an Official Thing.

@lambadalambda

This comment has been minimized.

Copy link
Author

lambadalambda commented Nov 17, 2017

I can understand that, but many instances already change their character counts. Some do it for jokes (e.g. the 512 characters for a tech-oriented instance), some do it for real reasons (the 10.000 characters on an instance for writers).

If it's easily changeable in the main codebase or not isn't really important to me, but I'd like to have some API to get the character count of the instance, so apps can work correctly with modified servers.

@ddevault

This comment has been minimized.

Copy link
Contributor

ddevault commented Nov 17, 2017

I have denied such patches in the past. If somebody wants to hack it in, they may do so, but I don't want to encourage it. I feel like the UX is designed, visually and behaviourally, around a certain number of characters, and deviations have a negative impact on it. For example, I want people to pick their Mastodon based on, for example, the policies, or the theme, but I want the base level of functionality to be the same so it doesn't go into the choice.

👎

In my opinion, this isn't your place to decide - it's for the instances to decide. Don't make them hack it. And they are hacking it - I've seen a good handful of toots in my timeline that are rather long, and because Mastodon isn't intelligent about alternative character limits it can make for a very annoying UX to have to scroll past ridiculously long toots.

Mastodon should support arbitrary lengths (but default to 500 is totally fine, opinionated default settings are better than opinionated hardcoded values), and also have a configurable maximum length at which the rest of the toot will be hidden behind a "read more" button. We already have such a UX for content warnings, this isn't breaking new ground design-wise.

Mastodon is good because it gives users that freedom they don't have on Twitter. You should embrace that.

@connyduck

This comment has been minimized.

Copy link
Contributor

connyduck commented Nov 17, 2017

For App-Developers like me it is really important to have an API to get the character limit of the currently connected instance. Please give us an API so we can adapt our clients to the already modified mastodon-servers and provide our users the best experience.
Maybe the limit should not be configurable arbitrarly but only within a sensible limit like 140 -10 000.

@Lertsenem

This comment has been minimized.

Copy link

Lertsenem commented Nov 17, 2017

As a compromise, how about hard coding that toot with more than 500 chars get automatically wrapped in a CW with an ellipsis?

That's already kind of an informal etiquette anyway, and leaves the web UI intact for the most part.

beatrix-bitrot added a commit to glitch-soc/mastodon that referenced this pull request Nov 18, 2017

Merge pull request #223 from glitch-soc/glitchsoc/feature/configurabl…
…e-status-size

Make character limit configurable (from tootsuite#5697)

@wxcafe wxcafe referenced this pull request Nov 19, 2017

Closed

Ability to change more settings in admin panel #5693

0 of 2 tasks complete
@akihikodaki

This comment has been minimized.

Copy link
Collaborator

akihikodaki commented Nov 27, 2017

I wonder if there is any chance for this pull request to be merged. If so, we can have more discussions and improvements. If not, and this issue gets closed, others who like this change can decide to maintain it by themselves or abandon.

@lambadalambda

This comment has been minimized.

Copy link
Author

lambadalambda commented Nov 30, 2017

@Gargron Can you please either merge or close this?

@wxcafe

This comment has been minimized.

Copy link
Contributor

wxcafe commented Mar 29, 2018

@jmfcodes

This comment has been minimized.

Copy link

jmfcodes commented Apr 8, 2018

can we revisit this? if we can have a billion custom emojo, can we please please please get a 500 character limit bio as the default?

the average mastodon user doesn't fit neatly into twitter-sized boxes. it's time to give people more space to describe who they are.

@Shreewebs

This comment has been minimized.

Copy link

Shreewebs commented Sep 4, 2018

I am looking to increase TOOT character count to 600. It seems file .env.production.sample no longer has such options open.
Looking for a tweak!
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment