wangp / bower

A curses terminal client for the Notmuch email system
Other
119 stars 11 forks source link

Add thread_ordering to config options #66

Closed seifferth closed 3 years ago

seifferth commented 3 years ago

Although bower provides both threaded and flat views of a thread, the default that appears when I open a new thread had been hardcoded to be the threaded view. Since that makes some of my threads run off the right side of my screen, I found myself almost automatically pressing 'O' after opening a message to view. This commit adds a config option to customize the default view while retaining the current behaviour if the option is not set.

wangp commented 3 years ago

Hmm, does this come up often for you? Perhaps we can automatically detect when a thread would be too deeply nested and automatically select the flat view in that case.

seifferth commented 3 years ago

Well, actually, I do also happen to prefer the flat view. So in summary, I would actually be happy to have this option (well, actually I am happy since I have it on my branch).

I guess it would be possible to detect how much the display runs off the screen (or how much of the screen is used purely for indent), but way harder to decide when this is a problem. It clearly is a problem if everything that's visible is whitespace. It is clearly no problem for the top level, which doesn't have indent. Everything in between is probably (at least partially) a matter of taste.

Adding this option would also not rule out the option of adding autodetection at a later point. I. e. we could simply add an option "auto" (maybe even use that as default), that uses some heuristics to determine which view is better. While I do agree that it is a good idea to keep the amount of knobs low, I also hope that this one wouldn't be too bad. We already have lots of parameters for UI colors, for instance, and the two views already exist (just with a hardcoded default).

wangp commented 3 years ago

Ok, thanks!