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

feat: Add ExecuteCommand action in component template #62

Closed

Conversation

deepanchal
Copy link
Contributor

Description

Adds Action::ExecuteCommand in component template to demonstrate spawning child processes from tui. This PR is related to this thread ratatui/ratatui-website#651 (comment)

The goal is to add this functionality directly to component template so that we can demonstrate

pausing the key event handler before spawning vim and restarting the key event handler after resuming from vim exiting
and link to this feature from ratatui docs on How to spawn vim (ratatui/ratatui-website#651)

I am not sure if this is out of scope for the component template. Any feedback is appreciated!! Thanks!

…wning external command

Signed-off-by: Deep Panchal <deep302001@gmail.com>
@kdheepak
Copy link
Contributor

It feels a little misplaced in a template but I'm also not sure how to better convey that this is how this feature should be implemented.

I'm open to being overruled though.

@joshka
Copy link
Member

joshka commented Jul 14, 2024

It feels a little misplaced in a template but I'm also not sure how to better convey that this is how this feature should be implemented.

I'm open to being overruled though.

I agree - I wanted to let you weigh in on it first before I said something though as I'm just 70/30 against.

@deepanchal
Copy link
Contributor Author

I think that adding vim spawning logic in component template is a bit too specific. I think we need a little more generic example in template. Also, we have some open PRs like this one (ratatui/ratatui#1180) which might make big changes in the template repo, so I was also thinking about long term maintenance of the template. Although vim is a good example since it needs control over input/outputs, I think we need to spawn some other command which does a better job at demonstrating pausing tui, spawn child process, and resume tui. We may not need this at all. Just a thought

@kdheepak
Copy link
Contributor

Maybe linking to this PR might be good stopgap solution for now?

@deepanchal deepanchal closed this Sep 1, 2024
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

Successfully merging this pull request may close these issues.

3 participants