Skip to content

Commit 5aef4d7

Browse files
authored
Improve the definition of "transform" in the vignettes (#1489)
Closes #1475 `Customizing Module Output` vignette is now called `Transform Module Output` As we introduce a new term "customize" and it would be best to use the same term "transform" that we se to transform the `teal_data` object `Data Transformations as Shiny Module` is now called `Transform Input Data` This name was appropriate at the time of writing the vignette when transformation done using shiny module was only possible in one place, now that is not the case and we have two places where data is _transformed_ using shiny module. And from the user's perspective the main thing showcased in this vignette is about transforming the input data.
1 parent c702995 commit 5aef4d7

14 files changed

+342
-60
lines changed

R/dummy_functions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' This module creates an object called `object` that can be modified with decorators.
66
#' The `object` is determined by what's selected in `Choose a dataset` input in UI.
77
#' The object can be anything that can be handled by `renderPrint()`.
8-
#' See the `vignette("customizing-module-output", package = "teal")` or [`teal_transform_module`]
8+
#' See the `vignette("transform-module-output", package = "teal")` or [`teal_transform_module`]
99
#' to read more about decorators.
1010
#'
1111
#' @inheritParams teal_modules

R/modules.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ setOldClass("teal_modules")
7474
#' @param ui_args (named `list`) with additional arguments passed on to the UI function.
7575
#' @param x (`teal_module` or `teal_modules`) Object to format/print.
7676
#' @param transformators (`list` of `teal_transform_module`) that will be applied to transform module's data input.
77-
#' To learn more check `vignette("data-transform-as-shiny-module", package = "teal")`.
77+
#' To learn more check `vignette("transform-input-data", package = "teal")`.
7878
#'
7979
#' @param ...
8080
#' - For `modules()`: (`teal_module` or `teal_modules`) Objects to wrap into a tab.

R/teal_transform_module.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#' The primary advantage of `teal_transform_module` over custom modules is in its error handling, where all warnings and
1414
#' errors are managed by `teal`, allowing developers to focus on transformation logic.
1515
#'
16-
#' For more details, see the vignette: `vignette("data-transform-as-shiny-module", package = "teal")`.
16+
#' For more details, see the vignette: `vignette("transform-input-data", package = "teal")`.
1717
#'
1818
#' # Customizing Module Outputs
1919
#'
@@ -23,7 +23,7 @@
2323
#' To manage these `decorators` within your module, use [`ui_transform_teal_data()`] and [`srv_transform_teal_data()`].
2424
#' (For further guidance on managing decorators, refer to `ui_args` and `srv_args` in the vignette documentation.)
2525
#'
26-
#' See the vignette `vignette("customizing-module-output", package = "teal")` for additional examples.
26+
#' See the vignette `vignette("transform-module-output", package = "teal")` for additional examples.
2727
#'
2828
#' # `server` as a language
2929
#'
@@ -141,7 +141,7 @@ teal_transform_module <- function(ui = NULL,
141141
"teal_transform_module() ",
142142
"Using eventReactive in teal_transform module server code should be avoided as it ",
143143
"may lead to unexpected behavior. See the vignettes for more information ",
144-
"(`vignette(\"data-transform-as-shiny-module\", package = \"teal\")`).",
144+
"(`vignette(\"transform-input-data\", package = \"teal\")`).",
145145
call. = FALSE
146146
)
147147
}

