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

add options to improve message indenting in long threads #695

Open
xunam opened this issue Mar 5, 2014 · 1 comment
Open

add options to improve message indenting in long threads #695

xunam opened this issue Mar 5, 2014 · 1 comment

Comments

@xunam
Copy link
Contributor

xunam commented Mar 5, 2014

In a long thread, the display of messages and headers in thread view becomes problematic: say you have a terminal with standard width of 80 characters and a thread with 30 successive replies, with 2 characters of indenting for each message you end up with a width of only 20 characters for actually displaying a message. Over 40 messages, the display gets messed up as Urwid does what it can to fit long lines in its display (worst case: a whole message displayed with a width of 1 character).

I don't have definitive solutions to suggest, but a few (not mutually exclusive) possiblities might improve things:

  • add an option that would allow message headers and bodies to not be indented at all (with a suitable theme, the distinction between thread structure and message bodies would still be visible)
  • allow for horizontal scrolling (or shifting everything to the left, when focusing on late messages in a long thread)
  • do not indent systematically but only when a given message has at least two replies: this way a long thread with no "branching" would appear linear, which would be more readable (in my opinion)
@pazz
Copy link
Owner

pazz commented Mar 19, 2014

The problem with al this is that urwis has no proper way of displaying widgets of virtual size (i think)
The best solution would be to have a widget that is large enough to fit in nicely,
and then display only the small part of it that fits in the terminal, allowing for scrolling in all directions.
I'm not entirely sure that this isn't possible by now (please check!).

As a short-term solution, i propose to add commands that change the parameters of the widget tree, in particular the indent witdh. The corresponding code is in buffers/threadbuffer.py
and it builds tree-widgets from my library (alot.foreign.urwidtrees)..

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

No branches or pull requests

2 participants