japhb / Terminal-Widgets

Simple Raku widgets for full-screen TUIs
Artistic License 2.0
4 stars 3 forks source link

Feature Request: Popovers #14

Open patrickbkr opened 6 months ago

patrickbkr commented 6 months ago

In the debugger I'd like to sometimes use popovers. Specific cases:

Why would I like popovers / dialogs instead of full-screen views in some cases? Full-screen views have the potential to confuse users that are not yet able to follow the flow of the UI in their head. Popovers leave the UI that prompted the dialog in the background, giving a sense of "the UI I know is still there, one hit of ESC, will surely bring me back."

Sidenote: That's also a reason, why I'd like to keep the buttons at the bottom of the UI always visible, so there is a bit of context that never changes and provides a UI navigation top-level.

References I have in mind: vim autocomplete popovers, ncurses dialogs.

japhb commented 5 months ago

These are definitely a good idea, and have been churning in the back of my head for a while; this is the reason that widgets know their Z index, for example -- to keep track of multiple layers of popovers, dialogs, etc.

I have a proof of concept in another project, but it needs some generalization to be useful as part of T-W itself.