rat_salsais a very useful library for builing TUIs with ratatui, particularly the focus widgets and the mouse interactions. I was wondering whether an async template similar to the component template could be made, which usesrat_salsafor components and other actions.- Inline TUIs are incredibly useful, and a template on how to make them would be super useful!
Activity
4I think this can be a part of ratatui/ratatui-website#947
Sure, i'll add a comment to https://github.com/ratatui/ratatui-website/issues/947
Inline makes sense as a template as it's a growing area of TUI apps. I'd suggest building something for this out in your own repo and then working out if there's a good enough idea to incorporate into something usable for all. One of the things that is problematic about providing an opinionated template is that the opinions propagate even if they're sub-optimal or are replaced with better options over time. For this reason, I tend to like lean templates that we don't have to think too much about or maintain over deeper ones where the nuanced choices are visible.
rat-salsa belongs to @thscharler so it would be better for them to own a template for it rather than us.
rat_salsais a very useful library for builing TUIs with ratatui, particularly the focus widgets and the mouse interactions. I was wondering whether an async template similar to the component template could be made, which usesrat_salsafor components and other actions.
Have a look at https://github.com/thscharler/rat-salsa/tree/master/rat-salsa/examples
There is async1.rs which shows how to run tokio tasks.
The main event loop and the ui remain in sync land and I don't have plans to change that any time soon.
- Inline TUIs are incredibly useful, and a template on how to make them would be super useful!
There are two examples half_ui.rs and inline.rs that show how to create that kind of ui.
With rat-salsa 2.0 I added a lot of functionality to configure the Terminal. And SalsaContext now has the functionality to
- get access to the Terminal
- to get hold of
insert_beforefrom Terminal and integrate it with rendering.
I think this can be a part of https://github.com/ratatui/ratatui-website/issues/947