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

Cut off more text on small terminals #1171

Open
lzmartinico opened this issue Mar 15, 2022 · 6 comments
Open

Cut off more text on small terminals #1171

lzmartinico opened this issue Mar 15, 2022 · 6 comments

Comments

@lzmartinico
Copy link

When using zulip-terminal on a small terminal size, some strings can take a lot of space, reducing the message area significantly. The most egregious examples are long user names, which increase the size of the users bar, and the combination of the top header in the message column (e.g. All messages, Group private conversation etc) + the "Search /" string will sometimes take more than one line.
When the terminal size is below some threshold, some of this strings should be elided to save space. This already happens in the Streams sidebar, where stream names that include multiple words are cut off with ellipses if too long

@neiljp
Copy link
Collaborator

neiljp commented Mar 15, 2022

@lzmartinico As per my comment in #1170, I suspect a lot of your concerns may be helped by use of autohide, at least in terms of making more column space available for messages?

We have had a few discussions on ways to minimize vertical space, though generally haven't settled on approaches that retain UI elements that seem useful. One alternative is eg #1016.

@lzmartinico
Copy link
Author

Indeed autohide does solve a lot of the issues I had with width, and #1016 would help a lot if disabled. I still want to keep this open to address the long usernames issue. Obviously this is not something everyone would want (a realm having two users with long name starting the same way) so it might be something that is left to as a configuration option. However currently there is an inconsistency between the truncation of stream names (if they are made of multiple words) and lack thereof for user names

@neiljp
Copy link
Collaborator

neiljp commented Mar 17, 2022

I'm a little unclear what behavior you're referring to in the user list?

Streams, topics and user names should all be truncated (with an ellipsis) in the side panels if there is insufficient space, in the same way.

Regarding users with similar names, we now have a user info popup via i which should help (if manually).

Generally we've set the panel widths to those to show those on chat.zulip.org well, which while is only a first approximation to general usage, does demonstrate a fairly large use-case. I think we did increase the width of at least one of these panels for the next release, but we could increase them further, perhaps particularly in autohide mode.

@lzmartinico
Copy link
Author

As far as I can tell (on my server) usernames don't get truncated, so we have two users with longer names than anyone else who make the panel too large. Maybe my server has generally shorter names than chat.zulip.org and so everyone's name still falls within the default panel width.
I think it would be nice to either:

  1. set the panel length as a configuration parameter
  2. add some "smart" logic to it such that if only a percentage of users <5% (or similar) has a name x% longer than the other 95%, truncate them

@neiljp
Copy link
Collaborator

neiljp commented Mar 18, 2022

The Users panel is currently a fixed width - see the main screenshot embedded in the README on github, where some users have a .... That is from version 0.6.0. I'm not quite sure what is happening otherwise.

My only thought is if we're talking about different elements, since in the message list, user names are not shortened in that way (though with autohide they'd have to pretty long!).

@lzmartinico
Copy link
Author

Hi, sorry for not replying to this sooner, I missed your comment somehow.
I guess what I am trying to say is that I think the users panel should not have a fixed width, but that it should be calculated relative to the set of registered user, so that if a small percentage of users have particularly long names it will truncate them. In practice this would mean that if a realm primarily had users with shorter names than the current minimum width, the panel would be more narrow than the current implementation.
Of course, with autohide this is really not that important, so feel free to close this!

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

No branches or pull requests

2 participants