Skip to content

Commit df845e8

Browse files
margotbrdColinFay
authored andcommitted
Remove _ui from modules names fixes issue #651
1 parent 2cf3efd commit df845e8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

R/add_modules.R

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ module_template <- function(
187187
write_there(" ")
188188

189189
write_there("## To be copied in the UI")
190-
write_there(sprintf('# mod_%s_ui("%s_ui_1")', name, name))
190+
write_there(sprintf('# mod_%s_ui("%s_1")', name, name))
191191
write_there(" ")
192192
write_there("## To be copied in the server")
193-
write_there(sprintf('# callModule(mod_%s_server, "%s_ui_1")', name, name))
193+
write_there(sprintf('# callModule(mod_%s_server, "%s_1")', name, name))
194194

195195

196196
} else {
@@ -212,10 +212,10 @@ module_template <- function(
212212
write_there(" ")
213213

214214
write_there("## To be copied in the UI")
215-
write_there(sprintf('# mod_%s_ui("%s_ui_1")', name, name))
215+
write_there(sprintf('# mod_%s_ui("%s_1")', name, name))
216216
write_there(" ")
217217
write_there("## To be copied in the server")
218-
write_there(sprintf('# mod_%s_server("%s_ui_1")', name, name))
218+
write_there(sprintf('# mod_%s_server("%s_1")', name, name))
219219

220220
}
221221
}

inst/manualtests/script.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ui <- readLines("R/app_ui.R")
6666
ui <- append(
6767
ui,
6868
c(
69-
',mod_my_first_module_ui("my_first_module_ui_1")'
69+
',mod_my_first_module_ui("my_first_module_1")'
7070
),
7171
grep(
7272
"h1",
@@ -79,7 +79,7 @@ server <- readLines("R/app_server.R")
7979
server <- append(
8080
server,
8181
c(
82-
'callModule(mod_my_first_module_server, "my_first_module_ui_1")'
82+
'callModule(mod_my_first_module_server, "my_first_module_1")'
8383
),
8484
grep(
8585
"first level callModules",

0 commit comments

Comments
 (0)