rstudio / shinyuieditor

A GUI for laying out a Shiny application that generates clean and human-readable UI code
https://rstudio.github.io/shinyuieditor/
MIT License
209 stars 29 forks source link

Modals #178

Open kramerrs opened 11 months ago

kramerrs commented 11 months ago

I think it would be really cool if shinyuieditor supported modals. Modals are a sore point with shiny. Using other languages like vb or even http based UIs for example it is relatively easy to display as many modals(forward to other URLs) as is necessary, and edit the layout. In Shiny it is relatively difficult process to build them, and see them, as you have to navigate to the modal, furthermore the process is really difficult if you have a modal within a modal, which would be normal if you wanted to do input verification on a form within an app. In Visual Studio this is fairly easy, as modals are blocking. Display the form when the form is complete get the data, however in Shiny you end up back in the main event handler. It's a design issue in shiny I described, but a UI for drawing various modals would go a long way towards improving data collection.

nstrayer commented 9 months ago

This is an interesting (and tricky) one! The main difficulty I see is that modals are by definition not visible in the default state which makes them hard to fit into the "drag and drop" paradigm the ui editor uses.

Would you envision something like a button that could be pressed and then a modal would appear that you could populate with content?

kramerrs commented 9 months ago

You could use a modal to display another form for editing.