Skip to content

Commit 8998adc

Browse files
committed
⚡ update modules
1 parent 1f49553 commit 8998adc

File tree

2 files changed

+164
-82
lines changed

2 files changed

+164
-82
lines changed

R/mod_comp_tour.R

Lines changed: 80 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ mod_comp_tour_server <- function(id, rv) {
6363
text_device <- reactive({
6464

6565
span(
66-
"Set the 'GPS battery life' to 2 years and the",
67-
"'maximum GPS fix rate' to 1 fix every 6 hours.")
66+
"Set the",
67+
span("GPS battery life", class = "txt_code inline"),
68+
"to 2 years and the",
69+
span("maximum GPS fix rate", class = "txt_code inline"),
70+
"1 fix every 6 hours.")
6871

6972
}) # end of reactive, text_device()
7073

@@ -136,12 +139,11 @@ mod_comp_tour_server <- function(id, rv) {
136139
"Follow these instructions carefully,",
137140
"as later parts of the tutorial require that all",
138141
"previous steps were performed.",
139-
p(), "If no action is requested, simply proceed",
140-
"to the next step by",
141-
142+
p(),
142143
span(class = "tour_action", action_bell,
143-
"clicking on the 'Next' button or using the right",
144-
"arrow of your keyboard.")
144+
"If no action is requested, simply proceed",
145+
"to the next step by clicking on the 'Next' button",
146+
"or using the right arrow of your keyboard.")
145147
)))
146148

147149
element <- c(element, "#Tour_start")
@@ -164,9 +166,12 @@ mod_comp_tour_server <- function(id, rv) {
164166
HTML(paste(
165167
"You will be guided through a real",
166168
"animal tracking project available through the",
167-
span("ctmm R", class = "cl-grn"), "package.",
169+
span(
170+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
171+
class = "txt_code inline"), "package.",
168172
"For assistance with a simulation from scratch, exit",
169-
"this tour (click the ", span("x", class = "cl-grey"),
173+
"this tour (click the ",
174+
span("x", class = "txt_bold cl-grey"),
170175
" button above) and go to the",
171176
fontawesome::fa("file-pen", fill = pal$sea),
172177
span("Simulate data", class = "cl-sea-l"),
@@ -176,16 +181,20 @@ mod_comp_tour_server <- function(id, rv) {
176181
span(class = "tour_action", action_bell,
177182
"Please choose",
178183
fontawesome::fa("square-check", fill = "white"),
179-
"'Select' as your Data source, to choose",
180-
"from a list of available species, ",
181-
"and both ",
184+
span("Select", class = "txt_code inline"),
185+
"as your Data source, to choose",
186+
"from a list of available species,",
187+
"and both",
182188
fontawesome::fa("square-check", fill = "white"),
183-
"'Home range' and ",
189+
span("Home range", class = "txt_code inline"),
190+
"and",
184191
fontawesome::fa("square-check", fill = "white"),
185-
"'Speed & distance' as your research targets.",
192+
span("Speed & distance", class = "txt_code inline"),
193+
"as your research targets.",
186194
br(),
187-
"For analytical targets,",
188-
"select 'Individual estimate'.")
195+
"For analytical targets, select",
196+
wrap_none("Individual estimate",
197+
css = "txt_code inline", "."))
189198
)))
190199

191200
element <- c(element, ".sidebar")
@@ -197,7 +206,9 @@ mod_comp_tour_server <- function(id, rv) {
197206
fontawesome::fa("file-circle-plus", fill = pal$sea),
198207
span("Select data", class = "cl-sea-l"),
199208
"tab (to load a dataset from the",
200-
span("ctmm", class = "cl-grn"), "package),",
209+
span(
210+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
211+
class = "txt_code inline"), "package),",
201212
"then the (2)",
202213
fontawesome::fa("stopwatch", fill = pal$sea),
203214
span("Sampling design", class = "cl-sea-l"), "tab",
@@ -216,7 +227,8 @@ mod_comp_tour_server <- function(id, rv) {
216227
"Proceed to the next step",
217228
"as it will move you to the",
218229
fontawesome::fa("file-circle-plus", fill = "white"),
219-
"'Select data' tab automatically.")
230+
span("Select data", class = "txt_code inline"),
231+
"tab automatically.")
220232
)))
221233

222234
## Data tabs: -------------------------------------------------------
@@ -227,8 +239,10 @@ mod_comp_tour_server <- function(id, rv) {
227239
intro,
228240
HTML(paste(
229241
"In this tab, you will be able to select one of the seven",
230-
"species available in the", span("ctmm", class = "cl-grn"),
231-
"package.",
242+
"species available in the",
243+
span(
244+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
245+
class = "txt_code inline"), "package.",
232246
"Parameters extracted from one of the species provided",
233247
"can help inform tracking studies of",
234248
"species with similar",
@@ -290,7 +304,8 @@ mod_comp_tour_server <- function(id, rv) {
290304

291305
"Now, pick individual 'Cilla' from the dropdown menu",
292306
"and click the", fontawesome::fa("wand-magic-sparkles"),
293-
"'Validate' button before proceeding."),
307+
span("Validate", class = "txt_code inline"),
308+
"button before proceeding."),
294309
p(),
295310
"Outside of this tour, you can also select an",
296311
"individual from the table or",
@@ -317,8 +332,10 @@ mod_comp_tour_server <- function(id, rv) {
317332
class = "tour_action", action_bell,
318333
"The button should now read",
319334
fontawesome::fa("circle-check"),
320-
"'Validated!'. Now click the",
321-
fontawesome::fa("paper-plane"), "'Extract' button.")
335+
wrap_none(
336+
span("Validated!", class = "txt_code inline"), "."),
337+
"Now click the", fontawesome::fa("paper-plane"),
338+
span("Extract", class = "txt_code inline"), "button.")
322339
)))
323340