_pkgdown.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ articles:
6262
- including-data-in-teal-applications
6363
- data-as-shiny-module
6464
- filter-panel
65-
- data-transform-as-shiny-module
65+
- transform-input-data
6666
- title: Extending `teal`
6767
navbar: Extending `teal`
6868
contents:
6969
- creating-custom-modules
7070
- adding-support-for-reporting
71-
- customizing-module-output
71+
- transform-module-output
7272
- title: Using `teal`
7373
navbar: Using `teal`
7474
contents:
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
<mxfile host="65bd71144e">
2+
<diagram name="Page-1" id="Af2CoAbSZcckCuTcOnmQ">
3+
<mxGraphModel dx="1748" dy="940" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0"/>
6+
<mxCell id="1" parent="0"/>
7+
<mxCell id="78" value="&lt;span style=&quot;font-weight: 700; font-size: 20px;&quot;&gt;Input Data Transformations&lt;/span&gt;" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;fontSize=20;" parent="1" vertex="1">
8+
<mxGeometry x="505" y="870" width="275" height="310" as="geometry"/>
9+
</mxCell>
10+
<mxCell id="151" value="" style="shape=flexArrow;endArrow=classic;html=1;strokeColor=#d79b00;fontSize=20;fillColor=#ffe6cc;entryX=-0.005;entryY=0.124;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
11+
<mxGeometry width="50" height="50" relative="1" as="geometry">
12+
<mxPoint x="725" y="1100" as="sourcePoint"/>
13+
<mxPoint x="851.3625" y="1124.82292" as="targetPoint"/>
14+
</mxGeometry>
15+
</mxCell>
16+
<mxCell id="76" value="&lt;span style=&quot;font-weight: 700; font-size: 20px;&quot;&gt;Module Output Decoration&lt;/span&gt;" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;fontSize=20;" parent="1" vertex="1">
17+
<mxGeometry x="505" y="1380" width="280" height="155" as="geometry"/>
18+
</mxCell>
19+
<mxCell id="77" value="&lt;span style=&quot;font-weight: 700; font-size: 20px;&quot;&gt;Teal Module Logic&lt;/span&gt;" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;fontSize=20;" parent="1" vertex="1">
20+
<mxGeometry x="505" y="1200" width="280" height="160" as="geometry"/>
21+
</mxCell>
22+
<mxCell id="79" value="" style="endArrow=classic;html=1;" parent="1" source="84" target="85" edge="1">
23+
<mxGeometry width="50" height="50" relative="1" as="geometry"/>
24+
</mxCell>
25+
<mxCell id="80" value="" style="endArrow=classic;html=1;" parent="1" source="85" target="86" edge="1">
26+
<mxGeometry width="50" height="50" relative="1" as="geometry"/>
27+
</mxCell>
28+
<mxCell id="81" value="" style="endArrow=classic;html=1;" parent="1" source="86" target="87" edge="1">
29+
<mxGeometry width="50" height="50" relative="1" as="geometry"/>
30+
</mxCell>
31+
<mxCell id="83" value="" style="endArrow=classic;html=1;" parent="1" source="89" edge="1">
32+
<mxGeometry width="50" height="50" relative="1" as="geometry">
33+
<mxPoint x="640" y="1425" as="targetPoint"/>
34+
</mxGeometry>
35+
</mxCell>
36+
<mxCell id="84" value="teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;container=0;fontColor=#333333;arcSize=0;" parent="1" vertex="1">
37+
<mxGeometry x="587.5" y="920" width="105" height="25" as="geometry"/>
38+
</mxCell>
39+
<mxCell id="85" value="Filter Panel" style="rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;container=0;glass=0;arcSize=50;" parent="1" vertex="1">
40+
<mxGeometry x="580" y="970" width="120" height="35" as="geometry"/>
41+
</mxCell>
42+
<mxCell id="86" value="Filtered teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;container=0;fontColor=#333333;arcSize=0;" parent="1" vertex="1">
43+
<mxGeometry x="582.5" y="1032.5" width="115" height="25" as="geometry"/>
44+
</mxCell>
45+
<mxCell id="87" value="Transform Panel (transformators)" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=50;" parent="1" vertex="1">
46+
<mxGeometry x="545" y="1082.5" width="190" height="35" as="geometry"/>
47+
</mxCell>
48+
<mxCell id="88" value="Module Logic" style="rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;arcSize=50;" parent="1" vertex="1">
49+
<mxGeometry x="580" y="1244" width="120" height="35" as="geometry"/>
50+
</mxCell>
51+
<mxCell id="89" value="Generated outputs (plots/tables) within&#10;teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;arcSize=0;" parent="1" vertex="1">
52+
<mxGeometry x="532.5" y="1300" width="215" height="40" as="geometry"/>
53+
</mxCell>
54+
<mxCell id="90" value="" style="endArrow=classic;html=1;" parent="1" source="88" target="89" edge="1">
55+
<mxGeometry width="50" height="50" relative="1" as="geometry"/>
56+
</mxCell>
57+
<mxCell id="92" value="Decorated outputs within&#10;teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;fontColor=#333333;arcSize=0;" parent="1" vertex="1">
58+
<mxGeometry x="562.5" y="1485" width="155" height="40" as="geometry"/>
59+
</mxCell>
60+
<mxCell id="93" value="" style="endArrow=classic;html=1;" parent="1" target="92" edge="1">
61+
<mxGeometry width="50" height="50" relative="1" as="geometry">
62+
<mxPoint x="640" y="1460" as="sourcePoint"/>
63+
</mxGeometry>
64+
</mxCell>
65+
<mxCell id="198" style="edgeStyle=none;html=1;" edge="1" parent="1" source="196" target="88">
66+
<mxGeometry relative="1" as="geometry"/>
67+
</mxCell>
68+
<mxCell id="196" value="Transformed teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;container=0;fontColor=#333333;arcSize=0;" vertex="1" parent="1">
69+
<mxGeometry x="576.25" y="1141" width="127.5" height="25" as="geometry"/>
70+
</mxCell>
71+
<mxCell id="197" value="" style="endArrow=classic;html=1;" edge="1" parent="1" target="196">
72+
<mxGeometry width="50" height="50" relative="1" as="geometry">
73+
<mxPoint x="640" y="1117.5" as="sourcePoint"/>
74+
<mxPoint x="640" y="1244" as="targetPoint"/>
75+
</mxGeometry>
76+
</mxCell>
77+
<mxCell id="199" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#FFFFFF;opacity=50;" vertex="1" parent="1">
78+
<mxGeometry x="490" y="850" width="590" height="710" as="geometry"/>
79+
</mxCell>
80+
<mxCell id="200" value="" style="shape=flexArrow;endArrow=classic;html=1;strokeColor=#d79b00;fontSize=20;fillColor=#ffe6cc;entryX=0.012;entryY=0.954;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="202">
81+
<mxGeometry width="50" height="50" relative="1" as="geometry">
82+
<mxPoint x="757" y="1450" as="sourcePoint"/>
83+
<mxPoint x="827" y="1370" as="targetPoint"/>
84+
</mxGeometry>
85+
</mxCell>
86+
<mxCell id="201" value="Transforming module outputs (decorators)" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
87+
<mxGeometry x="530" y="1425" width="235" height="35" as="geometry"/>
88+
</mxCell>
89+
<mxCell id="202" value="Transforming teal_data" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=11;verticalAlign=top;" vertex="1" parent="1">
90+
<mxGeometry x="852" y="1090" width="208" height="270" as="geometry"/>
91+
</mxCell>
92+
<mxCell id="203" style="edgeStyle=none;html=1;strokeColor=#000000;fontSize=28;" edge="1" parent="1" source="204" target="208">
93+
<mxGeometry relative="1" as="geometry"/>
94+
</mxCell>
95+
<mxCell id="204" value="teal_transform_module" style="rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;container=0;glass=0;arcSize=50;" vertex="1" parent="1">
96+
<mxGeometry x="881" y="1175" width="150" height="35" as="geometry"/>
97+
</mxCell>
98+
<mxCell id="205" style="edgeStyle=none;html=1;strokeColor=#000000;fontSize=28;" edge="1" parent="1" source="206" target="204">
99+
<mxGeometry relative="1" as="geometry"/>
100+
</mxCell>
101+
<mxCell id="206" value="teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;container=0;fontColor=#333333;" vertex="1" parent="1">
102+
<mxGeometry x="905.5" y="1125" width="100" height="30" as="geometry"/>
103+
</mxCell>
104+
<mxCell id="207" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#000000;fontSize=28;" edge="1" parent="1" source="208" target="211">
105+
<mxGeometry relative="1" as="geometry"/>
106+
</mxCell>
107+
<mxCell id="208" value="teal_transform_module" style="rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;container=0;glass=0;arcSize=50;" vertex="1" parent="1">
108+
<mxGeometry x="881" y="1225" width="150" height="35" as="geometry"/>
109+
</mxCell>
110+
<mxCell id="209" value="Transformed teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;container=0;fontColor=#333333;" vertex="1" parent="1">
111+
<mxGeometry x="890" y="1315" width="134" height="30" as="geometry"/>
112+
</mxCell>
113+
<mxCell id="210" style="edgeStyle=none;html=1;strokeColor=#000000;fontSize=28;" edge="1" parent="1" source="211" target="209">
114+
<mxGeometry relative="1" as="geometry"/>
115+
</mxCell>
116+
<mxCell id="211" value="..." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=bottom;whiteSpace=wrap;rounded=0;fontSize=28;" vertex="1" parent="1">
117+
<mxGeometry x="927" y="1272.5" width="60" height="25" as="geometry"/>
118+
</mxCell>
119+
<mxCell id="212" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=28;dashed=1;" vertex="1" parent="1">
120+
<mxGeometry x="935" y="870" width="125" height="150" as="geometry"/>
121+
</mxCell>
122+
<mxCell id="213" value="Logic" style="rounded=1;fillColor=#dae8fc;strokeColor=#6c8ebf;container=0;glass=0;arcSize=50;" vertex="1" parent="1">
123+
<mxGeometry x="967.5" y="950" width="60" height="25" as="geometry"/>
124+
</mxCell>
125+
<mxCell id="214" value="teal_data" style="rounded=1;fillColor=#f5f5f5;strokeColor=#666666;container=0;fontColor=#333333;arcSize=0;" vertex="1" parent="1">
126+
<mxGeometry x="962.5" y="910" width="70" height="25" as="geometry"/>
127+
</mxCell>
128+
<mxCell id="215" value="Transform Logic" style="rounded=1;fillColor=#ffe6cc;strokeColor=#d79b00;arcSize=50;" vertex="1" parent="1">
129+
<mxGeometry x="947.5" y="985" width="100" height="25" as="geometry"/>
130+
</mxCell>
131+
<mxCell id="216" value="Legend" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;fontStyle=0" vertex="1" parent="1">
132+
<mxGeometry x="945" y="870" width="105" height="30" as="geometry"/>
133+
</mxCell>
134+
</root>
135+
</mxGraphModel>
136+
</diagram>
137+
</mxfile>

0 commit comments

Comments
 (0)