You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/shiny_modules.Rmd
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ pre[class] {
28
28
```
29
29
30
30
31
-
## tl;dr
31
+
## Summary
32
32
33
33
If you use `sortable` with `shiny` modules, opt into a fix by adding this line of code to your app:
34
34
@@ -39,18 +39,18 @@ enable_modules(TRUE) # or simply enable_modules()
39
39
40
40
## Introduction
41
41
42
-
Shiny modules provide a way to create reusable components in Shiny applications. When working with modules, namespacing of input and output IDs is crucial.
42
+
Modules provide a way to create reusable components `shiny`applications. When working with modules, using the correct namespace of input and output IDs is crucial.
43
43
44
-
Due to an early design decision, the `sortable` package (`versions <= 0.5.0`) did not fully support Shiny modules.
44
+
Due to an early design decision, the `sortable` package (`versions <= 0.5.0`) did not fully support `shiny` modules.
45
45
46
-
This vignette explains how to use sortable with Shiny modules and the changes that were made to support this functionality.
46
+
This vignette explains how to use sortable with `shiny` modules and the changes that were made to support this functionality.
47
47
48
48
49
-
## Understanding the Module Namespacing Issue
49
+
## Understanding the module namespace issue
50
50
51
-
In Shiny modules, element IDs are automatically namespaced using a prefix followed by a dash. For example, if you create a module with ID "mymodule" and an input with ID "myinput", Shiny will create an ID like "mymodule-myinput".
51
+
In `shiny` modules, element IDs are automatically namespaced using a prefix followed by a dash. For example, if you create a module with ID `mymodule` and an input with ID `myinput`, `shiny` will create an ID like `mymodule-myinput`.
52
52
53
-
Initially, the `sortable` package used ID formats that were incompatible with this namespacing approach. The IDs were created as `rank-list-{id}` or `bucket-list-{id}`, which placed the key part at the beginning of the ID.
53
+
Initially, the `sortable` package used ID formats that were incompatible with this namespace approach. The IDs were created as `rank-list-{id}` or `bucket-list-{id}`, which placed the key part at the beginning of the ID.
54
54
55
55
56
56
@@ -76,10 +76,10 @@ When module support is enabled, the ID format changes:
76
76
-`as_rank_list_id("myid")` will return `"myid-rank-list"` (instead of `"rank-list-myid"`)
77
77
-`as_bucket_list_id("myid")` will return `"myid-bucket-list"` (instead of `"bucket-list-myid"`)
78
78
79
-
This change puts the key part at the end, making it compatible with Shiny's module namespacing system.
79
+
This change puts the key part at the end, making it compatible with the `shiny`module namespace system.
80
80
81
81
82
-
To disable module support (reverting to pre-0.5.0 behavior):
82
+
To disable module support (reverting to `<= 0.5.0` behavior):
0 commit comments