324341
element <- c(element, paste0(tab3, "selectBox_schedule"))
@@ -442,7 +459,7 @@ mod_comp_tour_server <- function(id, rv) {
442459
class = "tour_action", action_bell,
443460
"Select the point in the figure corresponding to",
444461
"the sampling interval to",
445-
span("2 hours", class = "cl-sea-l"),
462+
span("2 hours", class = "txt_code inline"),
446463
"(equal to a frequency of",
447464
wrap_none(
448465
span("12 fixes per day", class = "cl-sea-l"), ")."))
@@ -456,9 +473,13 @@ mod_comp_tour_server <- function(id, rv) {
456473
class = "tour_action", action_bell,
457474

458475
"Click the", fontawesome::fa("wand-magic-sparkles"),
459-
"'Validate' button until it reads 'Validated!',",
476+
span("Validate", class = "txt_code inline"),
477+
"button until it reads",
478+
wrap_none(
479+
span("Validate", class = "txt_code inline"), ","),
460480
"then click the", fontawesome::fa("bolt"),
461-
"'Run' button."),
481+
span("Run", class = "txt_code inline"),
482+
"button."),
462483
p(),
463484
"You will see two notifications: the first during",
464485
"the calculation of the expected run time,",
@@ -504,7 +525,7 @@ mod_comp_tour_server <- function(id, rv) {
504525
# span(
505526
# class = "tour_action", action_bell,
506527
# "Throughout this walkthrough, you can click on the",
507-
# fontawesome::fa("bookmark"), "'Show table'",
528+
# fontawesome::fa("bookmark"), "Show table",
508529
# "button to show relevant inputs and outputs",
509530
# "in a table for a quick overview."),
510531
# p(),
@@ -543,14 +564,17 @@ mod_comp_tour_server <- function(id, rv) {
543564
"For this step, we are using the",
544565
span("Autocorrelated Kernel Density Estimator (AKDE)",
545566
class = "cl-sea-l"), "method available in the",
546-
span("ctmm", class = "cl-grn"),
547-
"R package.",
567+
span(
568+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
569+
class = "txt_code inline"),
570+
"package.", br(),
548571

549572
span(
550573
class = "tour_action", action_bell,
551574

552-
"Click on the", fontawesome::fa("paper-plane"),
553-
"'Run estimation' button to estimate home range area.")
575+
"Click on the", fontawesome::fa("paper-plane"),
576+
span("Run estimation", class = "txt_code inline"),
577+
"button to estimate home range area.")
554578
)))
555579

556580
# element <- c(element, paste0(tab5, "hrBox_viz"))
@@ -588,9 +612,9 @@ mod_comp_tour_server <- function(id, rv) {
588612
" (low", HTML("&#x2014"), "high), ",
589613
"as the point estimate is subject to uncertainty."),
590614
p(),
591-
fontawesome::fa(name = "radiation", fill = "#bdbdbd"),
615+
fontawesome::fa(name = "radiation", fill = "#DB4545"),
592616
wrap_none(
593-
span("Relative error", class = "cl-dgr-l"),
617+
span("Relative error", class = "cl-dgr"),
594618
", which, for a single simulation",
595619
" is the ", span("error (in %)", class = "cl-dgr-l"),
596620
" of the point estimate (and of the 95% CIs;",
@@ -625,7 +649,7 @@ mod_comp_tour_server <- function(id, rv) {
625649
# class = "tour_action", action_bell,
626650
# "You can once again see all outputs to a table",
627651
# "by clicking on the", fontawesome::fa("bookmark")
628-
# , "'Show table'", "button located at the bottom",
652+
# , "Show table", "button located at the bottom",
629653
# "of the box."
630654
# )
631655
# )))
@@ -659,12 +683,14 @@ mod_comp_tour_server <- function(id, rv) {
659683
"For this step, we are using the",
660684
span("Continuous Time Speed & Distance (CTSD)",
661685
class = "cl-sea-l"), "estimator available in the",
662-
span("ctmm", class = "cl-grn"),
663-
"R package.", p(),
686+
span(
687+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
688+
class = "txt_code inline"), "R package.", p(),
689+
664690
span(class = "tour_action", action_bell,
665-
666691
"Click on the", fontawesome::fa("paper-plane"),
667-
"'Run estimation' button to estimate speed & distance.")
692+
span("Run estimation", class = "txt_code inline"),
693+
"button to estimate speed & distance.")
668694
)))
669695

