Open Cotix opened 11 years ago
I've been reading up on ncurses. I have some ideas. Hopefully I will get some time to work on it this weekend.
Status?
We still need to do something about the ui. The comment section is really hard to follow.
Have any of you used mutt before? I'd personally recommend a UI similar to it (mutt is a mail client). The basic idea with the interface would be to show replies as 'branches' off of the base comment, using little ASCII characters. It kinda looks like this in mutt (But nicer since it uses the ASCII box-drawing characters, which I don't have here):
Base comment '1'
| - Re: 1
| | - Re: Re: 1
| | - Re: Re: 1
| | | - Re: Re: Re: 1
| | | | - Re: Re: Re: Re: 1
| | - Re: Re: 1
| - Re: 1
When you want to read a comment's full body, you select it from the list and press enter or some other similar key. That then opens a second box taking up around 3/4 of the bottom of the screen which shows the body text. The top 1/4 of the screen continues to show the structure of comments so you can navigate while you're also reading the comments. It's very nice for email, and it should translate well to a threaded comment setup.
Yea I was thinking about a layout like that too, I think it would be great.
As it is right now, over on my 'reddit-api' branch I have display comment display disabled completely (Just completely commented out in the code) because I'm still implementing the comment API setup (It's buggy and not complete at the moment). I don't think implementing comments is to far away since a good portion of the code is there, it's just not completely functional yet. When it is, I'll try out this kind-of setup on that branch and see how it goes (I don't really think it'll be that hard, especially if I just render each line to a separate list of strings and then also keep a list of the RedditComment pointers for each line).
Okay, sounds good. Just do a pull request when its ready :D
I don't know if the ncmpcpp code is any use to you but it has by far the best and most understandable config I've ever seen for formatting a similar list of data. Cortex (python) actually has a pretty decent config file, but it's much less stable for me than your application is. If it's at all useful maybe I can draft up some annotated PNGs of layout suggestions? (I'm a front-end dev)
I opened a separate issue on config-file related stuff (#50). I'll make a response comment to your idea over there (I've ended up being stretched for time today though, so I can't make a proper response yet).
I'd be happy to see some ideas for layout suggestions. I've recently been working on overhauling the internals and implementing the main part of the interface will be next after that part is fairly stable. I've been leaning heavily toward a mutt-like interface (If you've ever used mutt, it's a mail client), but I'd be happy to see other suggestions. When designing you should probably keep in mind that horizontal splits are much easier to pull-off (And less-resource intensive) then vertical splits when dealing with ncurses and the terminal. At the same time though, you can definitely still do them, so if you do come up with a good interface with them please share it by all means.
I love ncurses, but we cant just dump all comments in one big pile. We need some kind of formatting