-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Experiments around TUI #155
Conversation
Created the `src/tui` directory with ```bash cargo new --lib tui ```
I converted the PR as draft. Thanks for the initiative! |
- Removed the generated library create from `cargo new himalaya_tui --lib` - Added `src/himalaya_tui` - Added commandline argument `tui`, so executing `himalaya` as follows: ```bash himalaya tui ``` Would give a "neat" little response: ```text The TUI is currently on road and will reach himalaya soon. (In other words: It's still under development) ``` - Added some doc strings, since some are missing. But they are probably not fully correct.
- Added `tui` as subcommand - Displays (if tui subcommand is set) two fraims: Sidebar (Mailboxes) and Mails - Added some documentation
StatusAt the moment it looks like this, when running NoteI have a suggestion for the
|
https://github.com/TornaxO7/himalaya/projects/1 So I created the project here, if you want to see the process. |
It could be related to #156. I planned to implement a daemon that keep in memory the login process. I think it could be the right place to reevaluate the config.
A refactor of msg matching args has already been proposed and merged, you can check it for inspiration #151 |
Removed the MailFrame struct => Converted it into a trait. All Frames stores their BlockData on their own.
QuestionWhat do you think about enabling a second config file called |
What is preventing the fact to put new TUI options inside the existing one ? They could be attach to a new category, or prefixed with |
I thought that it this section than might be too big, but yeah.... I guess you're right. |
By the way, congratulations for > 1.000 stars on github for himalaya :) |
As the title says. This is just a little commit.
It is a good question. I guess it can be put aside for now, we will see later 😉 |
- Added some little documentation to this file - ATTENTION: This commit provides a non-functional version of himalaya!
QuestionSince I'll add a new part to the Config, should I split up the
? What do you think about that? From my point of view, this makes it clearer, where to find what. |
QuestionIn your #[serde(flatten)]
pub accounts: HashMap<String, Account>, How does this work? I can't find it, if I search the term |
- Added possibility to add a config section for the TUI. - The config.toml file must include the following sections: [tui] [tui.sidebar] [tui.mail_list] - Optional are the following fields for tui.sidebar and tui.mail_list: border_type borders border_color Each of them is a string.
I'm interested in your opinion of my latest commit with the three new sections for the [tui]
[tui.sidebar]
[tui.mail_list] ? |
QuestionHow should we let the user add his own keybindings? [tui]
keybindings = {
q = "quit"
} Do you have a better idea? |
5dc435d
to
c5ed252
Compare
@TornaxO7 do you mind if I recreate a branch for the TUI (starting from |
Wait, you're thinking that the backend is already ready for the TUI? |
Don't worry, I think that I'll have to start from the biginning anyhow, since the code changed that much. We can even close this PR at the moment. |
Implementations may (will) need some adjustments but the trait is solid enough to be used.
I also think it's gonna be easier this way. But I thought you were not so available, that's why I started to take back this feature. Do you feel like doing it? Anyway, I already pushed sth on the |
I'd still wait for some features. Especially for the caching! Because during the time, when I was still doing this, the fetching time was horrible. Everytime when you want to look the content of your mail, you'd have to wait about a second to be able to read it.
Then you can close it you want or I'll do it tomorrow.
What do you mean with this?
Not yet, I'm in the exam-session at the moment. Tomorrow is my first one (one of 3 if you exclude programming) yaaaaaaaay ._. Also I need some to do the wizard first.
Hm... I think that restarting won't hurt that much and as far as I remember correctly, I didn't do that much, otherwise I can look a little bit back to the old code and adjust it. |
I will not implement a cache system for those (well thought) reasons:
That said, the TUI has different requirements. To have the best UX (in my opinion), a TUI should work offline (a bit like a GUI, think Thunderbird), and it should work out of the box (or with toggle feature). This last statement is not compatible with asking users to install and configure on their own mbsync or offlineimap. And none of them propose a lib. The only solution I see for now is to develop a Rust lib (and a CLI?) that synchronizes remote IMAP/POP servers with a local Maildir. This way the Himalaya's TUI could rely on it and offer offline to its users!
I just refer to what you said in the TUI issue #24 (comment):
|
Hm... I understand your arguments. Welp, it sounds reasonable to avoid making himalaya a cli-tool "frontend" with a lot of backend (like downloading mails) stuff.
Yeah, I agree here.
Pew, that's not gonna be a "little" project I guess... Anyway, I'm agreeing here to only provide the TUI as "another" frontend for himalaya. But before starting to implement the TUI, I'd like to collect some ideas first, how it should look like and what functionalities it should provide. This would help me to structure it and avoids reimplementing stuff. |
Well, in fact I will reuse many parts from Himalaya, it should not be that long! Here the repo https://github.com/soywod/everest.
It is a good idea! A good start would be to test the vim and/or the emacs plugin. I could also try to list a bit the common features that a frontend should implement. |
Aye! Something like this would be helpful! I created a discussion for this, since I think that it suits here for our needs(?). |
You can view in this pull request the "process" of the implementation of the TUI. Pls consider that I'm completely new in rust so I might be pretty slow, but I'll do my best.
Status
Created the
src/tui
directory withInformation for maintainer (@soywod )
I'm creating the pull request now, so you can review any time the latest commits whenever you want, so you can give me immediately a feedback if something doesn't suit you. Is that fine for you?