670696
# element <- c(element, paste0(tab6, "sdPlot_path"))
@@ -720,7 +746,7 @@ mod_comp_tour_server <- function(id, rv) {
720746
# span(class = "tour_action", action_bell,
721747
# "You can once again see all outputs to a table",
722748
# "by clicking on the", fontawesome::fa("bookmark")
723-
# , "'Show table'", "button located at the bottom",
749+
# , "Show table", "button located at the bottom",
724750
# "of the box."
725751
# )
726752
# )))
@@ -757,7 +783,8 @@ mod_comp_tour_server <- function(id, rv) {
757783
class = "tour_action", action_bell,
758784

759785
"Click the", fontawesome::fa("bookmark"),
760-
"'Build report' button to see a detailed",
786+
span("Build report", class = "txt_code inline"),
787+
"button to see a detailed",
761788
"assessment of how well your current sampling design",
762789
"addresses your research targets.")
763790
)))
@@ -921,22 +948,22 @@ mod_comp_tour_server <- function(id, rv) {
921948
span(class = "tour_action", action_bell,
922949
"Please choose",
923950
fontawesome::fa("square-check", fill = "white"),
924-
span("'Select'", class = "txt_code"), "as your",
951+
span("Select", class = "txt_code"), "as your",
925952
wrap_none(
926953
span("data source", class = "txt_bold"), ", and"),
927954
fontawesome::fa("square-check", fill = "white"),
928-
span("'Home range'", class = "txt_code"), "as the",
955+
span("Home range", class = "txt_code"), "as the",
929956
wrap_none(
930957
span("research target", class = "txt_bold"), "."),
931958
"For the",
932959
wrap_none(
933960
span("analytical target", class = "txt_bold"), ","),
934961
"choose",
935-
span("'Mean estimate of",
962+
span("Mean estimate of",
936963
wrap_none(
937964
span("sampled population",
938-
class = "txt_mono cl-sea-l"),
939-
"'"), class = "txt_code"),
965+
class = "txt_mono cl-sea-l")
966+
), class = "txt_code"),
940967
"to display deployment options.")
941968
)))
942969

@@ -949,18 +976,18 @@ mod_comp_tour_server <- function(id, rv) {
949976
wrap_none(
950977
span("deployment", class = "txt_bold"), ","),
951978
"select",
952-
span("'I plan to deploy a",
979+
span("I plan to deploy a",
953980
wrap_none(
954981
span("set",
955982
class = "txt_mono cl-grn"),
956-
" number of VHF/GPS tags'."),
983+
" number of VHF/GPS tags."),
957984
class = "txt_code"),
958985
"Then check the",
959-
span("'Add",
986+
span("Add",
960987
wrap_none(
961988
span("individual",
962989
class = "txt_mono cl-grn"),
963-
" variation'"),
990+
" variation"),
964991
class = "txt_code"),
965992
"checkbox, as we wish to account for",
966993
"individual differences.")
@@ -976,7 +1003,7 @@ mod_comp_tour_server <- function(id, rv) {
9761003
span("Select data", class = "cl-sea-l"), "tab",
9771004
"(to load a dataset from the",
9781005
span(
979-
wrap_none(span("ctmm", class = "txt_mono cl-sea-l")),
1006+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
9801007
class = "txt_code inline"),
9811008
"package), then the",
9821009
fontawesome::fa("stopwatch", fill = pal$sea),
@@ -1014,7 +1041,7 @@ mod_comp_tour_server <- function(id, rv) {
10141041
"In this tab, you will be able to select one of the seven",
10151042
"species available in the",
10161043
span(
1017-
wrap_none(span("ctmm", class = "txt_mono cl-sea-l")),
1044+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
10181045
class = "txt_code inline"),
10191046
span("R", class = "txt_code inline"), "package.",
10201047
"Parameters extracted from one of the species provided",
@@ -1082,9 +1109,8 @@ mod_comp_tour_server <- function(id, rv) {
10821109
class = "tour_action", action_bell,
10831110
"The button should now read",
10841111
fontawesome::fa("circle-check"),
1085-
span("Validated!", class = "txt_code inline"),
10861112
wrap_none(span("Validated!", class = "txt_code inline"),
1087-
end = "."), "Now click the",
1113+
"."), "Now click the",
10881114
fontawesome::fa("paper-plane"),
10891115
span("Extract", class = "txt_code inline"), "button.")
10901116
)))
@@ -1266,7 +1292,7 @@ mod_comp_tour_server <- function(id, rv) {
12661292
span("Autocorrelated Kernel Density Estimator (AKDE)",
12671293
class = "cl-sea-l"), "method available in the",
12681294
span(
1269-
wrap_none(span("ctmm", class = "txt_mono cl-sea-l")),
1295+
wrap_none(span("ctmm", class = "txt_mono cl-grn")),
12701296
class = "txt_code inline"),
12711297
span("R", class = "txt_code inline"), "package.", p(),
12721298

0 commit comments

Comments
 (0)