Update instructions. authored by Jean-Karim Heriche's avatar Jean-Karim Heriche
...@@ -2,7 +2,7 @@ In the IDE, modules are used to encapsulate sets of related functionalities and ...@@ -2,7 +2,7 @@ In the IDE, modules are used to encapsulate sets of related functionalities and
### Module structure ### Module structure
Each module is composed of a ui and a server function. The ui function takes as input the session id while the server function needs additional inputs. Below are the templates for both functions: Each module is a file under the project's R directory and should be named <module_name>.R. The module file should contain a ui and a server functions. The ui function takes as input the session id while the server function needs additional inputs. Below are the templates for both functions:
```{r} ```{r}
ui_<module_name> <- function(id) { ui_<module_name> <- function(id) {
...@@ -25,12 +25,12 @@ The session_parent variable is currently only needed when automatically switchin ...@@ -25,12 +25,12 @@ The session_parent variable is currently only needed when automatically switchin
### Adding a module to the app ### Adding a module to the app
To add a new module to the sidebar menu, add a new entry to the sideBarMenu() function in the server function in image\_data\_explorer.R (line 141). Below is a template for a new menuItem entry: To add a new module to the sidebar menu, add a new entry to the sideBarMenu() function of the server function in image\_data\_explorer.R (line 141). Below is a template for a new menuItem entry:
``` ```
menuItem(HTML("&nbsp;&nbsp;<Name to display>"), tabName = "<Workspace name>", icon = icon("<icon name>")), menuItem(HTML("&nbsp;&nbsp;<Name to display>"), tabName = "<Workspace name>", icon = icon("<icon name>")),
``` ```
The corresponding workspace is created as a new tabItem() entry in the dashboardBody() function in the ui() function in image\_data\_explorer.R. Below is a template for a new tabItem entry: The corresponding workspace is created as a new tabItem() entry in the dashboardBody() function of the ui() function in image\_data\_explorer.R. Below is a template for a new tabItem entry:
``` ```
tabItem( tabName = "<Workspace name>", tabItem( tabName = "<Workspace name>",
fluidRow( fluidRow(
... ...
......