tui-go icon indicating copy to clipboard operation
tui-go copied to clipboard

Modal windows/dialogs

Open marcusolsson opened this issue 8 years ago • 7 comments

tui-go should support modal windows that ask for confirmation or other user input. This would be painted on top of the application and will need some design discussions on how to support basic compositing.

Example:

┌──────────────┐
│ Really quit? │
│              │
│ OK    Cancel │
└──────────────┘

marcusolsson avatar Jul 25 '17 13:07 marcusolsson

Agree (from previous discussion) about everything being keyboard friendly. I think the easiest way to support this feature is just having layers where all keyboard input is sent to the current layer. Regarding rendering, initially a painters algorithm would be easiest, then we can look at optimising this if needed.

leaanthony avatar Jul 25 '17 22:07 leaanthony

I agree that would probably be a great place to start :+1:

marcusolsson avatar Jul 26 '17 14:07 marcusolsson

Maybe add two types of modals. Full width as well as those need to just stay in the center.

meain avatar Nov 04 '17 06:11 meain

any updates on this request?

Syleron avatar Dec 28 '17 09:12 Syleron

Unfortunately not. I've had limited time to work on tui lately and have been prioritizing bugs. It would be really helpful if you wanted to share your use case and thoughts on how you'd expect the API to look.

marcusolsson avatar Dec 28 '17 10:12 marcusolsson

@Syleron Pushed some work-in-progress of this in #103. If you have the time, let me know if this would work for you!

marcusolsson avatar Jan 06 '18 20:01 marcusolsson

@marcusolsson Thank you! I will have a closer look and get back to you.

Syleron avatar Jan 11 '18 09:01 Syleron