golem
golem copied to clipboard
Feature request for warning users of nested modules
This is not really an issue, but more like a feature request.
{golem} does an incredible job providing assistance throughout the Shiny app's development process. Consequently, users (like me) are not really inclined to check/modify the code that is automatically generated by the app. To illustrate it, when I create a new module, I do not even attempt to change the automatically generated (and fairly long) id given to me by the package. Well, this behavior of mine (which I suspect many {golem} addicts share), cost me quite a significant amount of time in a project I am currently working on.
I usually build my Shiny applications with nested modules. When a module goes into the app_ui.R and app_server.R files, then the code provided by the package is perfect. However, if a new module is created and meant to go into another module, then the user needs to add the namespace function ns() to the id. Overlooking this very basic fact was a consequence of me "being spoiled" by {golem}!
My feature request is to devise a way to let the users know that ns() should be added to the module UI and server functions in case they want to nest modules.
Thank you
Thanks!!
I'm on the same page as it might relates to https://github.com/ThinkR-open/golem/issues/124, I'm not sure issuing warning would be the way.
I think we should natively ns all ids, as it's hard to check if a module is nested or not, even more if the module structure changes.
Hey,
I'm closing this issue for now, I'm not sure we can reliably do that unfortunately.