insightsengineering / teal

Exploratory Web Apps for Analyzing Clinical Trial Data
https://insightsengineering.github.io/teal/
Other
167 stars 32 forks source link

[Question]: Use of `teal` module in other `shiny` apps. #1225

Closed chlebowa closed 1 month ago

chlebowa commented 1 month ago

What is your question?

https://github.com/insightsengineering/teal/blob/06a0a581a132590e85cb147d9ab1853558ab150e/R/module_teal.R#L26

Is this still relevant if the module is not exported?

Code of Conduct

Contribution Guidelines

Security Policy

kartikeyakirar commented 1 month ago

It is no longer recommended to embed teal as a module within shiny applications. Instead, use the init function to create a standalone teal application. If integration with other Shiny apps is necessary, ui_teal_with_splash and srv_teal_with_splash should be utilized.

Thanks for pointing this out this should be removed.

chlebowa commented 1 month ago

Thanks @kartikeyakirar Will ui_teal_with_splash remain exported indefinitely?

kartikeyakirar commented 1 month ago

Although using tealas a module is not recommended, if necessary, it can be done via the teal_with_splash module. Therefore, I do not see this becoming internal in the foreseeable future.

chlebowa commented 1 month ago

Thanks 👍

chlebowa commented 1 month ago

Please note that when using teal_with_splash to embed a teal app in a shiny app, it is impossible to properly use landing_popup_module. The module is added to the tabset and even thought the popup does pop up (once), the module remains in the tabset, displaying a message that it has no UI.

on app start

image

navigating to Landing Popup

image

after dismissing modal

image

Conversely, when using init, the landing dialog behaves as in a normal teal app.

m7pr commented 3 weeks ago

Thanks @chlebowa for raising this. I created an issue for that https://github.com/insightsengineering/teal/issues/1244 so we dont forget